Documentation ¶
Index ¶
- type Development
- func (c *Development) Check(ctx context.Context, subject *v1.Subject, action string, entity *v1.Entity) (*v1.PermissionCheckResponse, error)
- func (c *Development) DeleteTuple(ctx context.Context, filter *v1.TupleFilter) (token token.EncodedSnapToken, err error)
- func (c *Development) LookupEntity(ctx context.Context, subject *v1.Subject, permission, entityType string) (res *v1.PermissionLookupEntityResponse, err error)
- func (c *Development) LookupSubject(ctx context.Context, entity *v1.Entity, permission string, ...) (res *v1.PermissionLookupSubjectResponse, err error)
- func (c *Development) ReadSchema(ctx context.Context) (sch *v1.SchemaDefinition, err error)
- func (c *Development) ReadTuple(ctx context.Context, filter *v1.TupleFilter) (tuples *database.TupleCollection, ...)
- func (c *Development) Validate(ctx context.Context, shape map[string]interface{}) *Progresses
- func (c *Development) WriteSchema(ctx context.Context, schema string) (err error)
- func (c *Development) WriteTuple(ctx context.Context, tuples []*v1.Tuple) (err error)
- type Progress
- type Progresses
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Development ¶ added in v0.4.0
func NewContainer ¶
func NewContainer() *Development
func (*Development) Check ¶ added in v0.4.0
func (c *Development) Check(ctx context.Context, subject *v1.Subject, action string, entity *v1.Entity) (*v1.PermissionCheckResponse, error)
Check - Creates new permission check request
func (*Development) DeleteTuple ¶ added in v0.4.0
func (c *Development) DeleteTuple(ctx context.Context, filter *v1.TupleFilter) (token token.EncodedSnapToken, err error)
DeleteTuple - Creates new delete relation tuple request
func (*Development) LookupEntity ¶ added in v0.4.0
func (c *Development) LookupEntity(ctx context.Context, subject *v1.Subject, permission, entityType string) (res *v1.PermissionLookupEntityResponse, err error)
LookupEntity - Looks up an entity's permissions for a given subject and permission
func (*Development) LookupSubject ¶ added in v0.4.2
func (c *Development) LookupSubject(ctx context.Context, entity *v1.Entity, permission string, subjectReference *v1.RelationReference) (res *v1.PermissionLookupSubjectResponse, err error)
LookupSubject - Looks up a subject's permissions for a given entıty and permission
func (*Development) ReadSchema ¶ added in v0.4.0
func (c *Development) ReadSchema(ctx context.Context) (sch *v1.SchemaDefinition, err error)
ReadSchema - Creates new read schema request
func (*Development) ReadTuple ¶ added in v0.4.0
func (c *Development) ReadTuple(ctx context.Context, filter *v1.TupleFilter) (tuples *database.TupleCollection, continuousToken database.EncodedContinuousToken, err error)
ReadTuple - Creates new read API request
func (*Development) Validate ¶ added in v0.4.5
func (c *Development) Validate(ctx context.Context, shape map[string]interface{}) *Progresses
Validate performs validation and compilation of schema definitions. It takes a context and a shape map and returns a Progresses object which includes the results of each validation check.
func (*Development) WriteSchema ¶ added in v0.4.0
func (c *Development) WriteSchema(ctx context.Context, schema string) (err error)
WriteSchema - Creates new write schema request
func (*Development) WriteTuple ¶ added in v0.4.0
WriteTuple - Creates new write API request
type Progresses ¶ added in v0.4.5
type Progresses struct { Pass bool `json:"pass"` ErrorCount int `json:"error_count"` Messages []Progress `json:"messages"` }
Progresses - progress list
func (*Progresses) AddError ¶ added in v0.4.5
func (l *Progresses) AddError(message string)
AddError - add error to error list
func (*Progresses) AddProgress ¶ added in v0.4.5
func (l *Progresses) AddProgress(message string)
AddProgress - add progress to progress list