Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DisableAdvisoryLock = false UseBlockingAdvisoryLock = true )
Functions ¶
func NewMockRoleDao ¶
func NewMockRoleDao() *roleDaoMock
func NewRoleHandler ¶
func NewRoleHandler(role RoleService, generic services.GenericService) *roleHandler
func PresentRole ¶
Types ¶
type Role ¶
type Role struct {
api.Meta
Name string `json:"name" gorm:"uniqueIndex;not null"`
DisplayName *string `json:"display_name"`
Description *string `json:"description"`
Permissions []string `json:"permissions" gorm:"type:text;serializer:json"`
BuiltIn bool `json:"built_in" gorm:"default:false"`
}
func ConvertRole ¶
type RoleDao ¶
type RoleDao interface {
Get(ctx context.Context, id string) (*Role, error)
Create(ctx context.Context, role *Role) (*Role, error)
Replace(ctx context.Context, role *Role) (*Role, error)
Delete(ctx context.Context, id string) error
FindByIDs(ctx context.Context, ids []string) (RoleList, error)
All(ctx context.Context) (RoleList, error)
}
func NewRoleDao ¶
func NewRoleDao(sessionFactory *db.SessionFactory) RoleDao
type RolePatchRequest ¶
type RoleService ¶
type RoleService interface {
Get(ctx context.Context, id string) (*Role, *errors.ServiceError)
Create(ctx context.Context, role *Role) (*Role, *errors.ServiceError)
Replace(ctx context.Context, role *Role) (*Role, *errors.ServiceError)
Delete(ctx context.Context, id string) *errors.ServiceError
All(ctx context.Context) (RoleList, *errors.ServiceError)
FindByIDs(ctx context.Context, ids []string) (RoleList, *errors.ServiceError)
OnUpsert(ctx context.Context, id string) error
OnDelete(ctx context.Context, id string) error
}
func NewRoleService ¶
func NewRoleService(lockFactory db.LockFactory, roleDao RoleDao, events services.EventService) RoleService
func Service ¶
func Service(s *environments.Services) RoleService
type ServiceLocator ¶
type ServiceLocator func() RoleService
func NewServiceLocator ¶
func NewServiceLocator(env *environments.Env) ServiceLocator
Click to show internal directories.
Click to hide internal directories.