Documentation ¶
Index ¶
- func BufToProto(r io.Reader, msg proto.Message) error
- func ProtoToBuf(w io.Writer, msg proto.Message) error
- func ProtoToInterface(msg proto.Message) (interface{}, error)
- func RegisterCheck(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterCheckPermission(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterCheckRelation(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterGraph(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterIdentity(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterObject(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterRelation(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterRelations(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
- func RegisterUser(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BufToProto ¶ added in v0.0.7
BufToProto, unmarshal buffer to proto message instance.
func ProtoToBuf ¶ added in v0.0.7
ProtoToBuf, marshal proto message to buffer.
func ProtoToInterface ¶ added in v0.30.0
func RegisterCheck ¶ added in v0.30.0
func RegisterCheck(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterCheck - ds.check
ds.check({ "object_type": "", "object_id": "", "relation": "", "subject_type": "" "subject_id": "", "trace": false })
func RegisterCheckPermission ¶
func RegisterCheckPermission(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterCheckPermission - ds.check_permission
ds.check_permission: { "object_id": "", "object_type": "", "permission": "", "subject_id": "", "subject_type": "", "trace": false }
func RegisterCheckRelation ¶
func RegisterCheckRelation(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterCheckRelation - ds.check_relation
ds.check_relation: { "object_id": "", "object_type": "", "relation": "", "subject_id": "", "subject_type": "", "trace": false }
func RegisterGraph ¶
func RegisterGraph(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterGraph - ds.graph
ds.graph({ "object_type": "", "object_id": "", "relation": "", "subject_type": "", "subject_id": "", "subject_relation": "", "explain": false, "trace": false }
func RegisterIdentity ¶
func RegisterIdentity(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterIdentity - ds.identity - get user id (key) for identity
ds.identity({ "id": "" })
func RegisterObject ¶
func RegisterObject(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterObject - ds.object
v3 (latest) request format:
ds.object({ "object_type": "", "object_id": "", "with_relation": false })
v2 request format:
ds.object({ "type": "", "key": "" })
func RegisterRelation ¶
func RegisterRelation(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
RegisterRelation - ds.relation
ds.relation: { "object_id": "", "object_type": "", "relation": "", "subject_id": "", "subject_relation": "", "subject_type": "", "with_objects": false }
func RegisterRelations ¶ added in v0.25.14
func RegisterRelations(logger *zerolog.Logger, fnName string, dr resolvers.DirectoryResolver) (*rego.Function, rego.Builtin1)
TODO : update v3 format
RegisterRelations - ds.relations({ "ds.relations": { "object_type": "", "object_id": "", "relation": "", "subject_type": "", "subject_id": "", "subject_relation": "", "with_objects": false, "with_empty_subject_relation": false } })
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.