handler

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotFound             = errors.New("Not Found")
	ErrorAuthenticationFailed = errors.New("Authentication Failed")
	ErrorAlreadyRegistered    = errors.New("Already Registered")
	ErrorIDCannotRequest      = errors.New("ID cannot be requested")
	ErrorIDUnchangeable       = errors.New("ID is unchangeable")
)

Functions

func NewCustomValidator

func NewCustomValidator() *customValidator

func NewEcho

func NewEcho(h *Handler) *echo.Echo

Types

type Handler

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

func NewHandler

func NewHandler(db *gorm.DB, jwtkey []byte, location *time.Location) *Handler

func (*Handler) AddUser

func (h *Handler) AddUser(c echo.Context) error

func (*Handler) CreatePrice

func (h *Handler) CreatePrice(c echo.Context) error

func (*Handler) DeletePrice

func (h *Handler) DeletePrice(c echo.Context) error

func (*Handler) FindPrice

func (h *Handler) FindPrice(c echo.Context) error

func (*Handler) FindPrices

func (h *Handler) FindPrices(c echo.Context) error

func (*Handler) GenToken

func (h *Handler) GenToken(c echo.Context) error

func (*Handler) InitDB

func (h *Handler) InitDB() error

func (*Handler) UpdatePrice

func (h *Handler) UpdatePrice(c echo.Context) error

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