Documentation ¶
Index ¶
- Constants
- func ErrBadRequest(err error, messages ...string) *fiber.Error
- func ErrConflict(err error, message ...string) *fiber.Error
- func ErrForbidden(err error, messages ...string) *fiber.Error
- func ErrInternalServerError(err error, messages ...string) *fiber.Error
- func ErrTooManyRequests(err error, message ...string) *fiber.Error
- func ErrUnauthorized(err error, messages ...string) *fiber.Error
- func JWT(cfg *Settings, claimsType jwt.Claims) fiber.Handler
- func MuxSubRouter(parent fiber.Router, prefix string) *mux.Router
- type App
- func (app *App) Context() context.Context
- func (app *App) ContextWithCancel() (context.Context, context.CancelFunc)
- func (app *App) ContextWithDeadline(deadline time.Time) (context.Context, context.CancelFunc)
- func (app *App) ContextWithTimeout(timeout time.Duration) (context.Context, context.CancelFunc)
- func (app *App) ContextWithValue(key interface{}, value interface{}) context.Context
- func (app *App) Fiber() *fiber.App
- func (app *App) Get(path string, handler fiber.Handler) *App
- func (app *App) IsRunning() bool
- func (app *App) Log(module string, subModule ...string) *zerolog.Logger
- func (app *App) Post(path string, handler fiber.Handler) *App
- func (app *App) Router(prefix string, handlers ...fiber.Handler) fiber.Router
- func (app *App) Start(addr string) error
- func (app *App) StartChild(task Task)
- func (app *App) StartChildDelayed(delay time.Duration, task, teardown Task)
- func (app *App) StartChildInterval(interval time.Duration, task, teardown Task)
- func (app *App) StartTLS(addr, certFile, keyFile string) error
- func (app *App) Use(handlers ...fiber.Handler) *App
- func (app *App) UseHttpHandler(h http.Handler)
- func (app *App) WrapStart(startFunc func() error) error
- type Ctx
- type KeyEntry
- type KeyTable
- type LoginFunc
- type Settings
- type Task
Constants ¶
View Source
const JwtContextKey = "jwt"
Variables ¶
This section is empty.
Functions ¶
func ErrBadRequest ¶
func ErrConflict ¶ added in v0.4.0
func ErrForbidden ¶
func ErrInternalServerError ¶
func ErrTooManyRequests ¶ added in v0.5.5
func ErrUnauthorized ¶
func MuxSubRouter ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) ContextWithCancel ¶ added in v0.2.0
func (app *App) ContextWithCancel() (context.Context, context.CancelFunc)
func (*App) ContextWithDeadline ¶ added in v0.2.0
func (*App) ContextWithTimeout ¶ added in v0.2.0
func (*App) ContextWithValue ¶ added in v0.2.0
func (*App) StartChild ¶ added in v0.3.1
func (*App) StartChildDelayed ¶ added in v0.3.1
func (*App) StartChildInterval ¶ added in v0.3.1
func (*App) UseHttpHandler ¶
type KeyTable ¶
type KeyTable struct {
// contains filtered or unexported fields
}
func LoadKeyTableFromDir ¶
func NewKeyTable ¶
func NewKeyTable() *KeyTable
func (*KeyTable) GetPrivateKeys ¶
func (*KeyTable) GetPublicKeys ¶
type Settings ¶
type Settings struct { Fiber fiber.Config Limiter limiter.Config Name string CSRFPath string LoginPath string LoginHandler LoginFunc KeyTableDir string Logger *zerolog.Logger Context context.Context SkipAuth func(ctx *fiber.Ctx) bool AllowOrigins string // LogLevel sets the default accepted level for logging. It is ignored if Settings.Logger is provided. LogLevel zerolog.Level ColorfulLogging bool }
Click to show internal directories.
Click to hide internal directories.