Documentation ¶
Index ¶
- Variables
- func AliasesForIdentity(identity elemental.Identity) []string
- func AllIdentities() []elemental.Identity
- func Manager() elemental.ModelManager
- func ModelVersion() float64
- type List
- func (*List) AttributeSpecifications() map[string]elemental.AttributeSpecification
- func (o *List) BleveType() string
- func (o *List) DeepCopy() *List
- func (o *List) DeepCopyInto(out *List)
- func (o *List) DefaultOrder() []string
- func (o *List) Doc() string
- func (o *List) GetBSON() (any, error)
- func (o *List) GetName() string
- func (o *List) Identifier() string
- func (o *List) Identity() elemental.Identity
- func (o *List) Patch(sparse elemental.SparseIdentifiable)
- func (o *List) SetBSON(raw bson.Raw) error
- func (o *List) SetIdentifier(id string)
- func (o *List) SetName(name string)
- func (*List) SpecificationForAttribute(name string) elemental.AttributeSpecification
- func (o *List) String() string
- func (o *List) ToSparse(fields ...string) elemental.SparseIdentifiable
- func (o *List) Validate() error
- func (o *List) ValueForAttribute(name string) any
- func (o *List) Version() int
- type ListsList
- func (o ListsList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o ListsList) Copy() elemental.Identifiables
- func (o ListsList) DefaultOrder() []string
- func (o ListsList) Identity() elemental.Identity
- func (o ListsList) List() elemental.IdentifiablesList
- func (o ListsList) ToSparse(fields ...string) elemental.Identifiables
- func (o ListsList) Version() int
- type Root
- func (*Root) AttributeSpecifications() map[string]elemental.AttributeSpecification
- func (o *Root) BleveType() string
- func (o *Root) DeepCopy() *Root
- func (o *Root) DeepCopyInto(out *Root)
- func (o *Root) DefaultOrder() []string
- func (o *Root) Doc() string
- func (o *Root) GetBSON() (any, error)
- func (o *Root) Identifier() string
- func (o *Root) Identity() elemental.Identity
- func (o *Root) SetBSON(raw bson.Raw) error
- func (o *Root) SetIdentifier(id string)
- func (*Root) SpecificationForAttribute(name string) elemental.AttributeSpecification
- func (o *Root) String() string
- func (o *Root) Validate() error
- func (o *Root) ValueForAttribute(name string) any
- func (o *Root) Version() int
- type SparseList
- func (o *SparseList) DeepCopy() *SparseList
- func (o *SparseList) DeepCopyInto(out *SparseList)
- func (o *SparseList) GetBSON() (any, error)
- func (o *SparseList) GetName() (out string)
- func (o *SparseList) Identifier() string
- func (o *SparseList) Identity() elemental.Identity
- func (o *SparseList) SetBSON(raw bson.Raw) error
- func (o *SparseList) SetIdentifier(id string)
- func (o *SparseList) SetName(name string)
- func (o *SparseList) ToPlain() elemental.PlainIdentifiable
- func (o *SparseList) Version() int
- type SparseListsList
- func (o SparseListsList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o SparseListsList) Copy() elemental.Identifiables
- func (o SparseListsList) DefaultOrder() []string
- func (o SparseListsList) Identity() elemental.Identity
- func (o SparseListsList) List() elemental.IdentifiablesList
- func (o SparseListsList) ToPlain() elemental.IdentifiablesList
- func (o SparseListsList) Version() int
- type SparseTask
- func (o *SparseTask) DeepCopy() *SparseTask
- func (o *SparseTask) DeepCopyInto(out *SparseTask)
- func (o *SparseTask) GetBSON() (any, error)
- func (o *SparseTask) GetName() (out string)
- func (o *SparseTask) Identifier() string
- func (o *SparseTask) Identity() elemental.Identity
- func (o *SparseTask) SetBSON(raw bson.Raw) error
- func (o *SparseTask) SetIdentifier(id string)
- func (o *SparseTask) SetName(name string)
- func (o *SparseTask) ToPlain() elemental.PlainIdentifiable
- func (o *SparseTask) Version() int
- type SparseTasksList
- func (o SparseTasksList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o SparseTasksList) Copy() elemental.Identifiables
- func (o SparseTasksList) DefaultOrder() []string
- func (o SparseTasksList) Identity() elemental.Identity
- func (o SparseTasksList) List() elemental.IdentifiablesList
- func (o SparseTasksList) ToPlain() elemental.IdentifiablesList
- func (o SparseTasksList) Version() int
- type SparseUser
- func (o *SparseUser) DeepCopy() *SparseUser
- func (o *SparseUser) DeepCopyInto(out *SparseUser)
- func (o *SparseUser) GetArchived() (out bool)
- func (o *SparseUser) GetBSON() (any, error)
- func (o *SparseUser) Identifier() string
- func (o *SparseUser) Identity() elemental.Identity
- func (o *SparseUser) SetArchived(archived bool)
- func (o *SparseUser) SetBSON(raw bson.Raw) error
- func (o *SparseUser) SetIdentifier(id string)
- func (o *SparseUser) ToPlain() elemental.PlainIdentifiable
- func (o *SparseUser) Version() int
- type SparseUsersList
- func (o SparseUsersList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o SparseUsersList) Copy() elemental.Identifiables
- func (o SparseUsersList) DefaultOrder() []string
- func (o SparseUsersList) Identity() elemental.Identity
- func (o SparseUsersList) List() elemental.IdentifiablesList
- func (o SparseUsersList) ToPlain() elemental.IdentifiablesList
- func (o SparseUsersList) Version() int
- type Task
- func (*Task) AttributeSpecifications() map[string]elemental.AttributeSpecification
- func (o *Task) BleveType() string
- func (o *Task) DeepCopy() *Task
- func (o *Task) DeepCopyInto(out *Task)
- func (o *Task) DefaultOrder() []string
- func (o *Task) Doc() string
- func (o *Task) GetBSON() (any, error)
- func (o *Task) GetName() string
- func (o *Task) Identifier() string
- func (o *Task) Identity() elemental.Identity
- func (o *Task) Patch(sparse elemental.SparseIdentifiable)
- func (o *Task) SetBSON(raw bson.Raw) error
- func (o *Task) SetIdentifier(id string)
- func (o *Task) SetName(name string)
- func (*Task) SpecificationForAttribute(name string) elemental.AttributeSpecification
- func (o *Task) String() string
- func (o *Task) ToSparse(fields ...string) elemental.SparseIdentifiable
- func (o *Task) Validate() error
- func (o *Task) ValueForAttribute(name string) any
- func (o *Task) Version() int
- type TaskStatusValue
- type TasksList
- func (o TasksList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o TasksList) Copy() elemental.Identifiables
- func (o TasksList) DefaultOrder() []string
- func (o TasksList) Identity() elemental.Identity
- func (o TasksList) List() elemental.IdentifiablesList
- func (o TasksList) ToSparse(fields ...string) elemental.Identifiables
- func (o TasksList) Version() int
- type UnmarshalableError
- type UnmarshalableList
- func (o *UnmarshalableList) Identity() elemental.Identity
- func (o *UnmarshalableList) MarshalJSON() ([]byte, error)
- func (o *UnmarshalableList) MarshalMsgpack() ([]byte, error)
- func (o *UnmarshalableList) UnmarshalJSON([]byte) error
- func (o *UnmarshalableList) UnmarshalMsgpack([]byte) error
- func (o *UnmarshalableList) Validate() elemental.Errors
- type UnmarshalableListsList
- func (o UnmarshalableListsList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o UnmarshalableListsList) Copy() elemental.Identifiables
- func (o UnmarshalableListsList) DefaultOrder() []string
- func (o UnmarshalableListsList) Identity() elemental.Identity
- func (o UnmarshalableListsList) List() elemental.IdentifiablesList
- func (o UnmarshalableListsList) Version() int
- type User
- func (*User) AttributeSpecifications() map[string]elemental.AttributeSpecification
- func (o *User) BleveType() string
- func (o *User) DeepCopy() *User
- func (o *User) DeepCopyInto(out *User)
- func (o *User) DefaultOrder() []string
- func (o *User) Doc() string
- func (o *User) GetArchived() bool
- func (o *User) GetBSON() (any, error)
- func (o *User) Identifier() string
- func (o *User) Identity() elemental.Identity
- func (o *User) Patch(sparse elemental.SparseIdentifiable)
- func (o *User) SetArchived(archived bool)
- func (o *User) SetBSON(raw bson.Raw) error
- func (o *User) SetIdentifier(id string)
- func (*User) SpecificationForAttribute(name string) elemental.AttributeSpecification
- func (o *User) String() string
- func (o *User) ToSparse(fields ...string) elemental.SparseIdentifiable
- func (o *User) Validate() error
- func (o *User) ValueForAttribute(name string) any
- func (o *User) Version() int
- type UsersList
- func (o UsersList) Append(objects ...elemental.Identifiable) elemental.Identifiables
- func (o UsersList) Copy() elemental.Identifiables
- func (o UsersList) DefaultOrder() []string
- func (o UsersList) Identity() elemental.Identity
- func (o UsersList) List() elemental.IdentifiablesList
- func (o UsersList) ToSparse(fields ...string) elemental.Identifiables
- func (o UsersList) Version() int
Constants ¶
This section is empty.
Variables ¶
var ListAttributesMap = map[string]elemental.AttributeSpecification{ "ID": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "_id", ConvertedName: "ID", Description: `The identifier.`, Exposed: true, Filterable: true, Identifier: true, Name: "ID", Orderable: true, PrimaryKey: true, ReadOnly: true, Stored: true, Type: "string", }, "CreationOnly": { AllowedChoices: []string{}, BSONFieldName: "creationonly", ConvertedName: "CreationOnly", CreationOnly: true, Description: `This attribute is creation only.`, Exposed: true, Filterable: true, Name: "creationOnly", Orderable: true, Stored: true, Type: "string", }, "Date": { AllowedChoices: []string{}, BSONFieldName: "date", ConvertedName: "Date", Description: `The date.`, Exposed: true, Filterable: true, Name: "date", Orderable: true, Stored: true, Type: "time", }, "Description": { AllowedChoices: []string{}, BSONFieldName: "description", ConvertedName: "Description", Description: `The description.`, Exposed: true, Filterable: true, Name: "description", Orderable: true, Stored: true, Type: "string", }, "Name": { AllowedChoices: []string{}, BSONFieldName: "name", ConvertedName: "Name", Description: `The name.`, Exposed: true, Filterable: true, Getter: true, Name: "name", Orderable: true, Required: true, Setter: true, Stored: true, Type: "string", }, "ParentID": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parentid", ConvertedName: "ParentID", Description: `The identifier of the parent of the object.`, Exposed: true, Filterable: true, ForeignKey: true, Name: "parentID", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "ParentType": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parenttype", ConvertedName: "ParentType", Description: `The type of the parent of the object.`, Exposed: true, Filterable: true, Name: "parentType", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "ReadOnly": { AllowedChoices: []string{}, BSONFieldName: "readonly", ConvertedName: "ReadOnly", Description: `This attribute is readonly.`, Exposed: true, Filterable: true, Name: "readOnly", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "Secret": { AllowedChoices: []string{}, BSONFieldName: "secret", ConvertedName: "Secret", Description: `This attribute is secret.`, Exposed: true, Filterable: true, Name: "secret", Orderable: true, Secret: true, Stored: true, Type: "string", }, "Slice": { AllowedChoices: []string{}, BSONFieldName: "slice", ConvertedName: "Slice", Description: `this is a slice.`, Exposed: true, Filterable: true, Name: "slice", Orderable: true, Stored: true, SubType: "string", Type: "list", }, "Unexposed": { AllowedChoices: []string{}, BSONFieldName: "unexposed", ConvertedName: "Unexposed", Description: `This attribute is not exposed.`, Filterable: true, Name: "unexposed", Orderable: true, Stored: true, Type: "string", }, }
ListAttributesMap represents the map of attribute for List.
var ListIdentity = elemental.Identity{ Name: "list", Category: "lists", Package: "todo-list", Private: false, }
ListIdentity represents the Identity of the object.
var ListLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{ "id": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "_id", ConvertedName: "ID", Description: `The identifier.`, Exposed: true, Filterable: true, Identifier: true, Name: "ID", Orderable: true, PrimaryKey: true, ReadOnly: true, Stored: true, Type: "string", }, "creationonly": { AllowedChoices: []string{}, BSONFieldName: "creationonly", ConvertedName: "CreationOnly", CreationOnly: true, Description: `This attribute is creation only.`, Exposed: true, Filterable: true, Name: "creationOnly", Orderable: true, Stored: true, Type: "string", }, "date": { AllowedChoices: []string{}, BSONFieldName: "date", ConvertedName: "Date", Description: `The date.`, Exposed: true, Filterable: true, Name: "date", Orderable: true, Stored: true, Type: "time", }, "description": { AllowedChoices: []string{}, BSONFieldName: "description", ConvertedName: "Description", Description: `The description.`, Exposed: true, Filterable: true, Name: "description", Orderable: true, Stored: true, Type: "string", }, "name": { AllowedChoices: []string{}, BSONFieldName: "name", ConvertedName: "Name", Description: `The name.`, Exposed: true, Filterable: true, Getter: true, Name: "name", Orderable: true, Required: true, Setter: true, Stored: true, Type: "string", }, "parentid": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parentid", ConvertedName: "ParentID", Description: `The identifier of the parent of the object.`, Exposed: true, Filterable: true, ForeignKey: true, Name: "parentID", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "parenttype": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parenttype", ConvertedName: "ParentType", Description: `The type of the parent of the object.`, Exposed: true, Filterable: true, Name: "parentType", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "readonly": { AllowedChoices: []string{}, BSONFieldName: "readonly", ConvertedName: "ReadOnly", Description: `This attribute is readonly.`, Exposed: true, Filterable: true, Name: "readOnly", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "secret": { AllowedChoices: []string{}, BSONFieldName: "secret", ConvertedName: "Secret", Description: `This attribute is secret.`, Exposed: true, Filterable: true, Name: "secret", Orderable: true, Secret: true, Stored: true, Type: "string", }, "slice": { AllowedChoices: []string{}, BSONFieldName: "slice", ConvertedName: "Slice", Description: `this is a slice.`, Exposed: true, Filterable: true, Name: "slice", Orderable: true, Stored: true, SubType: "string", Type: "list", }, "unexposed": { AllowedChoices: []string{}, BSONFieldName: "unexposed", ConvertedName: "Unexposed", Description: `This attribute is not exposed.`, Filterable: true, Name: "unexposed", Orderable: true, Stored: true, Type: "string", }, }
ListLowerCaseAttributesMap represents the map of attribute for List.
var RootAttributesMap = map[string]elemental.AttributeSpecification{}
RootAttributesMap represents the map of attribute for Root.
var RootIdentity = elemental.Identity{ Name: "root", Category: "root", Package: "todo-list", Private: false, }
RootIdentity represents the Identity of the object.
var RootLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{}
RootLowerCaseAttributesMap represents the map of attribute for Root.
var TaskAttributesMap = map[string]elemental.AttributeSpecification{ "ID": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "_id", ConvertedName: "ID", Description: `The identifier.`, Exposed: true, Filterable: true, Identifier: true, Name: "ID", Orderable: true, PrimaryKey: true, ReadOnly: true, Stored: true, Type: "string", }, "Description": { AllowedChoices: []string{}, BSONFieldName: "description", ConvertedName: "Description", Description: `The description.`, Exposed: true, Filterable: true, Name: "description", Orderable: true, Stored: true, Type: "string", }, "Name": { AllowedChoices: []string{}, BSONFieldName: "name", ConvertedName: "Name", Description: `The name.`, Exposed: true, Filterable: true, Getter: true, Name: "name", Orderable: true, Required: true, Setter: true, Stored: true, Type: "string", }, "ParentID": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parentid", ConvertedName: "ParentID", Description: `The identifier of the parent of the object.`, Exposed: true, Filterable: true, ForeignKey: true, Name: "parentID", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "ParentType": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parenttype", ConvertedName: "ParentType", Description: `The type of the parent of the object.`, Exposed: true, Filterable: true, Name: "parentType", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "Status": { AllowedChoices: []string{"DONE", "PROGRESS", "TODO"}, BSONFieldName: "status", ConvertedName: "Status", DefaultValue: TaskStatusTODO, Description: `The status of the task.`, Exposed: true, Filterable: true, Name: "status", Orderable: true, Stored: true, Type: "enum", }, }
TaskAttributesMap represents the map of attribute for Task.
var TaskIdentity = elemental.Identity{ Name: "task", Category: "tasks", Package: "todo-list", Private: false, }
TaskIdentity represents the Identity of the object.
var TaskLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{ "id": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "_id", ConvertedName: "ID", Description: `The identifier.`, Exposed: true, Filterable: true, Identifier: true, Name: "ID", Orderable: true, PrimaryKey: true, ReadOnly: true, Stored: true, Type: "string", }, "description": { AllowedChoices: []string{}, BSONFieldName: "description", ConvertedName: "Description", Description: `The description.`, Exposed: true, Filterable: true, Name: "description", Orderable: true, Stored: true, Type: "string", }, "name": { AllowedChoices: []string{}, BSONFieldName: "name", ConvertedName: "Name", Description: `The name.`, Exposed: true, Filterable: true, Getter: true, Name: "name", Orderable: true, Required: true, Setter: true, Stored: true, Type: "string", }, "parentid": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parentid", ConvertedName: "ParentID", Description: `The identifier of the parent of the object.`, Exposed: true, Filterable: true, ForeignKey: true, Name: "parentID", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "parenttype": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parenttype", ConvertedName: "ParentType", Description: `The type of the parent of the object.`, Exposed: true, Filterable: true, Name: "parentType", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "status": { AllowedChoices: []string{"DONE", "PROGRESS", "TODO"}, BSONFieldName: "status", ConvertedName: "Status", DefaultValue: TaskStatusTODO, Description: `The status of the task.`, Exposed: true, Filterable: true, Name: "status", Orderable: true, Stored: true, Type: "enum", }, }
TaskLowerCaseAttributesMap represents the map of attribute for Task.
var UnmarshalableListIdentity = elemental.Identity{Name: "list", Category: "lists"}
UnmarshalableListIdentity represents the Identity of the object.
var UserAttributesMap = map[string]elemental.AttributeSpecification{ "ID": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "_id", ConvertedName: "ID", Description: `The identifier.`, Exposed: true, Filterable: true, Identifier: true, Name: "ID", Orderable: true, PrimaryKey: true, ReadOnly: true, Stored: true, Type: "string", }, "Archived": { AllowedChoices: []string{}, BSONFieldName: "archived", ConvertedName: "Archived", Description: `the object is archived and not deleted.`, Exposed: true, Getter: true, Name: "archived", Setter: true, Stored: true, Type: "boolean", }, "FirstName": { AllowedChoices: []string{}, BSONFieldName: "firstname", ConvertedName: "FirstName", Description: `The first name.`, Exposed: true, Filterable: true, Name: "firstName", Orderable: true, Required: true, Stored: true, Type: "string", }, "LastName": { AllowedChoices: []string{}, BSONFieldName: "lastname", ConvertedName: "LastName", Description: `The last name.`, Exposed: true, Filterable: true, Name: "lastName", Orderable: true, Required: true, Stored: true, Type: "string", }, "ParentID": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parentid", ConvertedName: "ParentID", Description: `The identifier of the parent of the object.`, Exposed: true, Filterable: true, ForeignKey: true, Name: "parentID", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "ParentType": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parenttype", ConvertedName: "ParentType", Description: `The type of the parent of the object.`, Exposed: true, Filterable: true, Name: "parentType", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "UserName": { AllowedChoices: []string{}, BSONFieldName: "username", ConvertedName: "UserName", Description: `the login.`, Exposed: true, Filterable: true, Name: "userName", Orderable: true, Required: true, Stored: true, Type: "string", }, }
UserAttributesMap represents the map of attribute for User.
var UserIdentity = elemental.Identity{ Name: "user", Category: "users", Package: "todo-list", Private: false, }
UserIdentity represents the Identity of the object.
var UserLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{ "id": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "_id", ConvertedName: "ID", Description: `The identifier.`, Exposed: true, Filterable: true, Identifier: true, Name: "ID", Orderable: true, PrimaryKey: true, ReadOnly: true, Stored: true, Type: "string", }, "archived": { AllowedChoices: []string{}, BSONFieldName: "archived", ConvertedName: "Archived", Description: `the object is archived and not deleted.`, Exposed: true, Getter: true, Name: "archived", Setter: true, Stored: true, Type: "boolean", }, "firstname": { AllowedChoices: []string{}, BSONFieldName: "firstname", ConvertedName: "FirstName", Description: `The first name.`, Exposed: true, Filterable: true, Name: "firstName", Orderable: true, Required: true, Stored: true, Type: "string", }, "lastname": { AllowedChoices: []string{}, BSONFieldName: "lastname", ConvertedName: "LastName", Description: `The last name.`, Exposed: true, Filterable: true, Name: "lastName", Orderable: true, Required: true, Stored: true, Type: "string", }, "parentid": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parentid", ConvertedName: "ParentID", Description: `The identifier of the parent of the object.`, Exposed: true, Filterable: true, ForeignKey: true, Name: "parentID", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "parenttype": { AllowedChoices: []string{}, Autogenerated: true, BSONFieldName: "parenttype", ConvertedName: "ParentType", Description: `The type of the parent of the object.`, Exposed: true, Filterable: true, Name: "parentType", Orderable: true, ReadOnly: true, Stored: true, Type: "string", }, "username": { AllowedChoices: []string{}, BSONFieldName: "username", ConvertedName: "UserName", Description: `the login.`, Exposed: true, Filterable: true, Name: "userName", Orderable: true, Required: true, Stored: true, Type: "string", }, }
UserLowerCaseAttributesMap represents the map of attribute for User.
Functions ¶
func AliasesForIdentity ¶
AliasesForIdentity returns all the aliases for the given identity.
func AllIdentities ¶
AllIdentities returns all existing identities.
func Manager ¶
func Manager() elemental.ModelManager
Manager returns the model elemental.ModelManager.
func ModelVersion ¶
func ModelVersion() float64
ModelVersion returns the current version of the model.
Types ¶
type List ¶
type List struct { // The identifier. ID string `json:"ID" msgpack:"ID" bson:"-" mapstructure:"ID,omitempty"` // This attribute is creation only. CreationOnly string `json:"creationOnly" msgpack:"creationOnly" bson:"creationonly" mapstructure:"creationOnly,omitempty"` // The date. Date time.Time `json:"date" msgpack:"date" bson:"date" mapstructure:"date,omitempty"` // The description. Description string `json:"description" msgpack:"description" bson:"description" mapstructure:"description,omitempty"` // The name. Name string `json:"name" msgpack:"name" bson:"name" mapstructure:"name,omitempty"` // The identifier of the parent of the object. ParentID string `json:"parentID" msgpack:"parentID" bson:"parentid" mapstructure:"parentID,omitempty"` // The type of the parent of the object. ParentType string `json:"parentType" msgpack:"parentType" bson:"parenttype" mapstructure:"parentType,omitempty"` // This attribute is readonly. ReadOnly string `json:"readOnly" msgpack:"readOnly" bson:"readonly" mapstructure:"readOnly,omitempty"` // This attribute is secret. Secret string `json:"secret" msgpack:"secret" bson:"secret" mapstructure:"secret,omitempty"` // this is a slice. Slice []string `json:"slice" msgpack:"slice" bson:"slice" mapstructure:"slice,omitempty"` // This attribute is not exposed. Unexposed string `json:"-" msgpack:"-" bson:"unexposed" mapstructure:"-,omitempty"` ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"` }
List represents the model of a list
func (*List) AttributeSpecifications ¶
func (*List) AttributeSpecifications() map[string]elemental.AttributeSpecification
AttributeSpecifications returns the full attribute specifications map.
func (*List) DeepCopyInto ¶
DeepCopyInto copies the receiver into the given *List.
func (*List) DefaultOrder ¶
DefaultOrder returns the list of default ordering fields.
func (*List) GetBSON ¶ added in v1.95.0
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*List) Identifier ¶
Identifier returns the value of the object's unique identifier.
func (*List) Patch ¶
func (o *List) Patch(sparse elemental.SparseIdentifiable)
Patch apply the non nil value of a *SparseList to the object.
func (*List) SetBSON ¶ added in v1.95.0
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*List) SetIdentifier ¶
SetIdentifier sets the value of the object's unique identifier.
func (*List) SpecificationForAttribute ¶
func (*List) SpecificationForAttribute(name string) elemental.AttributeSpecification
SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.
func (*List) ToSparse ¶
func (o *List) ToSparse(fields ...string) elemental.SparseIdentifiable
ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.
func (*List) ValueForAttribute ¶
ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.
type ListsList ¶
type ListsList []*List
ListsList represents a list of Lists
func (ListsList) Append ¶
func (o ListsList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the ListsList.
func (ListsList) Copy ¶
func (o ListsList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the ListsList.
func (ListsList) DefaultOrder ¶
DefaultOrder returns the default ordering fields of the content.
func (ListsList) List ¶
func (o ListsList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.
type Root ¶
type Root struct {
ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}
Root represents the model of a root
func (*Root) AttributeSpecifications ¶
func (*Root) AttributeSpecifications() map[string]elemental.AttributeSpecification
AttributeSpecifications returns the full attribute specifications map.
func (*Root) DeepCopyInto ¶
DeepCopyInto copies the receiver into the given *Root.
func (*Root) DefaultOrder ¶
DefaultOrder returns the list of default ordering fields.
func (*Root) GetBSON ¶ added in v1.95.0
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*Root) Identifier ¶
Identifier returns the value of the object's unique identifier.
func (*Root) SetBSON ¶ added in v1.95.0
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*Root) SetIdentifier ¶
SetIdentifier sets the value of the object's unique identifier.
func (*Root) SpecificationForAttribute ¶
func (*Root) SpecificationForAttribute(name string) elemental.AttributeSpecification
SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.
func (*Root) ValueForAttribute ¶
ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.
type SparseList ¶
type SparseList struct { // The identifier. ID *string `json:"ID,omitempty" msgpack:"ID,omitempty" bson:"-" mapstructure:"ID,omitempty"` // This attribute is creation only. CreationOnly *string `` /* 130-byte string literal not displayed */ // The date. Date *time.Time `json:"date,omitempty" msgpack:"date,omitempty" bson:"date,omitempty" mapstructure:"date,omitempty"` // The description. Description *string `` /* 126-byte string literal not displayed */ // The name. Name *string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"` // The identifier of the parent of the object. ParentID *string `json:"parentID,omitempty" msgpack:"parentID,omitempty" bson:"parentid,omitempty" mapstructure:"parentID,omitempty"` // The type of the parent of the object. ParentType *string `json:"parentType,omitempty" msgpack:"parentType,omitempty" bson:"parenttype,omitempty" mapstructure:"parentType,omitempty"` // This attribute is readonly. ReadOnly *string `json:"readOnly,omitempty" msgpack:"readOnly,omitempty" bson:"readonly,omitempty" mapstructure:"readOnly,omitempty"` // This attribute is secret. Secret *string `json:"secret,omitempty" msgpack:"secret,omitempty" bson:"secret,omitempty" mapstructure:"secret,omitempty"` // this is a slice. Slice *[]string `json:"slice,omitempty" msgpack:"slice,omitempty" bson:"slice,omitempty" mapstructure:"slice,omitempty"` // This attribute is not exposed. Unexposed *string `json:"-" msgpack:"-" bson:"unexposed,omitempty" mapstructure:"-,omitempty"` ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"` }
SparseList represents the sparse version of a list.
func (*SparseList) DeepCopy ¶
func (o *SparseList) DeepCopy() *SparseList
DeepCopy returns a deep copy if the SparseList.
func (*SparseList) DeepCopyInto ¶
func (o *SparseList) DeepCopyInto(out *SparseList)
DeepCopyInto copies the receiver into the given *SparseList.
func (*SparseList) GetBSON ¶ added in v1.95.0
func (o *SparseList) GetBSON() (any, error)
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*SparseList) GetName ¶
func (o *SparseList) GetName() (out string)
GetName returns the Name of the receiver.
func (*SparseList) Identifier ¶
func (o *SparseList) Identifier() string
Identifier returns the value of the sparse object's unique identifier.
func (*SparseList) Identity ¶
func (o *SparseList) Identity() elemental.Identity
Identity returns the Identity of the sparse object.
func (*SparseList) SetBSON ¶ added in v1.95.0
func (o *SparseList) SetBSON(raw bson.Raw) error
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*SparseList) SetIdentifier ¶
func (o *SparseList) SetIdentifier(id string)
SetIdentifier sets the value of the sparse object's unique identifier.
func (*SparseList) SetName ¶
func (o *SparseList) SetName(name string)
SetName sets the property Name of the receiver using the address of the given value.
func (*SparseList) ToPlain ¶
func (o *SparseList) ToPlain() elemental.PlainIdentifiable
ToPlain returns the plain version of the sparse model.
func (*SparseList) Version ¶
func (o *SparseList) Version() int
Version returns the hardcoded version of the model.
type SparseListsList ¶
type SparseListsList []*SparseList
SparseListsList represents a list of SparseLists
func (SparseListsList) Append ¶
func (o SparseListsList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the SparseListsList.
func (SparseListsList) Copy ¶
func (o SparseListsList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the SparseListsList.
func (SparseListsList) DefaultOrder ¶
func (o SparseListsList) DefaultOrder() []string
DefaultOrder returns the default ordering fields of the content.
func (SparseListsList) Identity ¶
func (o SparseListsList) Identity() elemental.Identity
Identity returns the identity of the objects in the list.
func (SparseListsList) List ¶
func (o SparseListsList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.
func (SparseListsList) ToPlain ¶
func (o SparseListsList) ToPlain() elemental.IdentifiablesList
ToPlain returns the SparseListsList converted to ListsList.
func (SparseListsList) Version ¶
func (o SparseListsList) Version() int
Version returns the version of the content.
type SparseTask ¶
type SparseTask struct { // The identifier. ID *string `json:"ID,omitempty" msgpack:"ID,omitempty" bson:"-" mapstructure:"ID,omitempty"` // The description. Description *string `` /* 126-byte string literal not displayed */ // The name. Name *string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"` // The identifier of the parent of the object. ParentID *string `json:"parentID,omitempty" msgpack:"parentID,omitempty" bson:"parentid,omitempty" mapstructure:"parentID,omitempty"` // The type of the parent of the object. ParentType *string `json:"parentType,omitempty" msgpack:"parentType,omitempty" bson:"parenttype,omitempty" mapstructure:"parentType,omitempty"` // The status of the task. Status *TaskStatusValue `json:"status,omitempty" msgpack:"status,omitempty" bson:"status,omitempty" mapstructure:"status,omitempty"` ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"` }
SparseTask represents the sparse version of a task.
func (*SparseTask) DeepCopy ¶
func (o *SparseTask) DeepCopy() *SparseTask
DeepCopy returns a deep copy if the SparseTask.
func (*SparseTask) DeepCopyInto ¶
func (o *SparseTask) DeepCopyInto(out *SparseTask)
DeepCopyInto copies the receiver into the given *SparseTask.
func (*SparseTask) GetBSON ¶ added in v1.95.0
func (o *SparseTask) GetBSON() (any, error)
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*SparseTask) GetName ¶
func (o *SparseTask) GetName() (out string)
GetName returns the Name of the receiver.
func (*SparseTask) Identifier ¶
func (o *SparseTask) Identifier() string
Identifier returns the value of the sparse object's unique identifier.
func (*SparseTask) Identity ¶
func (o *SparseTask) Identity() elemental.Identity
Identity returns the Identity of the sparse object.
func (*SparseTask) SetBSON ¶ added in v1.95.0
func (o *SparseTask) SetBSON(raw bson.Raw) error
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*SparseTask) SetIdentifier ¶
func (o *SparseTask) SetIdentifier(id string)
SetIdentifier sets the value of the sparse object's unique identifier.
func (*SparseTask) SetName ¶
func (o *SparseTask) SetName(name string)
SetName sets the property Name of the receiver using the address of the given value.
func (*SparseTask) ToPlain ¶
func (o *SparseTask) ToPlain() elemental.PlainIdentifiable
ToPlain returns the plain version of the sparse model.
func (*SparseTask) Version ¶
func (o *SparseTask) Version() int
Version returns the hardcoded version of the model.
type SparseTasksList ¶
type SparseTasksList []*SparseTask
SparseTasksList represents a list of SparseTasks
func (SparseTasksList) Append ¶
func (o SparseTasksList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the SparseTasksList.
func (SparseTasksList) Copy ¶
func (o SparseTasksList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the SparseTasksList.
func (SparseTasksList) DefaultOrder ¶
func (o SparseTasksList) DefaultOrder() []string
DefaultOrder returns the default ordering fields of the content.
func (SparseTasksList) Identity ¶
func (o SparseTasksList) Identity() elemental.Identity
Identity returns the identity of the objects in the list.
func (SparseTasksList) List ¶
func (o SparseTasksList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.
func (SparseTasksList) ToPlain ¶
func (o SparseTasksList) ToPlain() elemental.IdentifiablesList
ToPlain returns the SparseTasksList converted to TasksList.
func (SparseTasksList) Version ¶
func (o SparseTasksList) Version() int
Version returns the version of the content.
type SparseUser ¶
type SparseUser struct { // The identifier. ID *string `json:"ID,omitempty" msgpack:"ID,omitempty" bson:"-" mapstructure:"ID,omitempty"` // the object is archived and not deleted. Archived *bool `json:"archived,omitempty" msgpack:"archived,omitempty" bson:"archived,omitempty" mapstructure:"archived,omitempty"` // The first name. FirstName *string `json:"firstName,omitempty" msgpack:"firstName,omitempty" bson:"firstname,omitempty" mapstructure:"firstName,omitempty"` // The last name. LastName *string `json:"lastName,omitempty" msgpack:"lastName,omitempty" bson:"lastname,omitempty" mapstructure:"lastName,omitempty"` // The identifier of the parent of the object. ParentID *string `json:"parentID,omitempty" msgpack:"parentID,omitempty" bson:"parentid,omitempty" mapstructure:"parentID,omitempty"` // The type of the parent of the object. ParentType *string `json:"parentType,omitempty" msgpack:"parentType,omitempty" bson:"parenttype,omitempty" mapstructure:"parentType,omitempty"` // the login. UserName *string `json:"userName,omitempty" msgpack:"userName,omitempty" bson:"username,omitempty" mapstructure:"userName,omitempty"` ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"` }
SparseUser represents the sparse version of a user.
func (*SparseUser) DeepCopy ¶
func (o *SparseUser) DeepCopy() *SparseUser
DeepCopy returns a deep copy if the SparseUser.
func (*SparseUser) DeepCopyInto ¶
func (o *SparseUser) DeepCopyInto(out *SparseUser)
DeepCopyInto copies the receiver into the given *SparseUser.
func (*SparseUser) GetArchived ¶ added in v1.100.1
func (o *SparseUser) GetArchived() (out bool)
GetArchived returns the Archived of the receiver.
func (*SparseUser) GetBSON ¶ added in v1.95.0
func (o *SparseUser) GetBSON() (any, error)
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*SparseUser) Identifier ¶
func (o *SparseUser) Identifier() string
Identifier returns the value of the sparse object's unique identifier.
func (*SparseUser) Identity ¶
func (o *SparseUser) Identity() elemental.Identity
Identity returns the Identity of the sparse object.
func (*SparseUser) SetArchived ¶ added in v1.100.1
func (o *SparseUser) SetArchived(archived bool)
SetArchived sets the property Archived of the receiver using the address of the given value.
func (*SparseUser) SetBSON ¶ added in v1.95.0
func (o *SparseUser) SetBSON(raw bson.Raw) error
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*SparseUser) SetIdentifier ¶
func (o *SparseUser) SetIdentifier(id string)
SetIdentifier sets the value of the sparse object's unique identifier.
func (*SparseUser) ToPlain ¶
func (o *SparseUser) ToPlain() elemental.PlainIdentifiable
ToPlain returns the plain version of the sparse model.
func (*SparseUser) Version ¶
func (o *SparseUser) Version() int
Version returns the hardcoded version of the model.
type SparseUsersList ¶
type SparseUsersList []*SparseUser
SparseUsersList represents a list of SparseUsers
func (SparseUsersList) Append ¶
func (o SparseUsersList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the SparseUsersList.
func (SparseUsersList) Copy ¶
func (o SparseUsersList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the SparseUsersList.
func (SparseUsersList) DefaultOrder ¶
func (o SparseUsersList) DefaultOrder() []string
DefaultOrder returns the default ordering fields of the content.
func (SparseUsersList) Identity ¶
func (o SparseUsersList) Identity() elemental.Identity
Identity returns the identity of the objects in the list.
func (SparseUsersList) List ¶
func (o SparseUsersList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.
func (SparseUsersList) ToPlain ¶
func (o SparseUsersList) ToPlain() elemental.IdentifiablesList
ToPlain returns the SparseUsersList converted to UsersList.
func (SparseUsersList) Version ¶
func (o SparseUsersList) Version() int
Version returns the version of the content.
type Task ¶
type Task struct { // The identifier. ID string `json:"ID" msgpack:"ID" bson:"-" mapstructure:"ID,omitempty"` // The description. Description string `json:"description" msgpack:"description" bson:"description" mapstructure:"description,omitempty"` // The name. Name string `json:"name" msgpack:"name" bson:"name" mapstructure:"name,omitempty"` // The identifier of the parent of the object. ParentID string `json:"parentID" msgpack:"parentID" bson:"parentid" mapstructure:"parentID,omitempty"` // The type of the parent of the object. ParentType string `json:"parentType" msgpack:"parentType" bson:"parenttype" mapstructure:"parentType,omitempty"` // The status of the task. Status TaskStatusValue `json:"status" msgpack:"status" bson:"status" mapstructure:"status,omitempty"` ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"` }
Task represents the model of a task
func (*Task) AttributeSpecifications ¶
func (*Task) AttributeSpecifications() map[string]elemental.AttributeSpecification
AttributeSpecifications returns the full attribute specifications map.
func (*Task) DeepCopyInto ¶
DeepCopyInto copies the receiver into the given *Task.
func (*Task) DefaultOrder ¶
DefaultOrder returns the list of default ordering fields.
func (*Task) GetBSON ¶ added in v1.95.0
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*Task) Identifier ¶
Identifier returns the value of the object's unique identifier.
func (*Task) Patch ¶
func (o *Task) Patch(sparse elemental.SparseIdentifiable)
Patch apply the non nil value of a *SparseTask to the object.
func (*Task) SetBSON ¶ added in v1.95.0
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*Task) SetIdentifier ¶
SetIdentifier sets the value of the object's unique identifier.
func (*Task) SpecificationForAttribute ¶
func (*Task) SpecificationForAttribute(name string) elemental.AttributeSpecification
SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.
func (*Task) ToSparse ¶
func (o *Task) ToSparse(fields ...string) elemental.SparseIdentifiable
ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.
func (*Task) ValueForAttribute ¶
ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.
type TaskStatusValue ¶
type TaskStatusValue string
TaskStatusValue represents the possible values for attribute "status".
const ( // TaskStatusDONE represents the value DONE. TaskStatusDONE TaskStatusValue = "DONE" // TaskStatusPROGRESS represents the value PROGRESS. TaskStatusPROGRESS TaskStatusValue = "PROGRESS" // TaskStatusTODO represents the value TODO. TaskStatusTODO TaskStatusValue = "TODO" )
type TasksList ¶
type TasksList []*Task
TasksList represents a list of Tasks
func (TasksList) Append ¶
func (o TasksList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the TasksList.
func (TasksList) Copy ¶
func (o TasksList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the TasksList.
func (TasksList) DefaultOrder ¶
DefaultOrder returns the default ordering fields of the content.
func (TasksList) List ¶
func (o TasksList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.
type UnmarshalableError ¶
An UnmarshalableError is a List that cannot be marshalled or unmarshalled.
func (*UnmarshalableError) MarshalJSON ¶
func (o *UnmarshalableError) MarshalJSON() ([]byte, error)
MarshalJSON makes the UnmarshalableError not marshalable.
func (*UnmarshalableError) MarshalMsgpack ¶
func (o *UnmarshalableError) MarshalMsgpack() ([]byte, error)
MarshalMsgpack makes the UnmarshalableError not marshalable.
func (*UnmarshalableError) UnmarshalJSON ¶
func (o *UnmarshalableError) UnmarshalJSON([]byte) error
UnmarshalJSON makes the UnmarshalableError not unmarshalable.
func (*UnmarshalableError) UnmarshalMsgpack ¶
func (o *UnmarshalableError) UnmarshalMsgpack([]byte) error
UnmarshalMsgpack makes the UnmarshalableError not unmarshalable.
type UnmarshalableList ¶
type UnmarshalableList struct {
List
}
An UnmarshalableList is a List that cannot be marshalled or unmarshalled.
func NewUnmarshalableList ¶
func NewUnmarshalableList() *UnmarshalableList
NewUnmarshalableList returns a new UnmarshalableList.
func (*UnmarshalableList) Identity ¶
func (o *UnmarshalableList) Identity() elemental.Identity
Identity returns the identity.
func (*UnmarshalableList) MarshalJSON ¶
func (o *UnmarshalableList) MarshalJSON() ([]byte, error)
MarshalJSON makes the UnmarshalableList not marshalable.
func (*UnmarshalableList) MarshalMsgpack ¶
func (o *UnmarshalableList) MarshalMsgpack() ([]byte, error)
MarshalMsgpack makes the UnmarshalableList not marshalable.
func (*UnmarshalableList) UnmarshalJSON ¶
func (o *UnmarshalableList) UnmarshalJSON([]byte) error
UnmarshalJSON makes the UnmarshalableList not unmarshalable.
func (*UnmarshalableList) UnmarshalMsgpack ¶
func (o *UnmarshalableList) UnmarshalMsgpack([]byte) error
UnmarshalMsgpack makes the UnmarshalableList not unmarshalable.
func (*UnmarshalableList) Validate ¶
func (o *UnmarshalableList) Validate() elemental.Errors
Validate validates the data
type UnmarshalableListsList ¶
type UnmarshalableListsList []*UnmarshalableList
UnmarshalableListsList represents a list of UnmarshalableLists
func (UnmarshalableListsList) Append ¶
func (o UnmarshalableListsList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the UnmarshalableListsList.
func (UnmarshalableListsList) Copy ¶
func (o UnmarshalableListsList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the UnmarshalableListsList.
func (UnmarshalableListsList) DefaultOrder ¶
func (o UnmarshalableListsList) DefaultOrder() []string
DefaultOrder returns the default ordering fields of the content.
func (UnmarshalableListsList) Identity ¶
func (o UnmarshalableListsList) Identity() elemental.Identity
Identity returns the identity of the objects in the list.
func (UnmarshalableListsList) List ¶
func (o UnmarshalableListsList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.
func (UnmarshalableListsList) Version ¶
func (o UnmarshalableListsList) Version() int
Version returns the version of the content.
type User ¶
type User struct { // The identifier. ID string `json:"ID" msgpack:"ID" bson:"-" mapstructure:"ID,omitempty"` // the object is archived and not deleted. Archived bool `json:"archived" msgpack:"archived" bson:"archived" mapstructure:"archived,omitempty"` // The first name. FirstName string `json:"firstName" msgpack:"firstName" bson:"firstname" mapstructure:"firstName,omitempty"` // The last name. LastName string `json:"lastName" msgpack:"lastName" bson:"lastname" mapstructure:"lastName,omitempty"` // The identifier of the parent of the object. ParentID string `json:"parentID" msgpack:"parentID" bson:"parentid" mapstructure:"parentID,omitempty"` // The type of the parent of the object. ParentType string `json:"parentType" msgpack:"parentType" bson:"parenttype" mapstructure:"parentType,omitempty"` // the login. UserName string `json:"userName" msgpack:"userName" bson:"username" mapstructure:"userName,omitempty"` ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"` }
User represents the model of a user
func (*User) AttributeSpecifications ¶
func (*User) AttributeSpecifications() map[string]elemental.AttributeSpecification
AttributeSpecifications returns the full attribute specifications map.
func (*User) DeepCopyInto ¶
DeepCopyInto copies the receiver into the given *User.
func (*User) DefaultOrder ¶
DefaultOrder returns the list of default ordering fields.
func (*User) GetArchived ¶ added in v1.100.1
GetArchived returns the Archived of the receiver.
func (*User) GetBSON ¶ added in v1.95.0
GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*User) Identifier ¶
Identifier returns the value of the object's unique identifier.
func (*User) Patch ¶
func (o *User) Patch(sparse elemental.SparseIdentifiable)
Patch apply the non nil value of a *SparseUser to the object.
func (*User) SetArchived ¶ added in v1.100.1
SetArchived sets the property Archived of the receiver using the given value.
func (*User) SetBSON ¶ added in v1.95.0
SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.
func (*User) SetIdentifier ¶
SetIdentifier sets the value of the object's unique identifier.
func (*User) SpecificationForAttribute ¶
func (*User) SpecificationForAttribute(name string) elemental.AttributeSpecification
SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.
func (*User) ToSparse ¶
func (o *User) ToSparse(fields ...string) elemental.SparseIdentifiable
ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.
func (*User) ValueForAttribute ¶
ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.
type UsersList ¶
type UsersList []*User
UsersList represents a list of Users
func (UsersList) Append ¶
func (o UsersList) Append(objects ...elemental.Identifiable) elemental.Identifiables
Append appends the objects to the a new copy of the UsersList.
func (UsersList) Copy ¶
func (o UsersList) Copy() elemental.Identifiables
Copy returns a pointer to a copy the UsersList.
func (UsersList) DefaultOrder ¶
DefaultOrder returns the default ordering fields of the content.
func (UsersList) List ¶
func (o UsersList) List() elemental.IdentifiablesList
List converts the object to an elemental.IdentifiablesList.