Documentation ¶
Index ¶
Constants ¶
View Source
const AuditEntity = "role"
Variables ¶
View Source
var ( UserType = namespace.DefinitionUser.ID TeamMemberType = fmt.Sprintf("%s#%s", namespace.DefinitionTeam.ID, DefinitionTeamMember.ID) )
View Source
var ( ErrNotExist = errors.New("role doesn't exist") ErrInvalidID = errors.New("role id is invalid") ErrConflict = errors.New("role name already exist") ErrInvalidDetail = errors.New("invalid role detail") ErrLogActivity = errors.New("error while logging activity") )
View Source
var DefinitionOrganizationAdmin = Role{ Name: "Organization Admin", ID: "organization_admin", NamespaceID: namespace.DefinitionOrg.ID, Types: []string{UserType, TeamMemberType}, }
View Source
var DefinitionProjectAdmin = Role{ Name: "Project Admin", ID: "project_admin", NamespaceID: namespace.DefinitionProject.ID, Types: []string{UserType, TeamMemberType}, }
View Source
var DefinitionTeamAdmin = Role{ Name: "Team Admin", ID: "team_admin", NamespaceID: namespace.DefinitionTeam.ID, Types: []string{UserType}, }
View Source
var DefinitionTeamMember = Role{ Name: "Team Member", ID: "team_member", NamespaceID: namespace.DefinitionTeam.ID, Types: []string{UserType}, }
Functions ¶
This section is empty.
Types ¶
type ActivityService ¶ added in v0.6.15
type Repository ¶
type Role ¶
type Role struct { ID string Name string Types []string NamespaceID string Metadata metadata.Metadata CreatedAt time.Time UpdatedAt time.Time }
func GetOwnerRole ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(logger log.Logger, repository Repository, userService UserService, activityService ActivityService) *Service
Click to show internal directories.
Click to hide internal directories.