Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CtxContext context key for custom context object CtxContext key = iota CtxUser )
Variables ¶
View Source
var ErrDuplicate = errors.New("duplicate record")
ErrDuplicate indicates duplicate key record
View Source
var ErrLogRestored = errors.New("already restored")
ErrLogRestored indicates conflict call for restoring usage by requestID
View Source
var ErrNoAccess = errors.New("no access")
View Source
var ErrNoRecord = errors.New("no record found")
ErrNoRecord indicates no record found error
View Source
var ErrOperationExists = errors.New("operation exists")
ErrOperationExists indicates existing operation for the record
Functions ¶
This section is empty.
Types ¶
type NoAccessError ¶
type NoAccessError struct {
Resource string
}
func NewNoAccessError ¶
func NewNoAccessError(resource, name string) *NoAccessError
func (*NoAccessError) Error ¶
func (e *NoAccessError) Error() string
type User ¶
type User struct { ID string Name string Disabled bool MaxValidTo time.Time MaxLimit float64 Projects []string Permissions map[permission.Enum]bool }
func (*User) HasPermission ¶
func (u *User) HasPermission(perm permission.Enum) bool
func (*User) ValidateID ¶
func (*User) ValidateProject ¶
type WrongFieldError ¶
func NewWrongFieldError ¶
func NewWrongFieldError(field, message string) *WrongFieldError
func (*WrongFieldError) Error ¶
func (e *WrongFieldError) Error() string
Click to show internal directories.
Click to hide internal directories.