metathings_identityd2_storage

package
v1.1.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitialized  = errors.New("system initialized")
	InvalidArgument = errors.New("invalid argument")
)
View Source
var (
	SYSTEM_CONFIG_INITIALIZE = "init"
)

Functions

This section is empty.

Types

type Action

type Action struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	Name        *string `gorm:"column:name"`
	Alias       *string `gorm:"column:alias"`
	Description *string `gorm:"column:description"`
	Extra       *string `gorm:"column:extra"`

	ExtraHelper map[string]string `gorm:"-"`
}

type ActionRoleMapping

type ActionRoleMapping struct {
	CreatedAt time.Time

	ActionId *string `gorm:"action_id"`
	RoleId   *string `gorm:"role_id"`
}

type Credential

type Credential struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	DomainId    *string    `gorm:"column:domain_id"`
	EntityId    *string    `gorm:"column:entity_id"`
	Name        *string    `gorm:"column:name"`
	Alias       *string    `gorm:"column:alias"`
	Secret      *string    `gorm:"column:secret"`
	Description *string    `gorm:"column:description"`
	ExpiresAt   *time.Time `gorm:"column:expires_at"`

	Domain *Domain `gorm:"-"`
	Entity *Entity `gorm:"-"`
	Roles  []*Role `gorm:"-"`
}

type CredentialRoleMapping

type CredentialRoleMapping struct {
	CreatedAt time.Time

	CredentialId *string `gorm:"credential_id"`
	RoleId       *string `gorm:"role_id"`
}

type Domain

type Domain struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	Name     *string `gorm:"column:name"`
	Alias    *string `gorm:"column:alias"`
	ParentId *string `gorm:"column:parent_id"`
	Extra    *string `gorm:"extra"`

	Parent      *Domain           `gorm:"-"`
	Children    []*Domain         `gorm:"-"`
	ExtraHelper map[string]string `gorm:"-"`
}

type Entity

type Entity struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	Name     *string `gorm:"column:name"`
	Alias    *string `gorm:"column:alias"`
	Password *string `gorm:"column:password"`
	Extra    *string `gorm:"column:extra"`

	Domains     []*Domain         `gorm:"-"`
	Groups      []*Group          `gorm:"-"`
	Roles       []*Role           `gorm:"-"`
	ExtraHelper map[string]string `gorm:"-"`
}

type EntityDomainMapping

type EntityDomainMapping struct {
	CreatedAt time.Time

	EntityId *string `gorm:"entity_id"`
	DomainId *string `gorm:"domain_id"`
}

type EntityRoleMapping

type EntityRoleMapping struct {
	CreatedAt time.Time

	EntityId *string `gorm:"entity_id"`
	RoleId   *string `gorm:"role_id"`
}

type Group

type Group struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	DomainId    *string `gorm:"column:domain_id"`
	Name        *string `gorm:"column:name"`
	Alias       *string `gorm:"column:alias"`
	Description *string `gorm:"column:description"`
	Extra       *string `gorm:"column:extra"`

	Domain      *Domain           `gorm:"-"`
	Subjects    []*Entity         `gorm:"-"`
	Objects     []*Entity         `gorm:"-"`
	Roles       []*Role           `gorm:"-"`
	ExtraHelper map[string]string `gorm:"-"`
}

type GroupRoleMapping

type GroupRoleMapping struct {
	CreatedAt time.Time

	GroupId *string `gorm:"group_id"`
	RoleId  *string `gorm:"role_id"`
}

type ObjectGroupMapping

type ObjectGroupMapping struct {
	CreatedAt time.Time

	ObjectId *string `gorm:"object_id"`
	GroupId  *string `gorm:"group_id"`
}

type Role

type Role struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	Name        *string `gorm:"column:name"`
	Alias       *string `gorm:"column:alias"`
	Description *string `gorm:"column:description"`
	Extra       *string `gorm:"column:extra"`

	Actions     []*Action         `gorm:"-"`
	ExtraHelper map[string]string `gorm:"-"`
}

type Storage

