Documentation
¶
Index ¶
- func ErrorHandler(logger *zap.Logger) func(next echo.HandlerFunc) echo.HandlerFunc
- func JWTAuthMiddleware(accountHandler *handler.AccountHandler) echo.MiddlewareFunc
- func OptionalJWTAuthMiddleware(accountHandler *handler.AccountHandler) echo.MiddlewareFunc
- func Run(configPath string)
- type AppComponents
- type CustomValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
func ErrorHandler(logger *zap.Logger) func(next echo.HandlerFunc) echo.HandlerFunc
func JWTAuthMiddleware ¶
func JWTAuthMiddleware(accountHandler *handler.AccountHandler) echo.MiddlewareFunc
JWTAuthMiddleware JWT 认证中间件(必须登录)
func OptionalJWTAuthMiddleware ¶
func OptionalJWTAuthMiddleware(accountHandler *handler.AccountHandler) echo.MiddlewareFunc
OptionalJWTAuthMiddleware 可选 JWT 认证中间件(尝试解析 token,但不强制要求)
Types ¶
type AppComponents ¶
type AppComponents struct {
AccountHandler *handler.AccountHandler
AgentHandler *handler.AgentHandler
ApiKeyHandler *handler.ApiKeyHandler
AlertHandler *handler.AlertHandler
PropertyHandler *handler.PropertyHandler
MonitorHandler *handler.MonitorHandler
TamperHandler *handler.TamperHandler
DNSProviderHandler *handler.DNSProviderHandler
DDNSHandler *handler.DDNSHandler
SSHLoginHandler *handler.SSHLoginHandler
AgentService *service.AgentService
TrafficService *service.TrafficService
MetricService *service.MetricService
AlertService *service.AlertService
PropertyService *service.PropertyService
MonitorService *service.MonitorService
ApiKeyService *service.ApiKeyService
TamperService *service.TamperService
DDNSService *service.DDNSService
SSHLoginService *service.SSHLoginService
PublicIPService *service.PublicIPService
WSManager *websocket.Manager
VMClient *vmclient.VMClient
}
AppComponents 应用组件
func InitializeApp ¶
InitializeApp 初始化应用
type CustomValidator ¶
type CustomValidator struct {
Validator *validator.Validate
// contains filtered or unexported fields
}
func (*CustomValidator) TransInit ¶
func (cv *CustomValidator) TransInit() error
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
Click to show internal directories.
Click to hide internal directories.