Versions in this module Expand all Collapse all v0 v0.0.1 Aug 23, 2024 Changes in this version + func HasPermissions(ctx context.Context, scope Scope, perms ...Permission) error + type Permission uint8 + const PermCreate + const PermDelete + const PermRead + const PermUpdate + func (p Permission) String() string + type Role struct + Description *string + IsSystem bool + Name string + Permissions map[string][]string + func (r *Role) Validate() error + type Scope string + const ScopeCephfs + const ScopeConfigOpt + const ScopeDashboardSettings + const ScopeGrafana + const ScopeHosts + const ScopeIscsi + const ScopeLog + const ScopeManager + const ScopeMonitor + const ScopeNfsGanesha + const ScopeNvmeOf + const ScopeOsd + const ScopePool + const ScopePrometheus + const ScopeRbdImage + const ScopeRbdMirroring + const ScopeRgw + const ScopeUser + type Service struct + func New(radosSvc *rados.Svc) (*Service, error) + func (s *Service) ChangePassword(ctx context.Context, username, oldPass, newPass string) error + func (s *Service) CloneRole(ctx context.Context, srcName, dstName string) error + func (s *Service) CreateRole(ctx context.Context, role Role) error + func (s *Service) CreateUser(ctx context.Context, user User) error + func (s *Service) DeleteRole(ctx context.Context, name string) error + func (s *Service) DeleteUser(ctx context.Context, username string) error + func (s *Service) GetPermissions(ctx context.Context, username string) map[string][]string + func (s *Service) GetRole(ctx context.Context, name string) (Role, error) + func (s *Service) GetUser(ctx context.Context, username string) (User, error) + func (s *Service) ListRoles(ctx context.Context) ([]Role, error) + func (s *Service) ListUsers(ctx context.Context) ([]User, error) + func (s *Service) UpdateRole(ctx context.Context, role Role) error + func (s *Service) UpdateUser(ctx context.Context, user User) error + type User struct + Email *string + Enabled bool + LastUpdate int + Name *string + Password string + PwdExpirationDate *int + PwdUpdateRequired bool + Roles []string + Username string + func (u *User) Validate() error