Documentation
¶
Index ¶
Constants ¶
const ( // StructTag Annotation strings AnnotationNeuron = "neuron" // type tag AnnotationPrimary = "primary" AnnotationPrimaryFull = "primary_key" AnnotationPrimaryFullS = "primarykey" AnnotationID = "id" AnnotationClientID = "client-id" AnnotationLanguage = "langtag" // attributes AnnotationAttribute = "attr" AnnotationAttributeFull = "attribute" AnnotationRelation = "relation" AnnotationRelationFull = "relationship" AnnotationFilterKey = "filterkey" AnnotationForeignKey = "foreign" AnnotationForeignKeyFull = "foreign_key" AnnotationForeignKeyFullS = "foreignkey" AnnotationNestedField = "nested" // relation tag AnnotationManyToMany = "many2many" AnnotationRelationRestrict = "restrict" AnnotationRelationNoAction = "no-action" AnnotationRelationCascade = "cascade" AnnotationRelationSetNull = "set-null" AnnotationDefault = "default" // name tag AnnotationName = "name" // flags tag AnnotationHidden = "hidden" AnnotationISO8601 = "iso8601" AnnotationOmitEmpty = "omitempty" AnnotationI18n = "i18n" AnnotationFieldType = "type" AnnotationFlags = "flags" AnnotationNoFilter = "nofilter" AnnotationNotSortable = "nosort" AnnotationSeperator = "," AnnotationRelationSeperator = ":" AnnotationTagSeperator = ";" AnnotationTagEqual = '=' AnnotationNestedSeperator = "." AnnotationOpenedBracket = '[' AnnotationClosedBracket = ']' IsPointerTime = "jsonapi:is-ptr-time" )
constants defined for the internal neuron packages
Variables ¶
var ( // ControllerStoreKey is the store key used to store the controller. ControllerStoreKey = ControllerStoreKeyStruct{} // TxStateStoreKey is the store key used to store the scope's transaction. TxStateStoreKey = TxStateStoreStruct{} // ReducedPrimariesStoreKey is the store key used to store the reduced scope primary values. ReducedPrimariesStoreKey = ReducedPrimariesStoreStruct{} // PrimariesAlreadyChecked is the store key flag value used to notify that the primaries for given process chain were already checked. PrimariesAlreadyChecked = primariesChecked{} // PreviousProcessStoreKey is the store key used to indicate what was the previous query process. PreviousProcessStoreKey = PreviousProcess{} // AutoBeginStoreKey is the key that defines if query were started with begin_transaction process. AutoBeginStoreKey = autoBegin{} // JustCreated is the store key that defines that the root scope's process is just after the creation process. JustCreated = created{} )
Store keys
var Processes = make(map[string]struct{})
Processes is a mapping of the already registered query processes name.
Functions ¶
This section is empty.
Types ¶
type AttributeGetter ¶ added in v0.2.1
type AttributeGetter interface {
GetAttribute(name string) interface{}
}
AttributeGetter is the interface used to get the attribute value from the model instance.
type AttributeModel ¶ added in v0.2.1
type AttributeModel interface { AttributeGetter AttributeSetter }
AttributeModel is the interface used for models that are allowed to get and set their attribute fields.
type AttributeSetter ¶ added in v0.2.1
AttributeSetter sets the attribute value for given model instance.
type ControllerStoreKeyStruct ¶ added in v0.2.1
type ControllerStoreKeyStruct struct{}
ControllerStoreKeyStruct is the common struct used as a controller's key in the Stores
type ForeignKeyGetter ¶ added in v0.2.1
type ForeignKeyGetter interface {
GetForeignKey(name string) interface{}
}
ForeignKeyGetter is the interface used to get the value of the foreign key field with given name from the model instance.
type ForeignKeyModel ¶ added in v0.2.1
type ForeignKeyModel interface { ForeignKeyGetter ForeignKeySetter }
ForeignKeyModel is the interface used for getting and setting the value of foreign key fields for given model.
type ForeignKeySetter ¶ added in v0.2.1
ForeignKeySetter is the interface used to set the value of the foreign key field for the provided name for the model instance
type IDGetter ¶ added in v0.2.1
type IDGetter interface {
GetID() interface{}
}
IDGetter is the interface used to get the ID from the model instance.
type IDModel ¶ added in v0.2.1
IDModel is the interface that is allowed to get and set the ID field.
type IDSetter ¶ added in v0.2.1
type IDSetter interface {
SetID(id interface{}) error
}
IDSetter is the interface used to set the ID for the model instance.
type PreviousProcess ¶ added in v0.2.1
type PreviousProcess struct{}
PreviousProcess is a struct used as the Store key for getting the previous process
type ReducedPrimariesStoreStruct ¶ added in v0.2.1
type ReducedPrimariesStoreStruct struct{}
ReducedPrimariesStoreStruct is the Store key that keeps the primary values in the patch scope
type TxStateStoreStruct ¶ added in v0.2.1
type TxStateStoreStruct struct{}
TxStateStoreStruct is the common struct used as a transaction state key in the scope's Store