Documentation
¶
Index ¶
- Constants
- type Comp
- type CompOption
- type Core
- func (c *Core) GetEntityID() contract.ID
- func (c *Core) GetOwners() []contract.ID
- func (c *Core) GetReaders() []contract.ID
- func (c *Core) GetWriters() []contract.ID
- func (c *Core) SetEntityID(x contract.ID)
- func (c *Core) SetOwners(x []contract.ID)
- func (c *Core) SetReaders(x []contract.ID)
- func (c *Core) SetWriters(x []contract.ID)
- type CoreOption
- type Entity
- func (r *Entity) GetID() contract.ID
- func (r *Entity) Owners() []contract.ID
- func (r *Entity) Readers() []contract.ID
- func (r *Entity) Rules() contract.QueryParamRules
- func (r *Entity) Scope() contract.Scope
- func (r *Entity) SearchIn() []string
- func (r *Entity) SortBy() string
- func (r *Entity) Writers() []contract.ID
- type Meta
- type MetaOption
Constants ¶
View Source
const ( EntityIDKey = "entity_id" ReadersKey = "readers" WritersKey = "writers" OwnersKey = "owners" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comp ¶
type Comp struct{}
func ApplyComp ¶
func ApplyComp(c *Comp, modifiers ...CompOption) Comp
type CompOption ¶
type CompOption = contract.CompOption[Comp]
type Core ¶
type Core struct {
EntityID *contract.ID `json:"entity_id" validate:"nnpt,nz"`
Readers *[]contract.ID `json:"readers" validate:"nnpt,nz"`
Writers *[]contract.ID `json:"writers" validate:"nnpt,nz"`
Owners *[]contract.ID `json:"owners" validate:"nnpt,nz"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetEntityID ¶
func (*Core) GetReaders ¶
func (*Core) GetWriters ¶
func (*Core) SetEntityID ¶
func (*Core) SetReaders ¶
func (*Core) SetWriters ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithEntityID ¶
func WithEntityID(x contract.ID) CoreOption
func WithOwners ¶
func WithOwners(x []contract.ID) CoreOption
func WithReaders ¶
func WithReaders(x []contract.ID) CoreOption
func WithWriters ¶
func WithWriters(x []contract.ID) CoreOption
type Entity ¶
Entity represents an entity with its authorization data.
func (*Entity) Rules ¶ added in v0.0.11
func (r *Entity) Rules() contract.QueryParamRules
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
func WithCommon ¶
func WithCommon(x common.Common) MetaOption
Click to show internal directories.
Click to hide internal directories.