Documentation ¶
Index ¶
- Variables
- func FirstError(errors ...error) error
- func ReturnError(ctx *context.Context, err error)
- func ReturnErrorText(ctx *context.Context, errText string)
- func ReturnErrorTextWithStatus(ctx *context.Context, status int, errText string)
- func ReturnErrorWithStatus(ctx *context.Context, status int, err error)
- func ReturnJSON[T any](ctx *context.Context, f func() (T, error))
- func SafeBasicAuthLoad(filename string, userOptions ...basicauth.UserAuthOption) (handler context.Handler, err error)
- type CachedAuth
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func FirstError ¶
func ReturnError ¶
func ReturnErrorText ¶
func ReturnErrorWithStatus ¶
func SafeBasicAuthLoad ¶
Types ¶
type CachedAuth ¶
type CachedAuth struct {
// contains filtered or unexported fields
}
func NewCachedAuth ¶
func NewCachedAuth(expirationDuration time.Duration) *CachedAuth
func (*CachedAuth) Option ¶
func (a *CachedAuth) Option(options *basicauth.UserAuthOptions)
Click to show internal directories.
Click to hide internal directories.