handler

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 400
	ErrAlreadyRegistered = errors.New("already registered")
	ErrIDCannotRequest   = errors.New("ID cannot be requested")
	ErrIDUnchangeable    = errors.New("ID is unchangeable")

	// 401
	ErrAuthenticationFailed = errors.New("authentication failed")

	// 404
	ErrNotFound = errors.New("not found")
)

Functions

func NewEcho

func NewEcho(h *Handler) *echo.Echo

func NewLogger added in v1.3.0

func NewLogger() *slog.Logger

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(s service.Service, config *HandlerConfig) *Handler

type HandlerConfig added in v1.2.2

type HandlerConfig struct {
	JwtKey           []byte
	ValidityMin      int // JWTのexp
	DateTimeLayout   string
	Location         *time.Location
	Locale           string
	Indent           string // レスポンスのJSONのインデント
	TimeoutSec       int
	RequestBodyLimit string
	RateLimit        int
}

type JwtCustomClaims

type JwtCustomClaims struct {
	jwt.RegisteredClaims

	UserId uint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL