Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalid occurs when checks fails ErrInvalid = errors.New("invalid") ErrUnauthorized = errors.New("unauthorized") // ErrForbidden occurs when user if forbideen ErrForbidden = errors.New("forbidden") // ErrNotFound occurs when somehint is not found ErrNotFound = errors.New("not found") // ErrInternalError occurs when shit happens ErrInternalError = errors.New("internal error") )
Functions ¶
func ConcatError ¶ added in v2.5.0
ConcatError concat errors to a single string
func WrapForbidden ¶ added in v2.5.0
WrapForbidden wraps given error with forbidden err
func WrapInternal ¶ added in v2.5.0
WrapInternal wraps given error with internal err
func WrapInvalid ¶ added in v2.5.0
WrapInvalid wraps given error with invalid err
func WrapNotFound ¶ added in v2.5.0
WrapNotFound wraps given error with not found err
func WrapUnauthorized ¶ added in v2.5.0
WrapUnauthorized wraps given error with unauthorized err
Types ¶
type App ¶
type App interface { Check(ctx context.Context, old, new model.User) error List(ctx context.Context, page, pageSize uint, sortKey string, sortDesc bool, filters map[string][]string) ([]model.User, uint, error) Get(ctx context.Context, ID uint64) (model.User, error) Create(ctx context.Context, o model.User) (model.User, error) Update(ctx context.Context, o model.User) (model.User, error) Delete(ctx context.Context, o model.User) error CheckRights(ctx context.Context, id uint64) error }
App of package
Click to show internal directories.
Click to hide internal directories.