Documentation
¶
Index ¶
Constants ¶
View Source
const ( Ok = 200 NotOk = 400 Forbidden = 403 InternalServerError = 500 )
Custom error codes and error messages
View Source
const ( OkMsg = "success" NotOkMsg = "failed" ForbiddenMsg = "not authorized to access this resource, please contact the administrator" InternalServerErrorMsg = "internal server error" )
Variables ¶
View Source
var CustomError = map[int]string{ Ok: OkMsg, NotOk: NotOkMsg, Unauthorized: UnauthorizedMsg, Forbidden: ForbiddenMsg, InternalServerError: InternalServerErrorMsg, }
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
}
func NewConversationHandler ¶
func NewConversationHandler(c container.Container, s service.ConversationService) ConversationHandler
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
}
func NewUserHandler ¶
func NewUserHandler(c container.Container, s service.UserService) UserHandler
Click to show internal directories.
Click to hide internal directories.