type Storage interface {
	IsInitialized(context.Context) (bool, error)
	Initialize(context.Context) error

	CreateDomain(context.Context, *Domain) (*Domain, error)
	DeleteDomain(ctx context.Context, id string) error
	PatchDomain(ctx context.Context, id string, domain *Domain) (*Domain, error)
	GetDomain(ctx context.Context, id string) (*Domain, error)
	ListDomains(context.Context, *Domain) ([]*Domain, error)
	AddEntityToDomain(ctx context.Context, domain_id, entity_id string) error
	RemoveEntityFromDomain(ctx context.Context, domain_id, entity_id string) error

	CreateAction(context.Context, *Action) (*Action, error)
	DeleteAction(ctx context.Context, id string) error
	PatchAction(ctx context.Context, id string, action *Action) (*Action, error)
	GetAction(ctx context.Context, id string) (*Action, error)
	ListActions(context.Context, *Action) ([]*Action, error)

	CreateRole(context.Context, *Role) (*Role, error)
	DeleteRole(ctx context.Context, id string) error
	PatchRole(ctx context.Context, id string, role *Role) (*Role, error)
	GetRole(ctx context.Context, id string) (*Role, error)
	GetRoleWithFullActions(ctx context.Context, id string) (*Role, error)
	ListRoles(context.Context, *Role) ([]*Role, error)
	AddActionToRole(ctx context.Context, role_id, action_id string) error
	RemoveActionFromRole(ctx context.Context, role_id, action_id string) error

	CreateEntity(context.Context, *Entity) (*Entity, error)
	DeleteEntity(ctx context.Context, id string) error
	PatchEntity(ctx context.Context, id string, entity *Entity) (*Entity, error)
	GetEntity(ctx context.Context, id string) (*Entity, error)
	GetEntityByName(ctx context.Context, name string) (*Entity, error)
	ListEntities(context.Context, *Entity) ([]*Entity, error)
	ListEntitiesByDomainId(ctx context.Context, dom_id string) ([]*Entity, error)
	AddRoleToEntity(ctx context.Context, entity_id, role_id string) error
	RemoveRoleFromEntity(ctx context.Context, entity_id, role_id string) error

	CreateGroup(context.Context, *Group) (*Group, error)
	DeleteGroup(ctx context.Context, id string) error
	PatchGroup(ctx context.Context, id string, group *Group) (*Group, error)
	GetGroup(ctx context.Context, id string) (*Group, error)
	ExistGroup(ctx context.Context, id string) (bool, error)
	ListGroups(context.Context, *Group) ([]*Group, error)
	AddRoleToGroup(ctx context.Context, group_id, role_id string) error
	RemoveRoleFromGroup(ctx context.Context, group_id, role_id string) error
	AddSubjectToGroup(ctx context.Context, group_id, subject_id string) error
	RemoveSubjectFromGroup(ctx context.Context, group_id, subject_id string) error
	SubjectExistsInGroup(ctx context.Context, subject_id, group_id string) (bool, error)
	AddObjectToGroup(ctx context.Context, group_id, object_id string) error
	RemoveObjectFromGroup(ctx context.Context, group_id, object_id string) error
	ObjectExistsInGroup(ctx context.Context, object_id, group_id string) (bool, error)
	ListGroupsForSubject(ctx context.Context, subject_id string) ([]*Group, error)
	ListGroupsForObject(ctx context.Context, object_id string) ([]*Group, error)

	CreateCredential(context.Context, *Credential) (*Credential, error)
	DeleteCredential(ctx context.Context, id string) error
	PatchCredential(ctx context.Context, id string, credential *Credential) (*Credential, error)
	GetCredential(ctx context.Context, id string) (*Credential, error)
	ListCredentials(context.Context, *Credential) ([]*Credential, error)

	CreateToken(context.Context, *Token) (*Token, error)
	DeleteToken(ctx context.Context, id string) error
	RefreshToken(ctx context.Context, id string, expires_at time.Time) error
	GetTokenByText(ctx context.Context, text string) (*Token, error)
	GetToken(ctx context.Context, id string) (*Token, error)
	ListTokens(context.Context, *Token) ([]*Token, error)
}

func NewStorage

func NewStorage(driver, uri string, args ...interface{}) (Storage, error)

func NewStorageImpl

func NewStorageImpl(driver, uri string, args ...interface{}) (Storage, error)

func NewTracedStorage added in v1.1.18

func NewTracedStorage(s *StorageImpl) (Storage, error)

type StorageImpl

type StorageImpl struct {
	// contains filtered or unexported fields
}

func (*StorageImpl) AddActionToRole

func (self *StorageImpl) AddActionToRole(ctx context.Context, role_id, action_id string) error

func (*StorageImpl) AddEntityToDomain

func (self *StorageImpl) AddEntityToDomain(ctx context.Context, domain_id, entity_id string) error

func (*StorageImpl) AddObjectToGroup

func (self *StorageImpl) AddObjectToGroup(ctx context.Context, group_id, object_id string) error

func (*StorageImpl) AddRoleToEntity

func (self *StorageImpl) AddRoleToEntity(ctx context.Context, entity_id, role_id string) error

func (*StorageImpl) AddRoleToGroup

func (self *StorageImpl) AddRoleToGroup(ctx context.Context, group_id, role_id string) error

func (*StorageImpl) AddSubjectToGroup

func (self *StorageImpl) AddSubjectToGroup(ctx context.Context, group_id, subject_id string) error

func (*StorageImpl) CreateAction

func (self *StorageImpl) CreateAction(ctx context.Context, act *Action) (*Action, error)

func (*StorageImpl) CreateCredential

func (self *StorageImpl) CreateCredential(ctx context.Context, cred *Credential) (*Credential, error)

func (*StorageImpl) CreateDomain

func (self *StorageImpl) CreateDomain(ctx context.Context, dom *Domain) (*Domain, error)

func (*StorageImpl) CreateEntity

func (self *StorageImpl) CreateEntity(ctx context.Context, ent *Entity) (*Entity, error)

func (*StorageImpl) CreateGroup

func (self *StorageImpl) CreateGroup(ctx context.Context, grp *Group) (*Group, error)

func (*StorageImpl) CreateRole

func (self *StorageImpl) CreateRole(ctx context.Context, role *Role) (*Role, error)

func (*StorageImpl) CreateToken

func (self *StorageImpl) CreateToken(ctx context.Context, tkn *Token) (*Token, error)

func (*StorageImpl) DeleteAction

func (self *StorageImpl) DeleteAction(ctx context.Context, id string) error

func (*StorageImpl) DeleteCredential

func (self *StorageImpl) DeleteCredential(ctx context.Context, id string) error

func (*StorageImpl) DeleteDomain

func (self *StorageImpl) DeleteDomain(ctx context.Context, id string) error

func (*StorageImpl) DeleteEntity

func (self *StorageImpl) DeleteEntity(ctx context.Context, id string) error

func (*StorageImpl) DeleteGroup

func (self *StorageImpl) DeleteGroup(ctx context.Context, id string) error

func (*StorageImpl) DeleteRole

func (self *StorageImpl) DeleteRole(ctx context.Context, id string) error

func (*StorageImpl) DeleteToken

func (self *StorageImpl) DeleteToken(ctx context.Context, id string) error

func (*StorageImpl) ExistGroup

func (self *StorageImpl) ExistGroup(ctx context.Context, id string) (bool, error)

func (*StorageImpl) GetAction

func (self *StorageImpl) GetAction(ctx context.Context, id string) (*Action, error)

func (*StorageImpl) GetCredential

func (self *StorageImpl) GetCredential(ctx context.Context, id string) (*Credential, error)

func (*StorageImpl) GetDBConn added in v1.1.18

func (self *StorageImpl) GetDBConn(ctx context.Context) *gorm.DB

func (*StorageImpl) GetDomain

func (self *StorageImpl) GetDomain(ctx context.Context, id string) (*Domain, error)

func (*StorageImpl) GetEntity

func (self *StorageImpl) GetEntity(ctx context.Context, id string) (*Entity, error)

todo remove password from return. zh

func (*StorageImpl) GetEntityByName

func (self *StorageImpl) GetEntityByName(ctx context.Context, name string) (*Entity, error)

func (*StorageImpl) GetGroup

func (self *StorageImpl) GetGroup(ctx context.Context, id string) (*Group, error)

func (*StorageImpl) GetRole

func (self *StorageImpl) GetRole(ctx context.Context, id string) (*Role, error)

func (*StorageImpl) GetRoleWithFullActions

func (self *StorageImpl) GetRoleWithFullActions(ctx context.Context, id string) (*Role, error)

func (*StorageImpl) GetRootDBConn added in v1.1.18

func (self *StorageImpl) GetRootDBConn() *gorm.DB

func (*StorageImpl) GetToken

func (self *StorageImpl) GetToken(ctx context.Context, id string) (*Token, error)

func (*StorageImpl) GetTokenByText

func (self *StorageImpl) GetTokenByText(ctx context.Context, text string) (*Token, error)

func (*StorageImpl) Initialize

func (self *StorageImpl) Initialize(ctx context.Context) error

func (*StorageImpl) IsInitialized

func (self *StorageImpl) IsInitialized(ctx context.Context) (bool, error)

func (*StorageImpl) ListActions

func (self *StorageImpl) ListActions(ctx context.Context, act *Action) ([]*Action, error)

func (*StorageImpl) ListCredentials

func (self *StorageImpl) ListCredentials(ctx context.Context, cred *Credential) ([]*Credential, error)

func (*StorageImpl) ListDomains

func (self *StorageImpl) ListDomains(ctx context.Context, dom *Domain) ([]*Domain, error)

func (*StorageImpl) ListEntities

func (self *StorageImpl) ListEntities(ctx context.Context, ent *Entity) ([]*Entity, error)

func (*StorageImpl) ListEntitiesByDomainId

func (self *StorageImpl) ListEntitiesByDomainId(ctx context.Context, id string) ([]*Entity, error)

func (*StorageImpl) ListGroups

func (self *StorageImpl) ListGroups(ctx context.Context, grp *Group) ([]*Group, error)

func (*StorageImpl) ListGroupsForObject

func (self *StorageImpl) ListGroupsForObject(ctx context.Context, object_id string) ([]*Group, error)

func (*StorageImpl) ListGroupsForSubject

func (self *StorageImpl) ListGroupsForSubject(ctx context.Context, subject_id string) ([]*Group, error)

func (*StorageImpl) ListRoles

func (self *StorageImpl) ListRoles(ctx context.Context, role *Role) ([]*Role, error)

func (*StorageImpl) ListTokens

func (self *StorageImpl) ListTokens(ctx context.Context, tkn *Token) ([]*Token, error)

func (*StorageImpl) ObjectExistsInGroup

func (self *StorageImpl) ObjectExistsInGroup(ctx context.Context, object_id, group_id string) (bool, error)

func (*StorageImpl) PatchAction

func (self *StorageImpl) PatchAction(ctx context.Context, id string, action *Action) (*Action, error)

func (*StorageImpl) PatchCredential

func (self *StorageImpl) PatchCredential(ctx context.Context, id string, credential *Credential) (*Credential, error)

func (*StorageImpl) PatchDomain

func (self *StorageImpl) PatchDomain(ctx context.Context, id string, domain *Domain) (*Domain, error)

func (*StorageImpl) PatchEntity

func (self *StorageImpl) PatchEntity(ctx context.Context, id string, entity *Entity) (*Entity, error)

func (*StorageImpl) PatchGroup

func (self *StorageImpl) PatchGroup(ctx context.Context, id string, group *Group) (*Group, error)

func (*StorageImpl) PatchRole

func (self *StorageImpl) PatchRole(ctx context.Context, id string, role *Role) (*Role, error)

func (*StorageImpl) RefreshToken

func (self *StorageImpl) RefreshToken(ctx context.Context, id string, expires_at time.Time) error

func (*StorageImpl) RemoveActionFromRole

