internal

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

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,但不强制要求)

func Run

func Run(configPath string)

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

func InitializeApp(logger *zap.Logger, db *gorm.DB, cfg *config.AppConfig) (*AppComponents, error)

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

Jump to

Keyboard shortcuts

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