Documentation ¶
Overview ¶
nolint: staticcheck
nolint: staticcheck
nolint: staticcheck
Index ¶
- Constants
- Variables
- func IsObsolete(status dsc2.Flag) bool
- func WriteManifest(w io.Writer, md *Metadata, pts *ObjPermRelContainer)
- type Metadata
- type Migrator
- type ObjPermRel
- type ObjPermRelContainer
- type ObjRelSub
- type ObjRelSubContainer
- func (o *ObjRelSubContainer) Add(ors *ObjRelSub)
- func (o *ObjRelSubContainer) All() []*ObjRelSub
- func (o *ObjRelSubContainer) Get(obj, rel, sub string) (*ObjRelSub, bool)
- func (o *ObjRelSubContainer) GetRels(obj string) []*ObjRelSub
- func (o *ObjRelSubContainer) GetSubs(obj, rel string) []*ObjRelSub
- func (o *ObjRelSubContainer) RelationCount() int
- type WriterArgs
- type WriterOption
Constants ¶
View Source
const Obsolete int32 = 16
Variables ¶
View Source
var RefObjectTypes = map[string]*dsc2.ObjectType{ "system": {Name: "system", DisplayName: "System", IsSubject: false, Ordinal: 6, Status: uint32(dsc2.Flag_FLAG_HIDDEN | dsc2.Flag_FLAG_SYSTEM | dsc2.Flag(Obsolete))}, "user": {Name: "user", DisplayName: "User", IsSubject: true, Ordinal: 1, Status: uint32(dsc2.Flag_FLAG_SYSTEM)}, "identity": {Name: "identity", DisplayName: "Identity", IsSubject: false, Ordinal: 2, Status: uint32(dsc2.Flag_FLAG_SYSTEM | dsc2.Flag_FLAG_READONLY)}, "group": {Name: "group", DisplayName: "Group", IsSubject: true, Ordinal: 3, Status: uint32(dsc2.Flag_FLAG_SYSTEM)}, "application": {Name: "application", DisplayName: "Application", IsSubject: false, Ordinal: 4, Status: uint32(dsc2.Flag_FLAG_SYSTEM | dsc2.Flag(Obsolete))}, "resource": {Name: "resource", DisplayName: "Resource", IsSubject: false, Ordinal: 5, Status: uint32(dsc2.Flag_FLAG_SYSTEM | dsc2.Flag(Obsolete))}, "user-v1": {Name: "user-v1", DisplayName: "UserV1", IsSubject: true, Ordinal: 0, Status: uint32(dsc2.Flag_FLAG_HIDDEN | dsc2.Flag_FLAG_SYSTEM | dsc2.Flag_FLAG_SHADOW | dsc2.Flag_FLAG_READONLY | dsc2.Flag(Obsolete))}, }
View Source
var RefRelationTypes = map[string]map[string]*dsc2.RelationType{ "system": {"user": {ObjectType: "system", Name: "user", DisplayName: "system#user", Ordinal: 0, Status: uint32(dsc2.Flag_FLAG_SYSTEM | dsc2.Flag(Obsolete))}}, "identity": {"identifier": {ObjectType: "identity", Name: "identifier", Unions: []string{"user"}, DisplayName: "identity#identifier", Ordinal: 0, Status: uint32(dsc2.Flag_FLAG_SYSTEM)}}, "group": {"member": {ObjectType: "group", Name: "member", Unions: []string{"user"}, DisplayName: "group#member", Ordinal: 0, Status: uint32(dsc2.Flag_FLAG_SYSTEM)}}, "application": {"user": {ObjectType: "application", Name: "user", DisplayName: "application#user", Ordinal: 0, Status: uint32(dsc2.Flag_FLAG_SYSTEM | dsc2.Flag(Obsolete))}}, "user": {"manager": {ObjectType: "user", Name: "manager", Unions: []string{"user"}, DisplayName: "user#manager", Ordinal: 0, Status: uint32(dsc2.Flag_FLAG_SYSTEM)}}, }
Functions ¶
func IsObsolete ¶
func WriteManifest ¶
func WriteManifest(w io.Writer, md *Metadata, pts *ObjPermRelContainer)
Types ¶
type Metadata ¶
type Metadata struct { ObjectTypes []*dsc2.ObjectType RelationTypes []*dsc2.RelationType Permissions []*dsc2.Permission }
type Migrator ¶
type Migrator struct { Metadata *Metadata RelationMap *ObjRelSubContainer PermissionMap *ObjPermRelContainer }
func NewMigrator ¶
func NewMigrator() *Migrator
type ObjPermRel ¶
type ObjPermRelContainer ¶
type ObjPermRelContainer struct {
// contains filtered or unexported fields
}
func NewObjPermRelContainer ¶
func NewObjPermRelContainer() *ObjPermRelContainer
func (*ObjPermRelContainer) Add ¶
func (o *ObjPermRelContainer) Add(opr *ObjPermRel)
func (*ObjPermRelContainer) All ¶
func (o *ObjPermRelContainer) All() []*ObjPermRel
type ObjRelSubContainer ¶
type ObjRelSubContainer struct {
// contains filtered or unexported fields
}
func NewObjRelSubContainer ¶
func NewObjRelSubContainer() *ObjRelSubContainer
func (*ObjRelSubContainer) Add ¶
func (o *ObjRelSubContainer) Add(ors *ObjRelSub)
func (*ObjRelSubContainer) All ¶
func (o *ObjRelSubContainer) All() []*ObjRelSub
func (*ObjRelSubContainer) Get ¶
func (o *ObjRelSubContainer) Get(obj, rel, sub string) (*ObjRelSub, bool)
func (*ObjRelSubContainer) GetRels ¶
func (o *ObjRelSubContainer) GetRels(obj string) []*ObjRelSub
func (*ObjRelSubContainer) GetSubs ¶
func (o *ObjRelSubContainer) GetSubs(obj, rel string) []*ObjRelSub
func (*ObjRelSubContainer) RelationCount ¶
func (o *ObjRelSubContainer) RelationCount() int
type WriterArgs ¶ added in v0.0.11
type WriterArgs struct {
// contains filtered or unexported fields
}
type WriterOption ¶ added in v0.0.11
type WriterOption func(*WriterArgs)
func WithDescription ¶ added in v0.0.11
func WithDescription(description string) WriterOption
Description label.
func WithFilename ¶ added in v0.0.11
func WithFilename(filename string) WriterOption
Filename label.
func WithTimestamp ¶ added in v0.0.11
func WithTimestamp(timestamp bool) WriterOption
Include timestamp.
Click to show internal directories.
Click to hide internal directories.