Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DepthError = errors.New("depth error") CanceledError = errors.New("canceled error") ActionCannotFoundError = errors.New("action cannot found") EntityCannotFoundError = errors.New("entity cannot found") UndefinedChildTypeError = errors.New("undefined child type") UndefinedChildKindError = errors.New("undefined child kind") )
Functions ¶
This section is empty.
Types ¶
type CheckFunction ¶
CheckFunction -
type Combiner ¶
type Combiner func(ctx context.Context, requests []CheckFunction) Decision
Combiner .
type IPermissionService ¶
type IPermissionService interface {
Check(ctx context.Context, s string, a string, o string, d int) (bool, *VisitMap, int, error)
}
IPermissionService -
type IRelationshipService ¶
type IRelationshipService interface {
WriteRelationship(ctx context.Context, entities []e.RelationTuple) error
DeleteRelationship(ctx context.Context, entities []e.RelationTuple) error
}
IRelationshipService -
type ISchemaService ¶
type ISchemaService interface {
Schema(ctx context.Context) (sch schema.Schema, err error)
Replace(ctx context.Context, configs []e.EntityConfig) (err error)
}
ISchemaService -
type PermissionService ¶
type PermissionService struct {
// contains filtered or unexported fields
}
PermissionService -
func NewPermissionService ¶
func NewPermissionService(rr repositories.IRelationTupleRepository, ss ISchemaService) *PermissionService
NewPermissionService -
type RelationshipService ¶
type RelationshipService struct {
// contains filtered or unexported fields
}
RelationshipService -
func NewRelationshipService ¶
func NewRelationshipService(repo repositories.IRelationTupleRepository) *RelationshipService
NewRelationshipService -
func (*RelationshipService) DeleteRelationship ¶
func (service *RelationshipService) DeleteRelationship(ctx context.Context, entities []e.RelationTuple) error
DeleteRelationship -
func (*RelationshipService) WriteRelationship ¶
func (service *RelationshipService) WriteRelationship(ctx context.Context, entities []e.RelationTuple) error
WriteRelationship -
type Request ¶
type Request struct {
Object tuple.Object
Subject tuple.User
// contains filtered or unexported fields
}
Request -
type SchemaService ¶
type SchemaService struct {
// contains filtered or unexported fields
}
SchemaService -
func NewSchemaService ¶
func NewSchemaService(repo repositories.IEntityConfigRepository) *SchemaService
NewSchemaService -
func (*SchemaService) Replace ¶
func (service *SchemaService) Replace(ctx context.Context, configs []e.EntityConfig) (err error)
Replace -
Click to show internal directories.
Click to hide internal directories.