handler

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 400
	ErrorAlreadyRegistered = errors.New("already registered")
	ErrorIDCannotRequest   = errors.New("ID cannot be requested")
	ErrorIDUnchangeable    = errors.New("ID is unchangeable")

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

	// 404
	ErrorNotFound = 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
	Location    *time.Location
	Locale      string
	Indent      string // レスポンスのJSONのインデント
	TimeoutSec  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