func (self *StorageImpl) RemoveActionFromRole(ctx context.Context, role_id, action_id string) error

func (*StorageImpl) RemoveEntityFromDomain

func (self *StorageImpl) RemoveEntityFromDomain(ctx context.Context, domain_id, entity_id string) error

func (*StorageImpl) RemoveObjectFromGroup

func (self *StorageImpl) RemoveObjectFromGroup(ctx context.Context, group_id, object_id string) error

func (*StorageImpl) RemoveRoleFromEntity

func (self *StorageImpl) RemoveRoleFromEntity(ctx context.Context, entity_id, role_id string) error

func (*StorageImpl) RemoveRoleFromGroup

func (self *StorageImpl) RemoveRoleFromGroup(ctx context.Context, group_id, role_id string) error

func (*StorageImpl) RemoveSubjectFromGroup

func (self *StorageImpl) RemoveSubjectFromGroup(ctx context.Context, group_id, subject_id string) error

func (*StorageImpl) SubjectExistsInGroup

func (self *StorageImpl) SubjectExistsInGroup(ctx context.Context, subject_id, group_id string) (bool, error)

type StorageImplOption added in v1.1.18

type StorageImplOption struct {
	IsTraced bool
}

type SubjectGroupMapping

type SubjectGroupMapping struct {
	CreatedAt time.Time

	SubjectId *string `gorm:"subject_id"`
	GroupId   *string `gorm:"group_id"`
}

type SystemConfig

type SystemConfig struct {
	CreatedAt time.Time
	UpdatedAt time.Time

	Key   *string `gorm:"column:key"`
	Value *string `gorm:"column:value"`
}

type Token

type Token struct {
	Id        *string
	CreatedAt time.Time
	UpdatedAt time.Time

	DomainId     *string    `gorm:"column:domain_id"`
	EntityId     *string    `gorm:"column:entity_id"`
	CredentialId *string    `gorm:"column:credential_id"`
	IssuedAt     *time.Time `gorm:"column:issued_at"`
	ExpiresAt    *time.Time `gorm:"column:expires_at"`
	Text         *string    `gorm:"column:text"`

	Domain     *Domain     `gorm:"-"`
	Entity     *Entity     `gorm:"-"`
	Credential *Credential `gorm:"-"`
	Roles      []*Role     `gorm:"-"`
	Groups     []*Group    `gorm:"-"`
}

type TracedStorage added in v1.1.18

type TracedStorage struct {
	*opentracing_storage_helper.BaseTracedStorage
	*StorageImpl
}

func (*TracedStorage) AddActionToRole added in v1.1.18

func (s *TracedStorage) AddActionToRole(ctx context.Context, role_id, action_id string) error

func (*TracedStorage) AddEntityToDomain added in v1.1.18

func (s *TracedStorage) AddEntityToDomain(ctx context.Context, domain_id, entity_id string) error

func (*TracedStorage) AddObjectToGroup added in v1.1.18

func (s *TracedStorage) AddObjectToGroup(ctx context.Context, group_id, object_id string) error

func (*TracedStorage) AddRoleToEntity added in v1.1.18

func (s *TracedStorage) AddRoleToEntity(ctx context.Context, entity_id, role_id string) error

func (*TracedStorage) AddRoleToGroup added in v1.1.18

func (s *TracedStorage) AddRoleToGroup(ctx context.Context, group_id, role_id string) error

func (*TracedStorage) AddSubjectToGroup added in v1.1.18

func (s *TracedStorage) AddSubjectToGroup(ctx context.Context, group_id, subject_id string) error

func (*TracedStorage) CreateAction added in v1.1.18

func (s *TracedStorage) CreateAction(ctx context.Context, act *Action) (*Action, error)

func (*TracedStorage) CreateCredential added in v1.1.18

func (s *TracedStorage) CreateCredential(ctx context.Context, cred *Credential) (*Credential, error)

func (*TracedStorage) CreateDomain added in v1.1.18

func (s *TracedStorage) CreateDomain(ctx context.Context, dom *Domain) (*Domain, error)

