...

Package entitlements

import "bitbucket.org/twicedb/twicedb-go/shared/entitlements"
Overview
Index

Overview ▾

Package entitlements provides methods for adding and modifying entitlements to data stored in TwiceDB.

Index ▾

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

func ReadEntitlementByObjectIdAsync(c api.Client, tc *shared.TemporalCoordinates, oid shared.ObjectId) chan *Entitlement

type 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

func NewEntitlement(
    entitlementID EntitlementId,
    clientCommonName shared.ClientCommonName,
    emailAddress shared.EmailAddress,
    entitledFqn shared.Fqn,
    read bool,
    write bool,
    entitle bool,
) *Entitlement

func NewEntitlementWithObjectId

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

func ReadEntitlementByObjectId(c api.Client, tc *shared.TemporalCoordinates, oid shared.ObjectId) (*Entitlement, error)

func (*Entitlement) DeleteObject

func (o *Entitlement) DeleteObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)

func (*Entitlement) DeleteObjectAsync

func (o *Entitlement) DeleteObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse

func (*Entitlement) EmailAddressAndEntitledFqn

func (e *Entitlement) EmailAddressAndEntitledFqn() *string

func (*Entitlement) EnsureCanProjectField

func (o *Entitlement) EnsureCanProjectField(field string, op api.ProjectOp)

func (*Entitlement) EnsureCanQueryField

func (o *Entitlement) EnsureCanQueryField(field string)

func (*Entitlement) Fqn

func (o *Entitlement) Fqn() shared.Fqn

func (*Entitlement) GenerateObjectId

func (o *Entitlement) GenerateObjectId() shared.ObjectId

func (*Entitlement) GetEvent

func (o *Entitlement) GetEvent(c api.Client) (shared.Event, error)

func (*Entitlement) GetEventAsync

func (o *Entitlement) GetEventAsync(c api.Client) chan shared.Event

func (*Entitlement) IndexedQuery

func (o *Entitlement) IndexedQuery() *api.IndexedQuery

func (*Entitlement) ProjectedFields

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 (*Entitlement) PutObjectAsync

func (o *Entitlement) PutObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse

func (*Entitlement) ReadIQuery

func (o *Entitlement) ReadIQuery(c api.Client, iq *api.IndexedQuery, tc *shared.TemporalCoordinates) ([]*Entitlement, error)

func (*Entitlement) ReadIQueryAsync

func (o *Entitlement) ReadIQueryAsync(c api.Client, iq *api.IndexedQuery, tc *shared.TemporalCoordinates) chan *Entitlement

func (*Entitlement) ReadObject

func (o *Entitlement) ReadObject(c api.Client, tc *shared.TemporalCoordinates) (*Entitlement, error)

func (*Entitlement) ReadObjectAsync

func (o *Entitlement) ReadObjectAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement

func (*Entitlement) ReadObjects

func (o *Entitlement) ReadObjects(c api.Client, tc *shared.TemporalCoordinates) ([]*Entitlement, error)

func (*Entitlement) ReadObjectsAsync

func (o *Entitlement) ReadObjectsAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement

func (*Entitlement) ReadObjectsAtTt

func (o *Entitlement) ReadObjectsAtTt(c api.Client, tt shared.Tt) ([]*Entitlement, error)

func (*Entitlement) ReadObjectsAtTtAsync

func (o *Entitlement) ReadObjectsAtTtAsync(c api.Client, tt shared.Tt) chan *Entitlement

func (*Entitlement) ReadObjectsAtVt

func (o *Entitlement) ReadObjectsAtVt(c api.Client, tc *shared.TemporalCoordinates) ([]*Entitlement, error)

func (*Entitlement) ReadObjectsAtVtAsync

func (o *Entitlement) ReadObjectsAtVtAsync(c api.Client, tc *shared.TemporalCoordinates) chan *Entitlement

func (*Entitlement) ReindexObject

func (o *Entitlement) ReindexObject(c api.Client) (*cshared.WrittenObject, error)

func (*Entitlement) ReindexObjectAsync

func (o *Entitlement) ReindexObjectAsync(c api.Client) chan cshared.WriteAsyncResponse

func (*Entitlement) ReinstateObject

func (o *Entitlement) ReinstateObject(c api.Client, vtFrom shared.Vt) (*cshared.WrittenObject, error)

func (*Entitlement) ReinstateObjectAsync

func (o *Entitlement) ReinstateObjectAsync(c api.Client, vtFrom shared.Vt) chan cshared.WriteAsyncResponse

func (*Entitlement) String

func (e *Entitlement) String() string

type EntitlementId

type EntitlementId string

func GenerateEntitlementId

func GenerateEntitlementId() EntitlementId

type EntitlementIndexedQueryBuilder

type EntitlementIndexedQueryBuilder struct {
    // contains filtered or unexported fields
}

func NewEntitlementIndexedQueryBuilder

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 (*EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnEq

func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnEq(o any) *EntitlementIndexedQueryBuilder

func (*EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGt

func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGt(o any) *EntitlementIndexedQueryBuilder

func (*EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGte

func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnGte(o any) *EntitlementIndexedQueryBuilder

func (*EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLt

func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLt(o any) *EntitlementIndexedQueryBuilder

func (*EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLte

func (b *EntitlementIndexedQueryBuilder) WhereEmailAddressAndEntitledFqnLte(o any) *EntitlementIndexedQueryBuilder

type EntitlementIterator

type EntitlementIterator struct {
    // contains filtered or unexported fields
}

func NewEntitlementIterator

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)