Documentation
¶
Index ¶
- type Entity
- func (entity *Entity) CreateProperty() (*Property, error)
- func (entity *Entity) FindPropertyByName(name string) (*Property, error)
- func (entity *Entity) FindPropertyByUid(uid Uid) (*Property, error)
- func (entity *Entity) RemoveProperty(property *Property) error
- func (entity *Entity) Validate() (err error)
- type Id
- type IdUid
- type ModelInfo
- func (model *ModelInfo) Close() error
- func (model *ModelInfo) CreateEntity() (*Entity, error)
- func (model *ModelInfo) FindEntityByName(name string) (*Entity, error)
- func (model *ModelInfo) FindEntityByUid(uid Uid) (*Entity, error)
- func (model *ModelInfo) Validate() (err error)
- func (model *ModelInfo) Write() error
- type Property
- type Relation
- type Uid
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct {
Id IdUid `json:"id"`
Name string `json:"name"`
LastPropertyId IdUid `json:"lastPropertyId"`
Properties []*Property `json:"properties"`
// contains filtered or unexported fields
}
func (*Entity) CreateProperty ¶
func (*Entity) FindPropertyByName ¶
func (*Entity) FindPropertyByUid ¶
func (*Entity) RemoveProperty ¶
type ModelInfo ¶
type ModelInfo struct {
Comment []string `json:"comment"`
Entities []*Entity `json:"entities"`
LastEntityId IdUid `json:"lastEntityId"`
LastIndexId IdUid `json:"lastIndexId"`
//ModelVersion int
//Version int
RetiredEntityUids []Uid `json:"retiredEntityUids"`
RetiredIndexUids []Uid `json:"retiredIndexUids"`
RetiredPropertyUids []Uid `json:"retiredPropertyUids"`
// Model Template
Package string `json:"-"`
// contains filtered or unexported fields
}
func LoadOrCreateModel ¶
func (*ModelInfo) CreateEntity ¶
func (*ModelInfo) FindEntityByName ¶
func (*ModelInfo) FindEntityByUid ¶
type Property ¶
type Property struct {
Id IdUid `json:"id"`
Name string `json:"name"`
IndexId *IdUid `json:"indexId,omitempty"`
// contains filtered or unexported fields
}
func (*Property) CreateIndex ¶
func (*Property) RemoveIndex ¶
Click to show internal directories.
Click to hide internal directories.