Documentation ¶
Index ¶
Constants ¶
View Source
const ( DataModelSubjectFieldTypeBool DataModelSubjectFieldType = "bool" DataModelSubjectFieldTypeInt = "int" DataModelSubjectFieldTypeUInt = "uint" DataModelSubjectFieldTypeFloat = "float" DataModelSubjectFieldTypeDataDateUTC = "dateutc" DataModelSubjectFieldTypeString = "string" DataModelSubjectFieldTypeBytes = "bytes" DataModelSubjectFieldTypeUUID = "uuid" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataModel ¶
type DataModel struct {
Subjects []*DataModelSubject
}
this is root structure of tree like structure of this package functionality
func (*DataModel) GetSubjectByName ¶
func (self *DataModel) GetSubjectByName(name string) *DataModelSubject
type DataModelSubject ¶
type DataModelSubject struct { Name string DisplayTitle string Description string ForExport bool // clients can request this Model represintation Fields []*DataModelSubjectField }
describes table and it's fields
func (*DataModelSubject) GetFieldByName ¶
func (self *DataModelSubject) GetFieldByName(name string) *DataModelSubjectField
type DataModelSubjectDocument ¶
type DataModelSubjectDocument struct {
Items []*DataModelSubjectDocumentItem
}
this is used to insert or get documents
type DataModelSubjectField ¶
type DataModelSubjectField struct { // Mode DataModelSubjectFieldMode Name string Type DataModelSubjectFieldType CanBeNull bool DefaultCanBeUsed bool DefaultValue interface{} DisplayTitle string Description string DisplayMustBeCensored bool ForStorage bool // store/load to/from db ForUserView bool // user can view ForUserSet bool // user can change ForTransport bool // for network transfers // TODO: experimental }
type DataModelSubjectFieldType ¶
type DataModelSubjectFieldType string
Click to show internal directories.
Click to hide internal directories.