func (*TracedStorage) CreateEntity added in v1.1.18

func (s *TracedStorage) CreateEntity(ctx context.Context, ent *Entity) (*Entity, error)

func (*TracedStorage) CreateGroup added in v1.1.18

func (s *TracedStorage) CreateGroup(ctx context.Context, grp *Group) (*Group, error)

func (*TracedStorage) CreateRole added in v1.1.18

func (s *TracedStorage) CreateRole(ctx context.Context, rol *Role) (*Role, error)

func (*TracedStorage) CreateToken added in v1.1.18

func (s *TracedStorage) CreateToken(ctx context.Context, tkn *Token) (*Token, error)

func (*TracedStorage) DeleteAction added in v1.1.18

func (s *TracedStorage) DeleteAction(ctx context.Context, id string) error

func (*TracedStorage) DeleteCredential added in v1.1.18

func (s *TracedStorage) DeleteCredential(ctx context.Context, id string) error

func (*TracedStorage) DeleteDomain added in v1.1.18

func (s *TracedStorage) DeleteDomain(ctx context.Context, id string) error

func (*TracedStorage) DeleteEntity added in v1.1.18

func (s *TracedStorage) DeleteEntity(ctx context.Context, id string) error

func (*TracedStorage) DeleteGroup added in v1.1.18

func (s *TracedStorage) DeleteGroup(ctx context.Context, id string) error

func (*TracedStorage) DeleteRole added in v1.1.18

func (s *TracedStorage) DeleteRole(ctx context.Context, id string) error

func (*TracedStorage) DeleteToken added in v1.1.18

func (s *TracedStorage) DeleteToken(ctx context.Context, id string) error

func (*TracedStorage) ExistGroup added in v1.1.18

func (s *TracedStorage) ExistGroup(ctx context.Context, id string) (bool, error)

func (*TracedStorage) GetAction added in v1.1.18

func (s *TracedStorage) GetAction(ctx context.Context, id string) (*Action, error)

func (*TracedStorage) GetCredential added in v1.1.18

func (s *TracedStorage) GetCredential(ctx context.Context, id string) (*Credential, error)

func (*TracedStorage) GetDomain added in v1.1.18

func (s *TracedStorage) GetDomain(ctx context.Context, id string) (*Domain, error)

func (*TracedStorage) GetEntity added in v1.1.18

func (s *TracedStorage) GetEntity(ctx context.Context, id string) (*Entity, error)

func (*TracedStorage) GetEntityByName added in v1.1.18

func (s *TracedStorage) GetEntityByName(ctx context.Context, name string) (*Entity, error)

func (*TracedStorage) GetGroup added in v1.1.18

func (s *TracedStorage) GetGroup(ctx context.Context, id string) (*Group, error)

func (*TracedStorage) GetRole added in v1.1.18

func (s *TracedStorage) GetRole(ctx context.Context, id string) (*Role, error)

func (*TracedStorage) GetRoleWithFullActions added in v1.1.18

func (s *TracedStorage) GetRoleWithFullActions(ctx context.Context, id string) (*Role, error)

func (*TracedStorage) GetToken added in v1.1.18

func (s *TracedStorage) GetToken(ctx context.Context, id string) (*Token, error)

func (*TracedStorage) GetTokenByText added in v1.1.18

func (s *TracedStorage) GetTokenByText(ctx context.Context, text string) (*Token, error)

func (*TracedStorage) Initialize added in v1.1.18

func (s *TracedStorage) Initialize(ctx context.Context) error

func (*TracedStorage) IsInitialized added in v1.1.18

func (s *TracedStorage) IsInitialized(ctx context.Context) (bool, error)

func (*TracedStorage) ListActions added in v1.1.18

func (s *TracedStorage) ListActions(ctx context.Context, act *Action) ([]*Action, error)

func (*TracedStorage) ListCredentials added in v1.1.18

func (s *TracedStorage) ListCredentials(ctx context.Context, cred *Credential) ([]*Credential, error)

func (*TracedStorage) ListDomains added in v1.1.18

func (s *TracedStorage) ListDomains(ctx context.Context, dom *Domain) ([]*Domain, error)

func (*TracedStorage) ListEntities added in v1.1.18

func (s *TracedStorage) ListEntities(ctx context.Context, ent *Entity) ([]*Entity, error)

func (*TracedStorage) ListEntitiesByDomainId added in v1.1.18

func (s *TracedStorage) ListEntitiesByDomainId(ctx context.Context, dom_id string) ([]*Entity, error)

func (*TracedStorage) ListGroups added in v1.1.18

func (s *TracedStorage) ListGroups(ctx context.Context, grp *Group) ([]*Group, error)

func (*TracedStorage) ListGroupsForObject added in v1.1.18

func (s *TracedStorage) ListGroupsForObject(ctx context.Context, object_id string) ([]*Group, error)

func (*TracedStorage) ListGroupsForSubject added in v1.1.18

func (s *TracedStorage) ListGroupsForSubject(ctx context.Context, subject_id string) ([]*Group, error)

func (*TracedStorage) ListRoles added in v1.1.18

func (s *TracedStorage) ListRoles(ctx context.Context, rol *Role) ([]*Role, error)

func (*TracedStorage) ListTokens added in v1.1.18

func (s *TracedStorage) ListTokens(ctx context.Context, tkn *Token) ([]*Token, error)

func (*TracedStorage) ObjectExistsInGroup added in v1.1.18

func (s *TracedStorage) ObjectExistsInGroup(ctx context.Context, object_id, group_id string) (bool, error)

func (*TracedStorage) PatchAction added in v1.1.18

func (s *TracedStorage) PatchAction(ctx context.Context, id string, action *Action) (*Action, error)

func (*TracedStorage) PatchCredential added in v1.1.18

func (s *TracedStorage) PatchCredential(ctx context.Context, id string, cred *Credential) (*Credential, error)

func (*TracedStorage) PatchDomain added in v1.1.18

func (s *TracedStorage) PatchDomain(ctx context.Context, id string, domain *Domain) (*Domain, error)

func (*TracedStorage) PatchEntity added in v1.1.18

func (s *TracedStorage) PatchEntity(ctx context.Context, id string, entity *Entity) (*Entity, error)

func (*TracedStorage) PatchGroup added in v1.1.18

func (s *TracedStorage) PatchGroup(ctx context.Context, id string, group *Group) (*Group, error)

func (*TracedStorage) PatchRole added in v1.1.18

func (s *TracedStorage) PatchRole(ctx context.Context, id string, role *Role) (*Role, error)

func (*TracedStorage) RefreshToken added in v1.1.18

func (s *TracedStorage) RefreshToken(ctx context.Context, id string, expires_at time.Time) error

func (*TracedStorage) RemoveActionFromRole added in v1.1.18

func (s *TracedStorage) RemoveActionFromRole(ctx context.Context, role_id, action_id string) error

func (*TracedStorage) RemoveEntityFromDomain added in v1.1.18

func (s *TracedStorage) RemoveEntityFromDomain(ctx context.Context, domain_id, entity_id string) error

func (*TracedStorage) RemoveObjectFromGroup added in v1.1.18

func (s *TracedStorage) RemoveObjectFromGroup(ctx context.Context, group_id, object_id string) error

func (*TracedStorage) RemoveRoleFromEntity added in v1.1.18

func (s *TracedStorage) RemoveRoleFromEntity(ctx context.Context, entity_id, role_id string) error

func (*TracedStorage) RemoveRoleFromGroup added in v1.1.18

func (s *TracedStorage) RemoveRoleFromGroup(ctx context.Context, group_id, role_id string) error

func (*TracedStorage) RemoveSubjectFromGroup added in v1.1.18

func (s *TracedStorage) RemoveSubjectFromGroup(ctx context.Context, group_id, subject_id string) error

func (*TracedStorage) SubjectExistsInGroup added in v1.1.18

func (s *TracedStorage) SubjectExistsInGroup(ctx context.Context, subject_id, group_id string) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL