Documentation ¶
Index ¶
- Constants
- func NewOperationPerm() svcutil.OperationPerm
- type Action
- type BuiltInRoleName
- type EntityActionRole
- type EntityMemberRole
- type Member
- type MembersPage
- type ProvisionManageService
- func (r ProvisionManageService) AddNewEntitiesRoles(ctx context.Context, domainID, userID string, entityIDs []string, ...) (retRolesProvision []RoleProvision, retErr error)
- func (r ProvisionManageService) AddRole(ctx context.Context, session authn.Session, entityID string, roleName string, ...) (retRole Role, retErr error)
- func (r ProvisionManageService) ListAvailableActions(ctx context.Context, session authn.Session) ([]string, error)
- func (r ProvisionManageService) RemoveEntitiesRoles(ctx context.Context, domainID, userID string, entityIDs []string, ...) error
- func (r ProvisionManageService) RemoveMemberFromAllRoles(ctx context.Context, session authn.Session, member string) (err error)
- func (r ProvisionManageService) RemoveRole(ctx context.Context, session authn.Session, entityID, roleName string) error
- func (r ProvisionManageService) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, ...) (RolePage, error)
- func (r ProvisionManageService) RetrieveRole(ctx context.Context, session authn.Session, entityID, roleName string) (Role, error)
- func (r ProvisionManageService) RoleAddActions(ctx context.Context, session authn.Session, entityID, roleName string, ...) (retActs []string, retErr error)
- func (r ProvisionManageService) RoleAddMembers(ctx context.Context, session authn.Session, entityID, roleName string, ...) (retMems []string, retErr error)
- func (r ProvisionManageService) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID, roleName string, ...) (bool, error)
- func (r ProvisionManageService) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID, roleName string, ...) (bool, error)
- func (r ProvisionManageService) RoleListActions(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error)
- func (r ProvisionManageService) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, ...) (MembersPage, error)
- func (r ProvisionManageService) RoleRemoveActions(ctx context.Context, session authn.Session, entityID, roleName string, ...) (err error)
- func (r ProvisionManageService) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID, roleName string) error
- func (r ProvisionManageService) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID, roleName string) (err error)
- func (r ProvisionManageService) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID, roleName string, ...) (err error)
- func (r ProvisionManageService) UpdateRoleName(ctx context.Context, session authn.Session, ...) (Role, error)
- type Provisioner
- type Repository
- type Role
- type RoleManager
- type RoleName
- type RolePage
- type RoleProvision
- type Roles
Constants ¶
View Source
const ( OpAddRole svcutil.Operation = iota OpRemoveRole OpUpdateRoleName OpRetrieveRole OpRetrieveAllRoles OpRoleAddActions OpRoleListActions OpRoleCheckActionsExists OpRoleRemoveActions OpRoleRemoveAllActions OpRoleAddMembers OpRoleListMembers OpRoleCheckMembersExists OpRoleRemoveMembers OpRoleRemoveAllMembers )
Variables ¶
This section is empty.
Functions ¶
func NewOperationPerm ¶
func NewOperationPerm() svcutil.OperationPerm
Types ¶
type BuiltInRoleName ¶
type BuiltInRoleName RoleName
func (BuiltInRoleName) String ¶
func (b BuiltInRoleName) String() string
func (BuiltInRoleName) ToRoleName ¶
func (b BuiltInRoleName) ToRoleName() RoleName
type EntityActionRole ¶
type EntityMemberRole ¶
type MembersPage ¶
type ProvisionManageService ¶
type ProvisionManageService struct {
// contains filtered or unexported fields
}
func NewProvisionManageService ¶
func NewProvisionManageService(entityType string, repo Repository, policy policies.Service, sidProvider magistrala.IDProvider, actions []Action, builtInRoles map[BuiltInRoleName][]Action) (ProvisionManageService, error)
func (ProvisionManageService) AddNewEntitiesRoles ¶
func (r ProvisionManageService) AddNewEntitiesRoles(ctx context.Context, domainID, userID string, entityIDs []string, optionalEntityPolicies []policies.Policy, newBuiltInRoleMembers map[BuiltInRoleName][]Member) (retRolesProvision []RoleProvision, retErr error)
func (ProvisionManageService) ListAvailableActions ¶
func (ProvisionManageService) RemoveEntitiesRoles ¶
func (ProvisionManageService) RemoveMemberFromAllRoles ¶
func (ProvisionManageService) RemoveRole ¶
func (ProvisionManageService) RetrieveAllRoles ¶
func (ProvisionManageService) RetrieveRole ¶
func (ProvisionManageService) RoleAddActions ¶
func (ProvisionManageService) RoleAddMembers ¶
func (ProvisionManageService) RoleCheckActionsExists ¶
func (ProvisionManageService) RoleCheckMembersExists ¶
func (ProvisionManageService) RoleListActions ¶
func (ProvisionManageService) RoleListMembers ¶
func (r ProvisionManageService) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, limit, offset uint64) (MembersPage, error)
func (ProvisionManageService) RoleRemoveActions ¶
func (ProvisionManageService) RoleRemoveAllActions ¶
func (ProvisionManageService) RoleRemoveAllMembers ¶
func (ProvisionManageService) RoleRemoveMembers ¶
func (ProvisionManageService) UpdateRoleName ¶
type Provisioner ¶
type Provisioner interface { AddNewEntitiesRoles(ctx context.Context, domainID, userID string, entityIDs []string, optionalEntityPolicies []policies.Policy, newBuiltInRoleMembers map[BuiltInRoleName][]Member) ([]RoleProvision, error) RemoveEntitiesRoles(ctx context.Context, domainID, userID string, entityIDs []string, optionalFilterDeletePolicies []policies.Policy, optionalDeletePolicies []policies.Policy) error }
type Repository ¶
type Repository interface { AddRoles(ctx context.Context, rps []RoleProvision) ([]Role, error) RemoveRoles(ctx context.Context, roleIDs []string) error UpdateRole(ctx context.Context, ro Role) (Role, error) RetrieveRole(ctx context.Context, roleID string) (Role, error) RetrieveRoleByEntityIDAndName(ctx context.Context, entityID, roleName string) (Role, error) RetrieveAllRoles(ctx context.Context, entityID string, limit, offset uint64) (RolePage, error) RoleAddActions(ctx context.Context, role Role, actions []string) (ops []string, err error) RoleListActions(ctx context.Context, roleID string) ([]string, error) RoleCheckActionsExists(ctx context.Context, roleID string, actions []string) (bool, error) RoleRemoveActions(ctx context.Context, role Role, actions []string) (err error) RoleRemoveAllActions(ctx context.Context, role Role) error RoleAddMembers(ctx context.Context, role Role, members []string) ([]string, error) RoleListMembers(ctx context.Context, roleID string, limit, offset uint64) (MembersPage, error) RoleCheckMembersExists(ctx context.Context, roleID string, members []string) (bool, error) RoleRemoveMembers(ctx context.Context, role Role, members []string) (err error) RoleRemoveAllMembers(ctx context.Context, role Role) (err error) RetrieveEntitiesRolesActionsMembers(ctx context.Context, entityIDs []string) ([]EntityActionRole, []EntityMemberRole, error) RemoveMemberFromAllRoles(ctx context.Context, members string) (err error) }
type RoleManager ¶
type RoleManager interface { // Add New role to entity AddRole(ctx context.Context, session authn.Session, entityID, roleName string, optionalActions []string, optionalMembers []string) (Role, error) // Remove removes the roles of entity. RemoveRole(ctx context.Context, session authn.Session, entityID, roleName string) error // UpdateName update the name of the entity role. UpdateRoleName(ctx context.Context, session authn.Session, entityID, oldRoleName, newRoleName string) (Role, error) RetrieveRole(ctx context.Context, session authn.Session, entityID, roleName string) (Role, error) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, limit, offset uint64) (RolePage, error) ListAvailableActions(ctx context.Context, session authn.Session) ([]string, error) RoleAddActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (ops []string, err error) RoleListActions(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (bool, error) RoleRemoveActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (err error) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID, roleName string) error RoleAddMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) ([]string, error) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, limit, offset uint64) (MembersPage, error) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (bool, error) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (err error) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID, roleName string) (err error) RemoveMemberFromAllRoles(ctx context.Context, session authn.Session, memberID string) (err error) }
type RoleProvision ¶
type Roles ¶
type Roles interface { // Add New role to entity AddRole(ctx context.Context, session authn.Session, entityID, roleName string, optionalActions []string, optionalMembers []string) (Role, error) // Remove removes the roles of entity. RemoveRole(ctx context.Context, session authn.Session, entityID, roleName string) error // UpdateName update the name of the entity role. UpdateRoleName(ctx context.Context, session authn.Session, entityID, oldRoleName, newRoleName string) (Role, error) RetrieveRole(ctx context.Context, session authn.Session, entityID, roleName string) (Role, error) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, limit, offset uint64) (RolePage, error) ListAvailableActions(ctx context.Context, session authn.Session) ([]string, error) RoleAddActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (ops []string, err error) RoleListActions(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (bool, error) RoleRemoveActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (err error) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID, roleName string) error RoleAddMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) ([]string, error) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, limit, offset uint64) (MembersPage, error) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (bool, error) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (err error) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID, roleName string) (err error) RemoveMembersFromAllRoles(ctx context.Context, session authn.Session, members []string) (err error) RemoveMembersFromRoles(ctx context.Context, session authn.Session, members []string, roleNames []string) (err error) RemoveActionsFromAllRoles(ctx context.Context, session authn.Session, actions []string) (err error) RemoveActionsFromRoles(ctx context.Context, session authn.Session, actions []string, roleNames []string) (err error) }
Click to show internal directories.
Click to hide internal directories.