Documentation ¶
Index ¶
- type AdminsRepo
- func (r *AdminsRepo) AssignRoleByID(ctx context.Context, roleName string, adminID int64) (*admins.Admin, error)
- func (r *AdminsRepo) AssignRoleByIDs(ctx context.Context, roleName string, adminIDs ...int64) ([]*admins.Admin, error)
- func (r *AdminsRepo) Create(ctx context.Context, adms ...*admins.Admin) ([]*admins.Admin, error)
- func (r *AdminsRepo) CreateIfNotExists(ctx context.Context, adms ...*admins.Admin) ([]*admins.Admin, error)
- func (r *AdminsRepo) DeleteByIDs(ctx context.Context, adminIDs ...int64) error
- func (r *AdminsRepo) GetAll(ctx context.Context) ([]*admins.Admin, error)
- func (r *AdminsRepo) GetAllShouldBeNotifiedAbout(ctx context.Context, notificationType admins.NotificationType) ([]*admins.Admin, error)
- func (r *AdminsRepo) GetByID(ctx context.Context, adminID int64) (*admins.Admin, error)
- func (r *AdminsRepo) GetByIDs(ctx context.Context, adminIDs ...int64) ([]*admins.Admin, error)
- func (r *AdminsRepo) GetRoleByID(ctx context.Context, adminID int64) (*admins.Role, error)
- func (r *AdminsRepo) HasScopesByID(ctx context.Context, adminID int64, scopes ...admins.Scope) (bool, error)
- type RolesRepo
- func (r *RolesRepo) AddScopes(ctx context.Context, scopes []admins.Scope, names ...string) ([]*admins.Role, error)
- func (r *RolesRepo) Create(ctx context.Context, roles ...*admins.Role) ([]*admins.Role, error)
- func (r *RolesRepo) CreateIfNotExists(ctx context.Context, roles ...*admins.Role) ([]*admins.Role, error)
- func (r *RolesRepo) DeleteByNames(ctx context.Context, names ...string) error
- func (r *RolesRepo) GetAll(ctx context.Context) ([]*admins.Role, error)
- func (r *RolesRepo) GetByName(ctx context.Context, name string) (*admins.Role, error)
- func (r *RolesRepo) GetByNames(ctx context.Context, names ...string) ([]*admins.Role, error)
- func (r *RolesRepo) SetScopes(ctx context.Context, scopes []admins.Scope, names ...string) ([]*admins.Role, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminsRepo ¶
type AdminsRepo struct {
// contains filtered or unexported fields
}
func NewAdminsRepo ¶
func (*AdminsRepo) AssignRoleByID ¶
func (*AdminsRepo) AssignRoleByIDs ¶
func (*AdminsRepo) CreateIfNotExists ¶
func (*AdminsRepo) DeleteByIDs ¶
func (r *AdminsRepo) DeleteByIDs(ctx context.Context, adminIDs ...int64) error
func (*AdminsRepo) GetAllShouldBeNotifiedAbout ¶
func (r *AdminsRepo) GetAllShouldBeNotifiedAbout(ctx context.Context, notificationType admins.NotificationType) ([]*admins.Admin, error)
func (*AdminsRepo) GetRoleByID ¶
func (*AdminsRepo) HasScopesByID ¶
type RolesRepo ¶
type RolesRepo struct {
// contains filtered or unexported fields
}
func (*RolesRepo) CreateIfNotExists ¶
func (*RolesRepo) DeleteByNames ¶
func (*RolesRepo) GetByNames ¶
Click to show internal directories.
Click to hide internal directories.