Documentation ¶
Index ¶
- Constants
- Variables
- func BoolToByte(b bool) []byte
- func ByteToInt32(b []byte) int32
- func Int32ToByte(i int32) []byte
- func Int32ToStr(i int32) string
- func Int64ToByte(i int64) []byte
- func IsDefaultHash(h string) bool
- func ObjectTypesNamePath() []string
- func ObjectTypesPath() []string
- func ObjectsKeyPath() []string
- func ObjectsPath() []string
- func PermissionsNamePath() []string
- func PermissionsPath() []string
- func RelationTypesNamePath() []string
- func RelationTypesPath() []string
- func RelationsObjPath() []string
- func RelationsSubPath() []string
- func StrToInt32(s string) int32
- func UUIDToByte(s string) []byte
- func Uint32ToByte(i uint32) []byte
- func Uint64ToByte(i uint64) []byte
- type CheckResult
- type Object
- type ObjectDependencies
- type ObjectDependency
- type ObjectIdentifier
- type ObjectType
- type ObjectTypeIdentifier
- type Objects
- type PaginationRequest
- type PaginationResponse
- type Permission
- type PermissionIdentifier
- type Relation
- type RelationIdentifier
- type RelationType
- type RelationTypeIdentifier
- type StatusFlag
- type StoreContext
- func (sc *StoreContext) CheckPermission(req *dsr.CheckPermissionRequest) (*CheckResult, error)
- func (sc *StoreContext) CheckRelation(req *dsr.CheckRelationRequest) (*CheckResult, error)
- func (sc *StoreContext) DeleteObject(objIdentifier *ObjectIdentifier) error
- func (sc *StoreContext) DeleteObjectType(objTypeIdentifier *ObjectTypeIdentifier) error
- func (sc *StoreContext) DeletePermission(permissionIdentifier *PermissionIdentifier) error
- func (sc *StoreContext) DeleteRelation(relIdentifier *RelationIdentifier) error
- func (sc *StoreContext) DeleteRelationType(relTypeIdentifier *RelationTypeIdentifier) error
- func (sc *StoreContext) GetGraph(req *dsr.GetGraphRequest) (ObjectDependencies, error)
- func (sc *StoreContext) GetObject(objIdentifier *ObjectIdentifier) (*Object, error)
- func (sc *StoreContext) GetObjectID(objIdentifier *ObjectIdentifier) (string, error)
- func (sc *StoreContext) GetObjectMany(objIdentifiers []*ObjectIdentifier) (Objects, error)
- func (sc *StoreContext) GetObjectType(objTypeIdentifier *ObjectTypeIdentifier) (*ObjectType, error)
- func (sc *StoreContext) GetObjectTypeID(objTypeIdentifier *ObjectTypeIdentifier) (int32, error)
- func (sc *StoreContext) GetObjectTypeName(objTypeIdentifier *ObjectTypeIdentifier) (string, error)
- func (sc *StoreContext) GetObjectTypes(page *PaginationRequest) ([]*ObjectType, *PaginationResponse, error)
- func (sc *StoreContext) GetObjects(param *ObjectTypeIdentifier, page *PaginationRequest) (Objects, *PaginationResponse, error)
- func (sc *StoreContext) GetPermission(permissionIdentifier *PermissionIdentifier) (*Permission, error)
- func (sc *StoreContext) GetPermissionID(permissionIdentifier *PermissionIdentifier) (string, error)
- func (sc *StoreContext) GetPermissionName(permissionIdentifier *PermissionIdentifier) (string, error)
- func (sc *StoreContext) GetPermissions(page *PaginationRequest) ([]*Permission, *PaginationResponse, error)
- func (sc *StoreContext) GetRelation(relationIdentifier *RelationIdentifier) ([]*Relation, error)
- func (sc *StoreContext) GetRelationType(relTypeIdentifier *RelationTypeIdentifier) (*RelationType, error)
- func (sc *StoreContext) GetRelationTypeID(relTypeIdentifier *RelationTypeIdentifier) (int32, error)
- func (sc *StoreContext) GetRelationTypeName(relTypeIdentifier *RelationTypeIdentifier) (string, error)
- func (sc *StoreContext) GetRelationTypes(param *ObjectTypeIdentifier, page *PaginationRequest) ([]*RelationType, *PaginationResponse, error)
- func (sc *StoreContext) GetRelations(param *RelationIdentifier, page *PaginationRequest) ([]*Relation, *PaginationResponse, error)
- func (sc *StoreContext) SetObject(obj *Object) (*Object, error)
- func (sc *StoreContext) SetObjectType(objType *ObjectType) (*ObjectType, error)
- func (sc *StoreContext) SetPermission(permission *Permission) (*Permission, error)
- func (sc *StoreContext) SetRelation(rel *Relation) (*Relation, error)
- func (sc *StoreContext) SetRelationType(relType *RelationType) (*RelationType, error)
Constants ¶
View Source
const DefaultHash string = `0`
Variables ¶
View Source
var ID = id{}
Functions ¶
func BoolToByte ¶
func ByteToInt32 ¶
func Int32ToByte ¶
func Int32ToStr ¶
func Int64ToByte ¶
func IsDefaultHash ¶
func ObjectTypesNamePath ¶
func ObjectTypesNamePath() []string
func ObjectTypesPath ¶
func ObjectTypesPath() []string
func ObjectsKeyPath ¶
func ObjectsKeyPath() []string
func ObjectsPath ¶
func ObjectsPath() []string
func PermissionsNamePath ¶
func PermissionsNamePath() []string
func PermissionsPath ¶
func PermissionsPath() []string
func RelationTypesNamePath ¶
func RelationTypesNamePath() []string
func RelationTypesPath ¶
func RelationTypesPath() []string
func RelationsObjPath ¶
func RelationsObjPath() []string
func RelationsSubPath ¶
func RelationsSubPath() []string
func StrToInt32 ¶
func UUIDToByte ¶
func Uint32ToByte ¶
func Uint64ToByte ¶
Types ¶
type CheckResult ¶
type Object ¶
func (*Object) PreValidate ¶
type ObjectDependencies ¶
type ObjectDependencies []*ObjectDependency
type ObjectDependency ¶
type ObjectDependency struct {
*dsc.ObjectDependency
}
type ObjectIdentifier ¶
type ObjectIdentifier struct {
*dsc.ObjectIdentifier
}
func NewObjectIdentifier ¶
func NewObjectIdentifier(i *dsc.ObjectIdentifier) *ObjectIdentifier
func (*ObjectIdentifier) Key ¶
func (i *ObjectIdentifier) Key() string
func (*ObjectIdentifier) Msg ¶
func (i *ObjectIdentifier) Msg() *dsc.ObjectIdentifier
func (*ObjectIdentifier) Resolve ¶
func (i *ObjectIdentifier) Resolve(sc *StoreContext) (*ObjectIdentifier, error)
func (*ObjectIdentifier) Validate ¶
func (i *ObjectIdentifier) Validate() (bool, error)
type ObjectType ¶
type ObjectType struct {
*dsc.ObjectType
}
func NewObjectType ¶
func NewObjectType(i *dsc.ObjectType) *ObjectType
func (*ObjectType) GetHash ¶
func (i *ObjectType) GetHash() (string, error)
func (*ObjectType) Msg ¶
func (i *ObjectType) Msg() *dsc.ObjectType
func (*ObjectType) Normalize ¶
func (i *ObjectType) Normalize() error
func (*ObjectType) PreValidate ¶
func (i *ObjectType) PreValidate() (bool, error)
func (*ObjectType) Validate ¶
func (i *ObjectType) Validate() (bool, error)
type ObjectTypeIdentifier ¶
type ObjectTypeIdentifier struct {
*dsc.ObjectTypeIdentifier
}
func NewObjectTypeIdentifier ¶
func NewObjectTypeIdentifier(i *dsc.ObjectTypeIdentifier) *ObjectTypeIdentifier
func (*ObjectTypeIdentifier) Msg ¶
func (i *ObjectTypeIdentifier) Msg() *dsc.ObjectTypeIdentifier
func (*ObjectTypeIdentifier) Resolve ¶
func (i *ObjectTypeIdentifier) Resolve(sc *StoreContext) (*ObjectTypeIdentifier, error)
func (*ObjectTypeIdentifier) Validate ¶
func (i *ObjectTypeIdentifier) Validate() (bool, error)
type PaginationRequest ¶
type PaginationRequest struct {
*dsc.PaginationRequest
}
func NewPaginationRequest ¶
func NewPaginationRequest(i *dsc.PaginationRequest) *PaginationRequest
type PaginationResponse ¶
type PaginationResponse struct {
*dsc.PaginationResponse
}
type Permission ¶
type Permission struct {
*dsc.Permission
}
func NewPermission ¶
func NewPermission(i *dsc.Permission) *Permission
func (*Permission) GetHash ¶
func (i *Permission) GetHash() (string, error)
func (*Permission) Msg ¶
func (i *Permission) Msg() *dsc.Permission
func (*Permission) Normalize ¶
func (i *Permission) Normalize() error
func (*Permission) PreValidate ¶
func (i *Permission) PreValidate() (bool, error)
func (*Permission) Validate ¶
func (i *Permission) Validate() (bool, error)
type PermissionIdentifier ¶
type PermissionIdentifier struct {
*dsc.PermissionIdentifier
}
func NewPermissionIdentifier ¶
func NewPermissionIdentifier(i *dsc.PermissionIdentifier) *PermissionIdentifier
func (*PermissionIdentifier) Msg ¶
func (i *PermissionIdentifier) Msg() *dsc.PermissionIdentifier
func (*PermissionIdentifier) Resolve ¶
func (i *PermissionIdentifier) Resolve(sc *StoreContext) (*PermissionIdentifier, error)
func (*PermissionIdentifier) Validate ¶
func (i *PermissionIdentifier) Validate() (bool, error)
type RelationIdentifier ¶
type RelationIdentifier struct {
*dsc.RelationIdentifier
}
func NewRelationIdentifier ¶
func NewRelationIdentifier(i *dsc.RelationIdentifier) *RelationIdentifier
func (*RelationIdentifier) Msg ¶
func (i *RelationIdentifier) Msg() *dsc.RelationIdentifier
func (*RelationIdentifier) ObjKey ¶
func (i *RelationIdentifier) ObjKey() string
func (*RelationIdentifier) Resolve ¶
func (i *RelationIdentifier) Resolve(sc *StoreContext) (*RelationIdentifier, error)
func (*RelationIdentifier) SubKey ¶
func (i *RelationIdentifier) SubKey() string
func (*RelationIdentifier) Validate ¶
func (i *RelationIdentifier) Validate() (bool, error)
type RelationType ¶
type RelationType struct {
*dsc.RelationType
}
func NewRelationType ¶
func NewRelationType(i *dsc.RelationType) *RelationType
func (*RelationType) GetHash ¶
func (i *RelationType) GetHash() (string, error)
func (*RelationType) Key ¶
func (i *RelationType) Key() string
func (*RelationType) Msg ¶
func (i *RelationType) Msg() *dsc.RelationType
func (*RelationType) Normalize ¶
func (i *RelationType) Normalize() error
func (*RelationType) PreValidate ¶
func (i *RelationType) PreValidate() (bool, error)
func (*RelationType) Validate ¶
func (i *RelationType) Validate() (bool, error)
type RelationTypeIdentifier ¶
type RelationTypeIdentifier struct {
*dsc.RelationTypeIdentifier
}
func NewRelationTypeIdentifier ¶
func NewRelationTypeIdentifier(i *dsc.RelationTypeIdentifier) *RelationTypeIdentifier
func (*RelationTypeIdentifier) Key ¶
func (i *RelationTypeIdentifier) Key() string
func (*RelationTypeIdentifier) Msg ¶
func (i *RelationTypeIdentifier) Msg() *dsc.RelationTypeIdentifier
func (*RelationTypeIdentifier) Resolve ¶
func (i *RelationTypeIdentifier) Resolve(sc *StoreContext) (*RelationTypeIdentifier, error)
func (*RelationTypeIdentifier) Validate ¶
func (i *RelationTypeIdentifier) Validate() (bool, error)
type StatusFlag ¶
type StatusFlag uint32
const ( Default StatusFlag = 0 Hidden StatusFlag = 1 << dsc.Flag_FLAG_HIDDEN ReadOnly StatusFlag = 1 << dsc.Flag_FLAG_READONLY System StatusFlag = 1 << dsc.Flag_FLAG_SYSTEM Shadow StatusFlag = 1 << dsc.Flag_FLAG_SHADOW )
func Status ¶
func Status(i uint32) StatusFlag
func (StatusFlag) Validate ¶
func (f StatusFlag) Validate() bool
type StoreContext ¶
func (*StoreContext) CheckPermission ¶
func (sc *StoreContext) CheckPermission(req *dsr.CheckPermissionRequest) (*CheckResult, error)
func (*StoreContext) CheckRelation ¶
func (sc *StoreContext) CheckRelation(req *dsr.CheckRelationRequest) (*CheckResult, error)
func (*StoreContext) DeleteObject ¶
func (sc *StoreContext) DeleteObject(objIdentifier *ObjectIdentifier) error
func (*StoreContext) DeleteObjectType ¶
func (sc *StoreContext) DeleteObjectType(objTypeIdentifier *ObjectTypeIdentifier) error
func (*StoreContext) DeletePermission ¶
func (sc *StoreContext) DeletePermission(permissionIdentifier *PermissionIdentifier) error
func (*StoreContext) DeleteRelation ¶
func (sc *StoreContext) DeleteRelation(relIdentifier *RelationIdentifier) error
func (*StoreContext) DeleteRelationType ¶
func (sc *StoreContext) DeleteRelationType(relTypeIdentifier *RelationTypeIdentifier) error
func (*StoreContext) GetGraph ¶
func (sc *StoreContext) GetGraph(req *dsr.GetGraphRequest) (ObjectDependencies, error)
func (*StoreContext) GetObject ¶
func (sc *StoreContext) GetObject(objIdentifier *ObjectIdentifier) (*Object, error)
func (*StoreContext) GetObjectID ¶
func (sc *StoreContext) GetObjectID(objIdentifier *ObjectIdentifier) (string, error)
func (*StoreContext) GetObjectMany ¶
func (sc *StoreContext) GetObjectMany(objIdentifiers []*ObjectIdentifier) (Objects, error)
func (*StoreContext) GetObjectType ¶
func (sc *StoreContext) GetObjectType(objTypeIdentifier *ObjectTypeIdentifier) (*ObjectType, error)
func (*StoreContext) GetObjectTypeID ¶
func (sc *StoreContext) GetObjectTypeID(objTypeIdentifier *ObjectTypeIdentifier) (int32, error)
func (*StoreContext) GetObjectTypeName ¶
func (sc *StoreContext) GetObjectTypeName(objTypeIdentifier *ObjectTypeIdentifier) (string, error)
func (*StoreContext) GetObjectTypes ¶
func (sc *StoreContext) GetObjectTypes(page *PaginationRequest) ([]*ObjectType, *PaginationResponse, error)
func (*StoreContext) GetObjects ¶
func (sc *StoreContext) GetObjects(param *ObjectTypeIdentifier, page *PaginationRequest) (Objects, *PaginationResponse, error)
func (*StoreContext) GetPermission ¶
func (sc *StoreContext) GetPermission(permissionIdentifier *PermissionIdentifier) (*Permission, error)
func (*StoreContext) GetPermissionID ¶
func (sc *StoreContext) GetPermissionID(permissionIdentifier *PermissionIdentifier) (string, error)
func (*StoreContext) GetPermissionName ¶
func (sc *StoreContext) GetPermissionName(permissionIdentifier *PermissionIdentifier) (string, error)
func (*StoreContext) GetPermissions ¶
func (sc *StoreContext) GetPermissions(page *PaginationRequest) ([]*Permission, *PaginationResponse, error)
func (*StoreContext) GetRelation ¶
func (sc *StoreContext) GetRelation(relationIdentifier *RelationIdentifier) ([]*Relation, error)
nolint: gocyclo
func (*StoreContext) GetRelationType ¶
func (sc *StoreContext) GetRelationType(relTypeIdentifier *RelationTypeIdentifier) (*RelationType, error)
func (*StoreContext) GetRelationTypeID ¶
func (sc *StoreContext) GetRelationTypeID(relTypeIdentifier *RelationTypeIdentifier) (int32, error)
func (*StoreContext) GetRelationTypeName ¶
func (sc *StoreContext) GetRelationTypeName(relTypeIdentifier *RelationTypeIdentifier) (string, error)
func (*StoreContext) GetRelationTypes ¶
func (sc *StoreContext) GetRelationTypes(param *ObjectTypeIdentifier, page *PaginationRequest) ([]*RelationType, *PaginationResponse, error)
func (*StoreContext) GetRelations ¶
func (sc *StoreContext) GetRelations(param *RelationIdentifier, page *PaginationRequest) ([]*Relation, *PaginationResponse, error)
func (*StoreContext) SetObjectType ¶
func (sc *StoreContext) SetObjectType(objType *ObjectType) (*ObjectType, error)
func (*StoreContext) SetPermission ¶
func (sc *StoreContext) SetPermission(permission *Permission) (*Permission, error)
func (*StoreContext) SetRelation ¶
func (sc *StoreContext) SetRelation(rel *Relation) (*Relation, error)
func (*StoreContext) SetRelationType ¶
func (sc *StoreContext) SetRelationType(relType *RelationType) (*RelationType, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.