Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/camilaleniss/design-patterns-go
/ types & classes
Types & classes
174 in github.com/camilaleniss/design-patterns-go
⨍
Functions
358
◇
Types & classes
174
TypeAlias
Action
4-behavioural/command/main.go:40
TypeAlias
Action
4-behavioural/command/composite-command/main.go:35
Struct
AdditionExpression
4-behavioural/visitor/classic/main.go:27
Struct
AdditionExpression
4-behavioural/visitor/reflective/main.go:16
Struct
AdditionExpression
4-behavioural/visitor/intrusive/main.go:22
Struct
Address
2-creational/prototype/serialization/main.go:9
Struct
Address
2-creational/prototype/factory/main.go:9
Struct
Address
2-creational/prototype/deep-copy/main.go:7
Struct
Address
2-creational/prototype/copy-method/main.go:5
Struct
AndSpecification
1-solid-principles/open-closed/main.go:97
TypeAlias
Argument
command query separation, Mediator, Chain of responsibility and Observer in a sigle example
4-behavioural/chain-of-responsibility/broker-chain/main.go:11
Struct
BankAccount
4-behavioural/memento/main.go:20
Struct
BankAccount
4-behavioural/memento/undo-redo/main.go:9
Struct
BankAccount
4-behavioural/command/main.go:14
Struct
BankAccount
4-behavioural/command/composite-command/main.go:7
Struct
BankAccount
4-behavioural/command/functional/main.go:5
Struct
BankAccountCommand
to know if a which command will be run and if succedeed
4-behavioural/command/main.go:48
Struct
BankAccountCommand
4-behavioural/command/composite-command/main.go:42
Struct
BaseState
base state allows us if no transition it's set
4-behavioural/state/main.go:34
Struct
BetterFilter
1-solid-principles/open-closed/main.go:106
Struct
BetterFormattedText
3-structural/flyweight/text-formatting-example/main.go:53
Struct
BinaryOperation
4-behavioural/interpreter/main.go:39
Struct
BinaryTree
actually the tree that will have the nodes
4-behavioural/iterator/tree-transversal/main.go:74
Struct
Bitmap
3-structural/proxy/virtual-proxy/main.go:10
Struct
Buffer
Facade Exposing several components through a single interface basic struct
3-structural/facade/main.go:9
Struct
Car
3-structural/proxy/protection-proxy/main.go:10
Struct
CarProxy
this can also be called 'secureCar' or something like that
3-structural/proxy/protection-proxy/main.go:22
Struct
ChatRoom
actually the mediator
4-behavioural/mediator/main.go:33
Struct
Circle
3-structural/decorator/main.go:16
Struct
Circle
has a renderer, and you can define it as you want
3-structural/bridge/main.go:36
TypeAlias
Color
1-solid-principles/open-closed/main.go:5
Struct
ColorSpecification
1-solid-principles/open-closed/main.go:81
Struct
ColoredShape
more generic c:
3-structural/decorator/main.go:44
Struct
ColoredSquare
possible, but not generic enough
3-structural/decorator/main.go:38
Interface
Command
to actually call or undo the methods
4-behavioural/command/main.go:35
Interface
Command
4-behavioural/command/composite-command/main.go:27
Struct
CompositeBankAccountCommand
group commands
4-behavioural/command/composite-command/main.go:81
Struct
Console
a facade over buffers and viewports
3-structural/facade/main.go:38
Struct
Creature
4-behavioural/chain-of-responsibility/broker-chain/main.go:62
Struct
Creature
4-behavioural/chain-of-responsibility/method-chain/main.go:5
Struct
CreatureModifier
data common to all modifiers
4-behavioural/chain-of-responsibility/broker-chain/main.go:93
Struct
CreatureModifier
actually the struct that will point to a creature
4-behavioural/chain-of-responsibility/method-chain/main.go:26
Interface
Database
Singleton When we only want a module to be instantied one think of a module as a singleton
2-creational/singleton/main.go:15
Struct
DoctorService
4-behavioural/observer/main.go:64
Struct
Document
1-solid-principles/interface-segregation/main.go:3
Struct
DoubleAttackModifier
4-behavioural/chain-of-responsibility/broker-chain/main.go:102
Struct
DoubleAttackModifier
aggregates the CreatureModifier
4-behavioural/chain-of-responsibility/method-chain/main.go:53
Struct
DoubleExpression
4-behavioural/visitor/classic/main.go:18
Struct
DoubleExpression
4-behavioural/visitor/reflective/main.go:12
Struct
DoubleExpression
let's call this number... or something
4-behavioural/visitor/intrusive/main.go:13
Interface
Driven
base interface
3-structural/proxy/protection-proxy/main.go:6
Struct
Driver
3-structural/proxy/protection-proxy/main.go:17
Struct
DummyDatabase
2-creational/singleton/main.go:106
Struct
ElectrocalRoll
4-behavioural/observer/property-dependencies/main.go:73
Interface
Element
4-behavioural/interpreter/main.go:16
Struct
EmailBuilder
2-creational/builder/parameter/main.go:9
Struct
Employee
2-creational/factories/generator/main.go:5
Struct
Employee
imagine a wide types of employees with default values to be set
2-creational/factories/prototype/main.go:7
Struct
Employee
2-creational/prototype/factory/main.go:14
Struct
EmployeeFactory
structural approach
2-creational/factories/generator/main.go:21
Interface
Expression
the accept method allows us to visit the type that we want
4-behavioural/visitor/classic/main.go:14
Interface
Expression
4-behavioural/visitor/reflective/main.go:8
Interface
Expression
4-behavioural/visitor/intrusive/main.go:8
Struct
ExpressionPrinter
has the builder
4-behavioural/visitor/classic/main.go:37
Interface
ExpressionVisitor
4-behavioural/visitor/classic/main.go:8
Struct
Filter
let's say we have a store and want to filter our products
1-solid-principles/open-closed/main.go:28
Struct
FormattedText
this example focuses more in understanding the fundamentals the how to this is the unefficient way to do this
3-structural/flyweight/text-formatting-example/main.go:13
Interface
Game
4-behavioural/template-method/main.go:16
Struct
Game
has its observers
4-behavioural/chain-of-responsibility/broker-chain/main.go:39
Struct
GraphicObject
this is our basic object
3-structural/composite/drawing-example/main.go:9
Struct
HtmlBuilder
actually the builder
2-creational/builder/basic/main.go:48
Struct
HtmlElement
this is our root element
2-creational/builder/basic/main.go:17
Struct
HtmlListStrategy
4-behavioural/strategy/main.go:48
Interface
Image
base interface
3-structural/proxy/virtual-proxy/main.go:6
Struct
InOrderIterator
4-behavioural/iterator/tree-transversal/main.go:22
Struct
IncreasedDefenseModifier
4-behavioural/chain-of-responsibility/method-chain/main.go:63
Struct
Info
1-solid-principles/dependency-inversion/main.go:22
Struct
Integer
4-behavioural/interpreter/main.go:20
Struct
Journal
1-solid-principles/single-responsibility/main.go:12
Struct
LazyBitmap
lazyBitmap allows us to load the image when we need
3-structural/proxy/virtual-proxy/main.go:31
Struct
Line
3-structural/adapter/main.go:22
Interface
ListStrategy
the strategy interfacce, implementation give us the well-defined path to follow
4-behavioural/strategy/main.go:27
Interface
Machine
this interface has three methods and force everyone that uses it to implement them
1-solid-principles/interface-segregation/main.go:7
Struct
MarkdownListStrategy
4-behavioural/strategy/main.go:33
Struct
Memento
the snapshot
4-behavioural/memento/main.go:16
Struct
Memento
4-behavioural/memento/undo-redo/main.go:5
Interface
Modifier
this will be our controller func
4-behavioural/chain-of-responsibility/method-chain/main.go:20
Struct
MoneyTransferCommand
4-behavioural/command/composite-command/main.go:117
Interface
MultiFunctionDevice
1-solid-principles/interface-segregation/main.go:76
Struct
MultiFunctionMachine
interface combination + decorator
1-solid-principles/interface-segregation/main.go:82
Struct
MultiFunctionPrinter
ok if you need a multifunction device
1-solid-principles/interface-segregation/main.go:14
Struct
MyPrinter
printer only
1-solid-principles/interface-segregation/main.go:57
Struct
Neuron
basic struct
3-structural/composite/neural-network-example/main.go:9
Interface
NeuronInterface
as long as it's implemented we can sum them up together
3-structural/composite/neural-network-example/main.go:4
Struct
NeuronLayer
the different one
3-structural/composite/neural-network-example/main.go:24
Struct
NoBonusesModifier
4-behavioural/chain-of-responsibility/method-chain/main.go:92
Struct
Node
4-behavioural/iterator/tree-transversal/main.go:5
Interface
Observable
to be able to subscribe and unsubscribe
4-behavioural/chain-of-responsibility/broker-chain/main.go:32
Struct
Observable
the object that will have the subscribers and will notify them
4-behavioural/observer/main.go:16
Struct
Observable
4-behavioural/observer/property-dependencies/main.go:8
next →
1–100 of 174, ranked by callers