development

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Development added in v0.4.0

type Development struct {
	Container *servers.Container
}

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

func (c *Development) WriteTuple(ctx context.Context, tuples []*v1.Tuple) (err error)

WriteTuple - Creates new write API request

type Progress added in v0.4.5

type Progress struct {
	IsError bool   `json:"is_error"`
	Message string `json:"message"`
}

Progress - progress

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL