Documentation ¶
Index ¶
- Constants
- type BaseController
- func (ctrl *BaseController) GetStore() boltz.CrudStore
- func (ctrl *BaseController) ListWithTx(tx *bbolt.Tx, queryString string, resultHandler ListResultHandler) error
- func (ctrl *BaseController) PreparedListAssociatedWithTx(tx *bbolt.Tx, id, association string, query ast.Query, ...) error
- func (ctrl *BaseController) PreparedListIndexedWithTx(tx *bbolt.Tx, cursorProvider ast.SetCursorProvider, query ast.Query, ...) error
- func (ctrl *BaseController) PreparedListWithTx(tx *bbolt.Tx, query ast.Query, resultHandler ListResultHandler) error
- func (ctrl *BaseController) ValidateNameOnUpdate(ctx boltz.MutateContext, updatedEntity, existingEntity boltz.Entity, ...) error
- type BaseEntity
- func (entity *BaseEntity) FillCommon(boltEntity boltz.ExtEntity)
- func (entity *BaseEntity) GetCreatedAt() time.Time
- func (entity *BaseEntity) GetId() string
- func (entity *BaseEntity) GetTags() map[string]interface{}
- func (entity *BaseEntity) GetUpdatedAt() time.Time
- func (entity *BaseEntity) IsSystemEntity() bool
- func (entity *BaseEntity) SetId(id string)
- type Entity
- type EntityListResult
- type EntityRetriever
- type FieldError
- type ListResultHandler
- type QueryMetaData
Constants ¶
View Source
const ( ListLimitMax = 500 ListOffsetMax = 100000 ListLimitDefault = 10 ListOffsetDefault = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
func (*BaseController) GetStore ¶
func (ctrl *BaseController) GetStore() boltz.CrudStore
func (*BaseController) ListWithTx ¶
func (ctrl *BaseController) ListWithTx(tx *bbolt.Tx, queryString string, resultHandler ListResultHandler) error
func (*BaseController) PreparedListAssociatedWithTx ¶
func (ctrl *BaseController) PreparedListAssociatedWithTx(tx *bbolt.Tx, id, association string, query ast.Query, resultHandler ListResultHandler) error
func (*BaseController) PreparedListIndexedWithTx ¶
func (ctrl *BaseController) PreparedListIndexedWithTx(tx *bbolt.Tx, cursorProvider ast.SetCursorProvider, query ast.Query, resultHandler ListResultHandler) error
func (*BaseController) PreparedListWithTx ¶
func (ctrl *BaseController) PreparedListWithTx(tx *bbolt.Tx, query ast.Query, resultHandler ListResultHandler) error
func (*BaseController) ValidateNameOnUpdate ¶ added in v0.17.0
func (ctrl *BaseController) ValidateNameOnUpdate(ctx boltz.MutateContext, updatedEntity, existingEntity boltz.Entity, checker boltz.FieldChecker) error
type BaseEntity ¶
type BaseEntity struct { Id string CreatedAt time.Time UpdatedAt time.Time Tags map[string]interface{} IsSystem bool }
func (*BaseEntity) FillCommon ¶
func (entity *BaseEntity) FillCommon(boltEntity boltz.ExtEntity)
func (*BaseEntity) GetCreatedAt ¶
func (entity *BaseEntity) GetCreatedAt() time.Time
func (*BaseEntity) GetId ¶
func (entity *BaseEntity) GetId() string
func (*BaseEntity) GetTags ¶
func (entity *BaseEntity) GetTags() map[string]interface{}
func (*BaseEntity) GetUpdatedAt ¶
func (entity *BaseEntity) GetUpdatedAt() time.Time
func (*BaseEntity) IsSystemEntity ¶ added in v0.16.45
func (entity *BaseEntity) IsSystemEntity() bool
func (*BaseEntity) SetId ¶
func (entity *BaseEntity) SetId(id string)
type EntityListResult ¶
type EntityListResult struct { Loader EntityRetriever Entities []Entity QueryMetaData }
func (*EntityListResult) Collect ¶
func (result *EntityListResult) Collect(tx *bbolt.Tx, ids []string, queryMetaData *QueryMetaData) error
func (*EntityListResult) GetEntities ¶
func (result *EntityListResult) GetEntities() []Entity
func (*EntityListResult) GetMetaData ¶
func (result *EntityListResult) GetMetaData() *QueryMetaData
type EntityRetriever ¶
type EntityRetriever interface { BaseLoad(id string) (Entity, error) BaseLoadInTx(tx *bbolt.Tx, id string) (Entity, error) BaseList(query string) (*EntityListResult, error) BasePreparedList(query ast.Query) (*EntityListResult, error) BasePreparedListAssociated(id string, typeLoader EntityRetriever, query ast.Query) (*EntityListResult, error) GetStore() boltz.CrudStore }
type FieldError ¶
func NewFieldError ¶
func NewFieldError(reason, name string, value interface{}) *FieldError
func (FieldError) Error ¶
func (fe FieldError) Error() string
type ListResultHandler ¶
type ListResultHandler func(tx *bbolt.Tx, ids []string, qmd *QueryMetaData) error
Click to show internal directories.
Click to hide internal directories.