handler

package
v0.0.0-...-e907df4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TODO get value from config
	JwtSecret        = "lai-panel-jwt-secret"
	CtxKeyUserClaims = "user_claims"
)

Variables

This section is empty.

Functions

func ErrorHandlerMiddleware

func ErrorHandlerMiddleware() app.HandlerFunc

Types

type ApiResponse

type ApiResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func EmptyResponse

func EmptyResponse() *ApiResponse

func ErrorResponse

func ErrorResponse(code int, message string) *ApiResponse

func FailResponse

func FailResponse(message string) *ApiResponse

func NewApiResponse

func NewApiResponse(code int, message string, data interface{}) *ApiResponse

func SuccessResponse

func SuccessResponse(data interface{}) *ApiResponse

type BaseHandler

type BaseHandler struct {
	// contains filtered or unexported fields
}

func NewBaseHandler

func NewBaseHandler(appCtx *ctx.AppCtx) *BaseHandler

func (*BaseHandler) AddApplicationHandler

func (h *BaseHandler) AddApplicationHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) AddNodeHandler

func (h *BaseHandler) AddNodeHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) AddOrUpdateEnv

func (b *BaseHandler) AddOrUpdateEnv(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) AppRepository

func (h *BaseHandler) AppRepository() *repository.AppRepository

func (*BaseHandler) AuthMiddleware

func (h *BaseHandler) AuthMiddleware(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) ChangePasswordHandler

func (h *BaseHandler) ChangePasswordHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DashboardStatsHandler

func (h *BaseHandler) DashboardStatsHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DeleteApplicationHandler

func (h *BaseHandler) DeleteApplicationHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DeleteEnv

func (b *BaseHandler) DeleteEnv(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DeleteNodeHandler

func (h *BaseHandler) DeleteNodeHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DeleteServiceHandler

func (h *BaseHandler) DeleteServiceHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainerInspect

func (h *BaseHandler) DockerContainerInspect(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainerLog

func (h *BaseHandler) DockerContainerLog(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainerRemove

func (h *BaseHandler) DockerContainerRemove(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainerRestart

func (h *BaseHandler) DockerContainerRestart(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainerStart

func (h *BaseHandler) DockerContainerStart(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainerStop

func (h *BaseHandler) DockerContainerStop(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerContainers

func (h *BaseHandler) DockerContainers(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerImageInspect

func (h *BaseHandler) DockerImageInspect(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerImagePullAuto

func (h *BaseHandler) DockerImagePullAuto(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerImagePushTo

func (h *BaseHandler) DockerImagePushTo(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerImages

func (h *BaseHandler) DockerImages(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerInfo

func (h *BaseHandler) DockerInfo(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerList

func (h *BaseHandler) DockerList(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerNetworks

func (h *BaseHandler) DockerNetworks(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) DockerProxy

func (h *BaseHandler) DockerProxy() *docker.DockerProxy

func (*BaseHandler) DockerVolumes

func (h *BaseHandler) DockerVolumes(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) EnvRepository

func (h *BaseHandler) EnvRepository() *repository.EnvRepository

func (*BaseHandler) GetApplicationHandler

func (h *BaseHandler) GetApplicationHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetApplicationListHandler

func (h *BaseHandler) GetApplicationListHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetApplicationPageHandler

func (h *BaseHandler) GetApplicationPageHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetDockerEventHandler

func (h *BaseHandler) GetDockerEventHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetEnvPage

func (b *BaseHandler) GetEnvPage(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetEnvScopes

func (b *BaseHandler) GetEnvScopes(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetNodeHandler

func (h *BaseHandler) GetNodeHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetNodeListHandler

func (h *BaseHandler) GetNodeListHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetNodePageHandler

func (h *BaseHandler) GetNodePageHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetRegistryHandler

func (h *BaseHandler) GetRegistryHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetServicePageHandler

func (h *BaseHandler) GetServicePageHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) GetUserInfo

func (h *BaseHandler) GetUserInfo(ctx context.Context, c *app.RequestContext) (*model.User, error)

func (*BaseHandler) HandleDockerComposeConfig

func (b *BaseHandler) HandleDockerComposeConfig(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) HandleDockerComposeDeploy

func (b *BaseHandler) HandleDockerComposeDeploy(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) HandleDockerComposeUndeploy

func (b *BaseHandler) HandleDockerComposeUndeploy(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) HandleDockerProxy

func (b *BaseHandler) HandleDockerProxy(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) HandleFileUpload

func (h *BaseHandler) HandleFileUpload(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) HandleHealthz

func (h *BaseHandler) HandleHealthz(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) HandleWorkspaceUpload

func (h *BaseHandler) HandleWorkspaceUpload(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) KvRepository

func (h *BaseHandler) KvRepository() *repository.KvRepository

func (*BaseHandler) LoginHandler

func (h *BaseHandler) LoginHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) NodeManager

func (h *BaseHandler) NodeManager() *node.NodeManager

func (*BaseHandler) NodeRepository

func (h *BaseHandler) NodeRepository() *repository.NodeRepository

func (*BaseHandler) Options

func (h *BaseHandler) Options() options.IOptions

func (*BaseHandler) SaveServiceHandler

func (h *BaseHandler) SaveServiceHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) ServiceRepository

func (h *BaseHandler) ServiceRepository() *repository.ServiceRepository

func (*BaseHandler) SignalRServer

func (h *BaseHandler) SignalRServer() *hub.SignalRServer

func (*BaseHandler) StaticDataPath

func (h *BaseHandler) StaticDataPath() string

func (*BaseHandler) Tar

func (h *BaseHandler) Tar(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) UpdateApplicationHandler

func (h *BaseHandler) UpdateApplicationHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) UpdateNodeHandler

func (h *BaseHandler) UpdateNodeHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) UserRepository

func (h *BaseHandler) UserRepository() *repository.UserRepository

func (*BaseHandler) WorkSpaceDataPath

func (h *BaseHandler) WorkSpaceDataPath() string

func (*BaseHandler) WorkspaceDeleteHandler

func (h *BaseHandler) WorkspaceDeleteHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) WorkspaceListHandler

func (h *BaseHandler) WorkspaceListHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) WorkspaceMkdirHandler

func (h *BaseHandler) WorkspaceMkdirHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) WorkspaceReadHandler

func (h *BaseHandler) WorkspaceReadHandler(ctx context.Context, c *app.RequestContext)

func (*BaseHandler) WorkspaceSaveHandler

func (h *BaseHandler) WorkspaceSaveHandler(ctx context.Context, c *app.RequestContext)

type CopyWriter

type CopyWriter struct {
	*sse.Writer
}

func (*CopyWriter) Write

func (c *CopyWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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