Documentation
¶
Index ¶
- type BranchNode
- type BuildCombiner
- type BuildFunction
- type BuilderNodeKind
- type CheckCombiner
- type CheckCommand
- type CheckDecision
- type CheckFunction
- type CheckQuery
- type CheckResponse
- type ExpandCombiner
- type ExpandCommand
- type ExpandFunction
- type ExpandNode
- type ExpandNodeKind
- type ExpandQuery
- type ExpandResponse
- type IBuilderNode
- type ICheckCommand
- type IExpandCommand
- type IExpandNode
- type ILookupQueryCommand
- type ISchemaLookupCommand
- type LeafNode
- type LogicNode
- type LookupQueryCommand
- type LookupQueryQuery
- type LookupQueryResponse
- type QueryNode
- type ResolverFunction
- type SchemaLookupCombiner
- type SchemaLookupCommand
- type SchemaLookupDecision
- type SchemaLookupFunction
- type SchemaLookupQuery
- type SchemaLookupResponse
- type StatementBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchNode ¶
type BranchNode struct { Kind ExpandNodeKind `json:"kind"` Target tuple.EntityAndRelation `json:"target"` Children []IExpandNode `json:"children"` Err error `json:"-"` }
BranchNode -
type BuildCombiner ¶
type BuildCombiner func(ctx context.Context, functions []BuildFunction) IBuilderNode
BuildCombiner .
type BuildFunction ¶
type BuildFunction func(ctx context.Context, resultChan chan<- IBuilderNode)
BuildFunction -
type BuilderNodeKind ¶
type BuilderNodeKind string
const ( QUERY BuilderNodeKind = "query" LOGIC BuilderNodeKind = "logic" )
type CheckCombiner ¶
type CheckCombiner func(ctx context.Context, functions []CheckFunction) CheckDecision
CheckCombiner .
type CheckCommand ¶
type CheckCommand struct {
// contains filtered or unexported fields
}
CheckCommand -
func NewCheckCommand ¶
func NewCheckCommand(rr repositories.IRelationTupleRepository, l logger.Interface) *CheckCommand
NewCheckCommand -
func (*CheckCommand) Execute ¶
func (command *CheckCommand) Execute(ctx context.Context, q *CheckQuery, child schema.Child) (response CheckResponse, err errors.Error)
Execute -
type CheckDecision ¶
type CheckDecision struct { Prefix string `json:"prefix"` Can bool `json:"can"` Err errors.Error `json:"-"` }
CheckDecision -
type CheckFunction ¶
type CheckFunction func(ctx context.Context, decisionChan chan<- CheckDecision)
CheckFunction -
type CheckQuery ¶
type CheckQuery struct { Entity tuple.Entity Subject tuple.Subject // contains filtered or unexported fields }
CheckQuery -
func (*CheckQuery) LoadVisits ¶
func (r *CheckQuery) LoadVisits() map[string]interface{}
func (*CheckQuery) SetVisit ¶
func (r *CheckQuery) SetVisit(key string, decision CheckDecision)
type CheckResponse ¶
CheckResponse -
type ExpandCombiner ¶
type ExpandCombiner func(ctx context.Context, requests []ExpandFunction) IExpandNode
ExpandCombiner .
type ExpandCommand ¶
type ExpandCommand struct {
// contains filtered or unexported fields
}
ExpandCommand -
func NewExpandCommand ¶
func NewExpandCommand(rr repositories.IRelationTupleRepository, l logger.Interface) *ExpandCommand
NewExpandCommand -
func (*ExpandCommand) Execute ¶
func (command *ExpandCommand) Execute(ctx context.Context, q *ExpandQuery, child schema.Child) (response ExpandResponse, err errors.Error)
Execute -
type ExpandFunction ¶
type ExpandFunction func(ctx context.Context, expandChan chan<- IExpandNode)
ExpandFunction -
type ExpandNode ¶
type ExpandNode struct { Kind ExpandNodeKind `json:"kind"` Operation schema.OPType `json:"operation"` Children []IExpandNode `json:"children"` Err error `json:"-"` }
ExpandNode -
type ExpandNodeKind ¶
type ExpandNodeKind string
const ( EXPAND ExpandNodeKind = "expand" LEAF ExpandNodeKind = "leaf" BRANCH ExpandNodeKind = "branch" )
type IBuilderNode ¶
type IBuilderNode interface { GetKind() BuilderNodeKind Error() error }
IBuilderNode -
type ICheckCommand ¶
type ICheckCommand interface {
Execute(ctx context.Context, q *CheckQuery, child schema.Child) (response CheckResponse, err errors.Error)
}
ICheckCommand -
type IExpandCommand ¶
type IExpandCommand interface {
Execute(ctx context.Context, q *ExpandQuery, child schema.Child) (response ExpandResponse, err errors.Error)
}
IExpandCommand -
type IExpandNode ¶
type IExpandNode interface { GetKind() ExpandNodeKind Error() error }
IExpandNode -
type ILookupQueryCommand ¶
type ILookupQueryCommand interface {
Execute(ctx context.Context, q *LookupQueryQuery, child schema.Child) (response LookupQueryResponse, err errors.Error)
}
ILookupQueryCommand -
type ISchemaLookupCommand ¶
type ISchemaLookupCommand interface {
Execute(ctx context.Context, q *SchemaLookupQuery, actions []schema.Action) (response SchemaLookupResponse, err errors.Error)
}
ISchemaLookupCommand -
type LeafNode ¶
type LeafNode struct { Kind ExpandNodeKind `json:"kind"` Subject tuple.Subject `json:"subject"` Err error `json:"-"` }
LeafNode -
type LogicNode ¶
type LogicNode struct { Operation schema.OPType `json:"operation"` Children []IBuilderNode `json:"children"` Err error `json:"-"` }
LogicNode -
type LookupQueryCommand ¶
type LookupQueryCommand struct {
// contains filtered or unexported fields
}
LookupQueryCommand -
func NewLookupQueryCommand ¶
func NewLookupQueryCommand(rr repositories.IRelationTupleRepository, l logger.Interface) *LookupQueryCommand
NewLookupQueryCommand -
func (*LookupQueryCommand) Execute ¶
func (command *LookupQueryCommand) Execute(ctx context.Context, q *LookupQueryQuery, child schema.Child) (response LookupQueryResponse, err errors.Error)
Execute -
type LookupQueryQuery ¶
type LookupQueryQuery struct { EntityType string Action string Subject tuple.Subject // contains filtered or unexported fields }
LookupQueryQuery -
func (*LookupQueryQuery) SetSchema ¶
func (l *LookupQueryQuery) SetSchema(sch schema.Schema)
SetSchema -
type LookupQueryResponse ¶
type LookupQueryResponse struct { Node IBuilderNode Query string Args []interface{} }
LookupQueryResponse -
func NewLookupQueryResponse ¶
func NewLookupQueryResponse(Node IBuilderNode, table string) (LookupQueryResponse, errors.Error)
NewLookupQueryResponse -
type QueryNode ¶
type QueryNode struct { Key string `json:"condition"` Join map[string]join `json:"join"` Args []string `json:"vars"` Exclusion bool `json:"exclusion"` Err error `json:"-"` // contains filtered or unexported fields }
QueryNode -
type SchemaLookupCombiner ¶
type SchemaLookupCombiner func(ctx context.Context, functions []SchemaLookupFunction) SchemaLookupDecision
SchemaLookupCombiner .
type SchemaLookupCommand ¶
type SchemaLookupCommand struct {
// contains filtered or unexported fields
}
SchemaLookupCommand -
func NewSchemaLookupCommand ¶
func NewSchemaLookupCommand(l logger.Interface) *SchemaLookupCommand
NewSchemaLookupCommand -
func (*SchemaLookupCommand) Execute ¶
func (command *SchemaLookupCommand) Execute(ctx context.Context, q *SchemaLookupQuery, actions []schema.Action) (response SchemaLookupResponse, err errors.Error)
Execute -
type SchemaLookupDecision ¶
type SchemaLookupDecision struct { Prefix string `json:"prefix"` Can bool `json:"can"` Err errors.Error `json:"-"` }
SchemaLookupDecision -
type SchemaLookupFunction ¶
type SchemaLookupFunction func(ctx context.Context, lookupChan chan<- SchemaLookupDecision)
SchemaLookupFunction -
type SchemaLookupResponse ¶
type SchemaLookupResponse struct {
ActionNames []string
}
SchemaLookupResponse -
type StatementBuilder ¶
type StatementBuilder struct {
// contains filtered or unexported fields
}
StatementBuilder -