Documentation ¶
Index ¶
- Constants
- Variables
- func BoolToByte(b bool) []byte
- func ByteToInt32(b []byte) int32
- func CalculateStats(ctx context.Context, tx *bolt.Tx) (*stats.Stats, error)
- func Check(i *dsr3.CheckRequest) *check
- func CheckPermission(i *dsr3.CheckPermissionRequest) *checkPermission
- func CheckRelation(i *dsr3.CheckRelationRequest) *checkRelation
- func CreateUserSet(ctx context.Context, tx *bolt.Tx, subject *dsc3.ObjectIdentifier) ([]*dsc3.ObjectIdentifier, error)
- func GetGraph(i *dsr3.GetGraphRequest) *getGraph
- func GetGraphV2(i *dsr2.GetGraphRequest) *getGraphV2
- func GetRelation(i *dsr3.GetRelationRequest) *relations
- func GetRelations(i *dsr3.GetRelationsRequest) *relations
- func Int32ToByte(i int32) []byte
- func Int32ToStr(i int32) string
- func Int64ToByte(i int64) []byte
- func IsDefaultHash(h string) bool
- func IsNotSet(s string) bool
- func IsSet(s string) bool
- func Manifest(metadata *dsm3.Metadata) *manifest
- func Object(i *dsc3.Object) *object
- func ObjectIdentifier(i *dsc3.ObjectIdentifier) *objectIdentifier
- func ObjectIdentifierV2(i *dsc2.ObjectIdentifier) *safe.SafeObjectIdentifier
- func ObjectSelector(i *dsc3.ObjectIdentifier) *safe.SafeObjectSelector
- func ObjectSelectorV2(s *dsc2.ObjectIdentifier) *safe.SafeObjectSelector
- func Relation(i *dsc3.Relation) *relation
- func StrToInt32(s string) int32
- func UUIDToByte(s string) []byte
- func Uint32ToByte(i uint32) []byte
- func Uint64ToByte(i uint64) []byte
- type Direction
- type GraphWalker
- type RelationFilter
- type Stats
Constants ¶
View Source
const ( TypeIDSeparator string = ":" InstanceSeparator string = "|" RelationSeparator string = "#" )
View Source
const DefaultHash string = `0`
Variables ¶
View Source
var ( ErrObjectNotFound = cerr.NewAsertoError("E20031", codes.NotFound, http.StatusNotFound, "object not found") ErrRelationNotFound = cerr.NewAsertoError("E20032", codes.NotFound, http.StatusNotFound, "relation not found") ErrPermissionNotFound = cerr.NewAsertoError("E20033", codes.NotFound, http.StatusNotFound, "permission not found") ErrInvalidRequest = cerr.NewAsertoError("E20040", codes.InvalidArgument, http.StatusBadRequest, "invalid request instance") ErrInvalidArgumentObject = cerr.NewAsertoError("E20041", codes.InvalidArgument, http.StatusBadRequest, "object invalid argument") ErrInvalidArgumentRelation = cerr.NewAsertoError("E20042", codes.InvalidArgument, http.StatusBadRequest, "relation invalid argument") ErrInvalidArgumentObjectIdentifier = cerr.NewAsertoError("E20043", codes.InvalidArgument, http.StatusBadRequest, "object identifier invalid argument") ErrInvalidArgumentRelationIdentifier = cerr.NewAsertoError("E20044", codes.InvalidArgument, http.StatusBadRequest, "relation identifier invalid argument") ErrInvalidArgumentObjectTypeSelector = cerr.NewAsertoError("E20045", codes.InvalidArgument, http.StatusBadRequest, "object type selector invalid argument") ErrNoCompleteObjectIdentifier = cerr.NewAsertoError("E20050", codes.FailedPrecondition, http.StatusPreconditionFailed, "relation identifier no complete object identifier") ErrGraphDirectionality = cerr.NewAsertoError("E20051", codes.InvalidArgument, http.StatusPreconditionFailed, "unable to determine graph directionality") )
Functions ¶
func BoolToByte ¶
func ByteToInt32 ¶
func CalculateStats ¶ added in v0.31.0
CalculateStats returns a Stats object with the counts of all objects and relations.
func Check ¶ added in v0.30.0
func Check(i *dsr3.CheckRequest) *check
func CheckPermission ¶
func CheckPermission(i *dsr3.CheckPermissionRequest) *checkPermission
func CheckRelation ¶
func CheckRelation(i *dsr3.CheckRelationRequest) *checkRelation
func CreateUserSet ¶ added in v0.21.2
func CreateUserSet(ctx context.Context, tx *bolt.Tx, subject *dsc3.ObjectIdentifier) ([]*dsc3.ObjectIdentifier, error)
CreateUserSet, create the computed user set of a subject.
func GetGraph ¶
func GetGraph(i *dsr3.GetGraphRequest) *getGraph
func GetGraphV2 ¶ added in v0.31.0
func GetGraphV2(i *dsr2.GetGraphRequest) *getGraphV2
func GetRelation ¶ added in v0.30.0
func GetRelation(i *dsr3.GetRelationRequest) *relations
func GetRelations ¶ added in v0.30.0
func GetRelations(i *dsr3.GetRelationsRequest) *relations
func Int32ToByte ¶
func Int32ToStr ¶
func Int64ToByte ¶
func IsDefaultHash ¶
func ObjectIdentifier ¶
func ObjectIdentifier(i *dsc3.ObjectIdentifier) *objectIdentifier
func ObjectIdentifierV2 ¶ added in v0.31.0
func ObjectIdentifierV2(i *dsc2.ObjectIdentifier) *safe.SafeObjectIdentifier
func ObjectSelector ¶
func ObjectSelector(i *dsc3.ObjectIdentifier) *safe.SafeObjectSelector
func ObjectSelectorV2 ¶ added in v0.31.0
func ObjectSelectorV2(s *dsc2.ObjectIdentifier) *safe.SafeObjectSelector
func StrToInt32 ¶
func UUIDToByte ¶
func Uint32ToByte ¶
func Uint64ToByte ¶
Types ¶
type GraphWalker ¶
type GraphWalker struct {
// contains filtered or unexported fields
}
func (*GraphWalker) Fetch ¶ added in v0.21.2
func (w *GraphWalker) Fetch() error
func (*GraphWalker) Filter ¶ added in v0.21.2
func (w *GraphWalker) Filter() error
func (*GraphWalker) Results ¶
func (w *GraphWalker) Results() ([]*dsc2.ObjectDependency, error)
type RelationFilter ¶ added in v0.21.5
type Stats ¶ added in v0.31.0
Wraps the azm Stats object and adds mutator methods.
func (*Stats) CountObjects ¶ added in v0.31.0
Click to show internal directories.
Click to hide internal directories.