handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ok                  = 200
	NotOk               = 400
	Unauthorized        = 401
	Forbidden           = 403
	InternalServerError = 500
)

Custom error codes and error messages

View Source
const (
	OkMsg                  = "success"
	NotOkMsg               = "failed"
	UnauthorizedMsg        = "login failed. wrong user name or password"
	ForbiddenMsg           = "not authorized to access this resource, please contact the administrator"
	InternalServerErrorMsg = "internal server error"
)

Variables

Functions

This section is empty.

Types

type CodeHandler

type CodeHandler interface {
	Generate(c echo.Context) error
}

func NewCodeHandler

func NewCodeHandler(c container.Container) CodeHandler

type ConversationHandler

type ConversationHandler interface {
	GetConversations(c echo.Context) error
	GetById(c echo.Context) error
	RunConversation(c echo.Context) error
	RunConversationWS(c echo.Context) error
	RunBase(c echo.Context) error
	BatchDeleteByIds(c echo.Context) error
	FeedbackMessage(c echo.Context) error
}

type HealthHandler

type HealthHandler interface {
	GetHealthCheck(c echo.Context) error
}

func NewHealthHandler

func NewHealthHandler(c container.Container) HealthHandler

NewHealthHandler is constructor

type LLMHandler

type LLMHandler interface {
	GetLLMs(c echo.Context) error
}

func NewLLMHandler

func NewLLMHandler(c container.Container) LLMHandler

type RoleHandler

type RoleHandler interface {
	GetRoles(c echo.Context) error
	CreateRole(c echo.Context) error
	UpdateRoleById(c echo.Context) error
}

func NewRoleHandler

func NewRoleHandler(c container.Container) RoleHandler

type UserHandler

type UserHandler interface {
	Login(c echo.Context) error
	GetCurrentUser(c echo.Context) error
	GetUsers(c echo.Context) error
}

Jump to

Keyboard shortcuts

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