controller

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUser

type AuthUser struct {
	UserId string
	Email  string
	RoleId int
}

type Context

type Context interface {
	// echo.Context methods
	Path() string
	Request() *http.Request
	String(code int, s string) error
	JSON(code int, i interface{}) error
	NoContent(code int) error
	Get(key string) interface{}
	Set(key string, val interface{})
	MultipartForm() (*multipart.Form, error)
	FormValue(name string) string
	QueryParam(name string) string
	Param(name string) string
	// custom methods
	GetLogger() logger.Logger
	SetContextLogger(log logger.Logger)
	Authorization() (claims jwt.MapClaims, err error)
	Validate(request interface{}) error
	ReadRequest(request interface{}) error
	SetAuthUser(authUser *AuthUser)
	GetAuthUser() *AuthUser
}

Jump to

Keyboard shortcuts

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