Versions in this module Expand all Collapse all v0 v0.16.0 Dec 11, 2024 Changes in this version + const OpAddRole + const OpRemoveRole + const OpRetrieveAllRoles + const OpRetrieveRole + const OpRoleAddActions + const OpRoleAddMembers + const OpRoleCheckActionsExists + const OpRoleCheckMembersExists + const OpRoleListActions + const OpRoleListMembers + const OpRoleRemoveActions + const OpRoleRemoveAllActions + const OpRoleRemoveAllMembers + const OpRoleRemoveMembers + const OpUpdateRoleName + func NewOperationPerm() svcutil.OperationPerm + type Action string + func (ac Action) String() string + type BuiltInRoleName RoleName + func (b BuiltInRoleName) String() string + func (b BuiltInRoleName) ToRoleName() RoleName + type EntityActionRole struct + Action string + EntityID string + RoleID string + type EntityMemberRole struct + EntityID string + MemberID string + RoleID string + type Member string + func (mem Member) String() string + type MembersPage struct + Limit uint64 + Members []string + Offset uint64 + Total uint64 + type ProvisionManageService struct + func NewProvisionManageService(entityType string, repo Repository, policy policies.Service, ...) (ProvisionManageService, error) + 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 interface + AddNewEntitiesRoles func(ctx context.Context, domainID, userID string, entityIDs []string, ...) ([]RoleProvision, error) + RemoveEntitiesRoles func(ctx context.Context, domainID, userID string, entityIDs []string, ...) error + type Repository interface + AddRoles func(ctx context.Context, rps []RoleProvision) ([]Role, error) + RemoveMemberFromAllRoles func(ctx context.Context, memberID string) (err error) + RemoveRoles func(ctx context.Context, roleIDs []string) error + RetrieveAllRoles func(ctx context.Context, entityID string, limit, offset uint64) (RolePage, error) + RetrieveEntitiesRolesActionsMembers func(ctx context.Context, entityIDs []string) ([]EntityActionRole, []EntityMemberRole, error) + RetrieveRole func(ctx context.Context, roleID string) (Role, error) + RetrieveRoleByEntityIDAndName func(ctx context.Context, entityID, roleName string) (Role, error) + RoleAddActions func(ctx context.Context, role Role, actions []string) (ops []string, err error) + RoleAddMembers func(ctx context.Context, role Role, members []string) ([]string, error) + RoleCheckActionsExists func(ctx context.Context, roleID string, actions []string) (bool, error) + RoleCheckMembersExists func(ctx context.Context, roleID string, members []string) (bool, error) + RoleListActions func(ctx context.Context, roleID string) ([]string, error) + RoleListMembers func(ctx context.Context, roleID string, limit, offset uint64) (MembersPage, error) + RoleRemoveActions func(ctx context.Context, role Role, actions []string) (err error) + RoleRemoveAllActions func(ctx context.Context, role Role) error + RoleRemoveAllMembers func(ctx context.Context, role Role) (err error) + RoleRemoveMembers func(ctx context.Context, role Role, members []string) (err error) + UpdateRole func(ctx context.Context, ro Role) (Role, error) + type Role struct + CreatedAt time.Time + CreatedBy string + EntityID string + ID string + Name string + UpdatedAt time.Time + UpdatedBy string + type RoleManager interface + AddRole func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (Role, error) + ListAvailableActions func(ctx context.Context, session authn.Session) ([]string, error) + RemoveMemberFromAllRoles func(ctx context.Context, session authn.Session, memberID string) (err error) + RemoveRole func(ctx context.Context, session authn.Session, entityID, roleName string) error + RetrieveAllRoles func(ctx context.Context, session authn.Session, entityID string, ...) (RolePage, error) + RetrieveRole func(ctx context.Context, session authn.Session, entityID, roleName string) (Role, error) + RoleAddActions func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (ops []string, err error) + RoleAddMembers func(ctx context.Context, session authn.Session, entityID, roleName string, ...) ([]string, error) + RoleCheckActionsExists func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (bool, error) + RoleCheckMembersExists func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (bool, error) + RoleListActions func(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error) + RoleListMembers func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (MembersPage, error) + RoleRemoveActions func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (err error) + RoleRemoveAllActions func(ctx context.Context, session authn.Session, entityID, roleName string) error + RoleRemoveAllMembers func(ctx context.Context, session authn.Session, entityID, roleName string) (err error) + RoleRemoveMembers func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (err error) + UpdateRoleName func(ctx context.Context, session authn.Session, ...) (Role, error) + type RoleName string + func (r RoleName) String() string + type RolePage struct + Limit uint64 + Offset uint64 + Roles []Role + Total uint64 + type RoleProvision struct + OptionalActions []string + OptionalMembers []string + type Roles interface + AddRole func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (Role, error) + ListAvailableActions func(ctx context.Context, session authn.Session) ([]string, error) + RemoveActionsFromAllRoles func(ctx context.Context, session authn.Session, actions []string) (err error) + RemoveActionsFromRoles func(ctx context.Context, session authn.Session, actions []string, ...) (err error) + RemoveMembersFromAllRoles func(ctx context.Context, session authn.Session, members []string) (err error) + RemoveMembersFromRoles func(ctx context.Context, session authn.Session, members []string, ...) (err error) + RemoveRole func(ctx context.Context, session authn.Session, entityID, roleName string) error + RetrieveAllRoles func(ctx context.Context, session authn.Session, entityID string, ...) (RolePage, error) + RetrieveRole func(ctx context.Context, session authn.Session, entityID, roleName string) (Role, error) + RoleAddActions func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (ops []string, err error) + RoleAddMembers func(ctx context.Context, session authn.Session, entityID, roleName string, ...) ([]string, error) + RoleCheckActionsExists func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (bool, error) + RoleCheckMembersExists func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (bool, error) + RoleListActions func(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error) + RoleListMembers func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (MembersPage, error) + RoleRemoveActions func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (err error) + RoleRemoveAllActions func(ctx context.Context, session authn.Session, entityID, roleName string) error + RoleRemoveAllMembers func(ctx context.Context, session authn.Session, entityID, roleName string) (err error) + RoleRemoveMembers func(ctx context.Context, session authn.Session, entityID, roleName string, ...) (err error) + UpdateRoleName func(ctx context.Context, session authn.Session, ...) (Role, error)