Documentation
¶
Index ¶
- func GenerateIdentifiable(iType IdentifiableType) identifiable
- func MustGenerator(iType IdentifiableType) func() identifiable
- func MustIdentifiableFactory(iType IdentifiableType) func(id string) identifiable
- func NewIdentifiable(iType IdentifiableType, id string) identifiable
- func ParseIdentifiable(raw string) (identifiable, error)
- type Identifiable
- type IdentifiableType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateIdentifiable ¶
func GenerateIdentifiable(iType IdentifiableType) identifiable
func MustGenerator ¶
func MustGenerator(iType IdentifiableType) func() identifiable
func MustIdentifiableFactory ¶
func MustIdentifiableFactory(iType IdentifiableType) func(id string) identifiable
func NewIdentifiable ¶
func NewIdentifiable(iType IdentifiableType, id string) identifiable
func ParseIdentifiable ¶
Types ¶
type Identifiable ¶
type Identifiable interface { // Type know what it is Type() IdentifiableType // ID something by which you can find it in it's origin storage, can't contain ) ID() string // String make it serializable nicely for others to store in DB and for you to reconstruct later String() string }
type IdentifiableType ¶
type IdentifiableType string
IdentifiableType make it easier for ide to find defined instances in the codebase, type can't contain (
Click to show internal directories.
Click to hide internal directories.