Package entitlements
import "bitbucket.org/twicedb/twicedb-go/shared/entitlements"
- Overview
- Index
Package entitlements provides methods for adding and modifying entitlements
to data stored in TwiceDB.
- Constants
- func ReadEntitlementByObjectIdAsync(c api.Client, tc *shared.TemporalCoordinates, oid shared.ObjectId) chan *Entitlement
- type Entitlement
- func NewEntitlement(entitlementID EntitlementId, clientCommonName shared.ClientCommonName, emailAddress shared.EmailAddress, entitledFqn shared.Fqn, read bool, write bool, entitle bool) *Entitlement
- func NewEntitlementWithObjectId(entitlementID EntitlementId, clientCommonName shared.ClientCommonName, emailAddress shared.EmailAddress, entitledFqn shared.Fqn, read bool, write bool, entitle bool, objectId shared.ObjectId) *Entitlement
- func ReadEntitlementByObjectId(c api.Client, tc *shared.TemporalCoordinates, oid shared.ObjectId) (*Entitlement, error)
- func (o *Entitlement) DeleteObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)
- func (o *Entitlement) DeleteObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
- func (e *Entitlement) EmailAddressAndEntitledFqn() *string
- func (o *Entitlement) EnsureCanProjectField(field string, op api.ProjectOp)
- func (o *Entitlement) EnsureCanQueryField(field string)
- func (o *Entitlement) Fqn() shared.Fqn
- func (o *Entitlement) GenerateObjectId() shared.ObjectId
- func (o *Entitlement) GetEvent(c api.Client) (shared.Event, error)
- func (o *Entitlement) GetEventAsync(c api.Client) chan shared.Event
- func (o *Entitlement) IndexedQuery() *api.IndexedQuery
- func (o *Entitlement) ProjectedFields() map[shared.ProjectedFieldKey]*shared.ProjectedFieldValue
- func (o *Entitlement) PutObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)
- func (o *Entitlement) PutObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
- func (o *Entitlement) ReadIQuery(c api.Client, iq *api.IndexedQuery, tc *shared.TemporalCoordinates) ([]*Entitlement, error)
- func (o *Entitlement) ReadIQueryAsync(c api.Client, iq *api.IndexedQuery, tc *shared.TemporalCoordinates) chan *Entitlement
- func (o *Entitlement) ReadObject(c api.Client, tc *shared.TemporalCoordinates) (*Entitlement, error)
- func (o *Entitlement) ReadObjectAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement
- func (o *Entitlement) ReadObjects(c api.Client, tc *shared.TemporalCoordinates) ([]*Entitlement, error)
- func (o *Entitlement) ReadObjectsAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement
- func (o *Entitlement) ReadObjectsAtTt(c api.Client, tt shared.Tt) ([]*Entitlement, error)
- func (o *Entitlement) ReadObjectsAtTtAsync(c api.Client, tt shared.Tt) chan *Entitlement
- func (o *Entitlement) ReadObjectsAtVt(c api.Client, tc *shared.TemporalCoordinates) ([]*Entitlement, error)
- func (o *Entitlement) ReadObjectsAtVtAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement
- func (o *Entitlement) ReindexObject(c api.Client) (*cshared.WrittenObject, error)
- func (o *Entitlement) ReindexObjectAsync(c api.Client) chan cshared.WriteAsyncResponse
- func (o *Entitlement) ReinstateObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)
- func (o *Entitlement) ReinstateObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
- func (e *Entitlement) String() string
- type EntitlementId
- func GenerateEntitlementId() EntitlementId
- type EntitlementIndexedQueryBuilder
- func NewEntitlementIndexedQueryBuilder() *EntitlementIndexedQueryBuilder
- func (b *EntitlementIndexedQueryBuilder) Build() *api.IndexedQuery
- func (b *EntitlementIndexedQueryBuilder) Count(c api.Client, tc *shared.TemporalCoordinates) (*big.Int, bool, error)
- func (b *EntitlementIndexedQueryBuilder) CountAsync(c api.Client, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
- func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnEq(o any) *EntitlementIndexedQueryBuilder
- func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGt(o any) *EntitlementIndexedQueryBuilder
- func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGte(o any) *EntitlementIndexedQueryBuilder
- func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLt(o any) *EntitlementIndexedQueryBuilder
- func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLte(o any) *EntitlementIndexedQueryBuilder
- type EntitlementIterator
- func NewEntitlementIterator(client api.Client, batchSize shared.BatchSize, maxTtFrom shared.Tt) *EntitlementIterator
- func (it *EntitlementIterator) HasNext() (bool, error)
- func (it *EntitlementIterator) Next() (*Entitlement, error)
Package files
doc.go
entitlement.go
entitlement_constructor.go
entitlement_id.go
entitlement_object_accessors.go
Constants
const (
NullEntitlementId = EntitlementId("")
)
func ReadEntitlementByObjectIdAsync(c api.Client, tc *shared.TemporalCoordinates, oid shared.ObjectId) chan *Entitlement
type Entitlement struct {
api.IndexableF
EntitlementId EntitlementId
ClientCommonName shared.ClientCommonName
EmailAddress shared.EmailAddress
EntitledFqn shared.Fqn
Read bool
Write bool
Entitle bool
}
func NewEntitlement(
entitlementID EntitlementId,
clientCommonName shared.ClientCommonName,
emailAddress shared.EmailAddress,
entitledFqn shared.Fqn,
read bool,
write bool,
entitle bool,
) *Entitlement
func NewEntitlementWithObjectId(
entitlementID EntitlementId,
clientCommonName shared.ClientCommonName,
emailAddress shared.EmailAddress,
entitledFqn shared.Fqn,
read bool,
write bool,
entitle bool,
objectId shared.ObjectId,
) *Entitlement
func ReadEntitlementByObjectId(c api.Client, tc *shared.TemporalCoordinates, oid shared.ObjectId) (*Entitlement, error)
func (o *Entitlement) DeleteObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)
func (o *Entitlement) DeleteObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
func (e *Entitlement) EmailAddressAndEntitledFqn() *string
func (o *Entitlement) EnsureCanProjectField(field string, op api.ProjectOp)
func (o *Entitlement) EnsureCanQueryField(field string)
func (*Entitlement) Fqn
¶
func (o *Entitlement) Fqn() shared.Fqn
func (o *Entitlement) GenerateObjectId() shared.ObjectId
func (*Entitlement) GetEvent
¶
func (o *Entitlement) GetEvent(c api.Client) (shared.Event, error)
func (o *Entitlement) GetEventAsync(c api.Client) chan shared.Event
func (o *Entitlement) IndexedQuery() *api.IndexedQuery
func (o *Entitlement) ProjectedFields() map[shared.ProjectedFieldKey]*shared.ProjectedFieldValue
func (*Entitlement) PutObject
¶
func (o *Entitlement) PutObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)
func (o *Entitlement) PutObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
func (o *Entitlement) ReadIQuery(c api.Client, iq *api.IndexedQuery, tc *shared.TemporalCoordinates) ([]*Entitlement, error)
func (o *Entitlement) ReadIQueryAsync(c api.Client, iq *api.IndexedQuery, tc *shared.TemporalCoordinates) chan *Entitlement
func (o *Entitlement) ReadObject(c api.Client, tc *shared.TemporalCoordinates) (*Entitlement, error)
func (o *Entitlement) ReadObjectAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement
func (o *Entitlement) ReadObjects(c api.Client, tc *shared.TemporalCoordinates) ([]*Entitlement, error)
func (o *Entitlement) ReadObjectsAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement
func (o *Entitlement) ReadObjectsAtTt(c api.Client, tt shared.Tt) ([]*Entitlement, error)
func (o *Entitlement) ReadObjectsAtTtAsync(c api.Client, tt shared.Tt) chan *Entitlement
func (o *Entitlement) ReadObjectsAtVt(c api.Client, tc *shared.TemporalCoordinates) ([]*Entitlement, error)
func (o *Entitlement) ReadObjectsAtVtAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement
func (o *Entitlement) ReindexObject(c api.Client) (*cshared.WrittenObject, error)
func (o *Entitlement) ReindexObjectAsync(c api.Client) chan cshared.WriteAsyncResponse
func (o *Entitlement) ReinstateObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)
func (o *Entitlement) ReinstateObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
func (*Entitlement) String
¶
func (e *Entitlement) String() string
type EntitlementId string
func GenerateEntitlementId() EntitlementId
type EntitlementIndexedQueryBuilder struct {
}
func NewEntitlementIndexedQueryBuilder() *EntitlementIndexedQueryBuilder
func (*EntitlementIndexedQueryBuilder) Build
¶
func (b *EntitlementIndexedQueryBuilder) Build() *api.IndexedQuery
func (*EntitlementIndexedQueryBuilder) Count
¶
func (b *EntitlementIndexedQueryBuilder) Count(c api.Client, tc *shared.TemporalCoordinates) (*big.Int, bool, error)
func (*EntitlementIndexedQueryBuilder) CountAsync
¶
func (b *EntitlementIndexedQueryBuilder) CountAsync(c api.Client, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnEq(o any) *EntitlementIndexedQueryBuilder
func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGt(o any) *EntitlementIndexedQueryBuilder
func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGte(o any) *EntitlementIndexedQueryBuilder
func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLt(o any) *EntitlementIndexedQueryBuilder
func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLte(o any) *EntitlementIndexedQueryBuilder
type EntitlementIterator struct {
}
func NewEntitlementIterator(client api.Client, batchSize shared.BatchSize, maxTtFrom shared.Tt) *EntitlementIterator
func (*EntitlementIterator) HasNext
¶
func (it *EntitlementIterator) HasNext() (bool, error)
func (*EntitlementIterator) Next
¶
func (it *EntitlementIterator) Next() (*Entitlement, error)