handler

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminAuthMiddleware

func AdminAuthMiddleware() gin.HandlerFunc

AdminAuthMiddleware creates a middleware that checks if the user has admin role

Types

type Chat

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

func NewChat

func NewChat(db database.Database, logger *zap.Logger) *Chat

func (*Chat) HandleDeleteChatSession

func (h *Chat) HandleDeleteChatSession(c *gin.Context)

HandleDeleteChatSession handles the deletion of a chat session

func (*Chat) HandleGetChatMessages

func (h *Chat) HandleGetChatMessages(c *gin.Context)

func (*Chat) HandleGetChatSessions

func (h *Chat) HandleGetChatSessions(c *gin.Context)

func (*Chat) HandleUpdateChatSessionTitle

func (h *Chat) HandleUpdateChatSessionTitle(c *gin.Context)

HandleUpdateChatSessionTitle handles updating the title of a chat session

type Handler

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

Handler represents the authentication handler

func NewHandler

func NewHandler(db database.Database, jwtService *jwt.Service, cfg *config.MCPGatewayConfig, logger *zap.Logger) *Handler

NewHandler creates a new authentication handler

func (*Handler) ChangePassword

func (h *Handler) ChangePassword(c *gin.Context)

ChangePassword handles password change requests

func (*Handler) CreateTenant

func (h *Handler) CreateTenant(c *gin.Context)

CreateTenant handles tenant creation

func (*Handler) CreateUser

func (h *Handler) CreateUser(c *gin.Context)

CreateUser handles user creation

func (*Handler) DeleteTenant

func (h *Handler) DeleteTenant(c *gin.Context)

DeleteTenant handles tenant deletion

func (*Handler) DeleteUser

func (h *Handler) DeleteUser(c *gin.Context)

DeleteUser handles user deletion

func (*Handler) GetTenantInfo

func (h *Handler) GetTenantInfo(c *gin.Context)

GetTenantInfo handles getting tenant info by name

func (*Handler) GetUserInfo

func (h *Handler) GetUserInfo(c *gin.Context)

GetUserInfo handles getting current user info

func (*Handler) GetUserWithTenants

func (h *Handler) GetUserWithTenants(c *gin.Context)

GetUserWithTenants gets a user with their associated tenants

func (*Handler) ListTenants

func (h *Handler) ListTenants(c *gin.Context)

ListTenants handles listing all tenants

func (*Handler) ListUsers

func (h *Handler) ListUsers(c *gin.Context)

ListUsers handles listing all users

func (*Handler) Login

func (h *Handler) Login(c *gin.Context)

Login handles user login

func (*Handler) UpdateTenant

func (h *Handler) UpdateTenant(c *gin.Context)

UpdateTenant handles tenant updates

func (*Handler) UpdateUser

func (h *Handler) UpdateUser(c *gin.Context)

UpdateUser handles user updates

func (*Handler) UpdateUserTenants

func (h *Handler) UpdateUserTenants(c *gin.Context)

UpdateUserTenants updates the tenant associations for a user

type MCP

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

func NewMCP

func NewMCP(db database.Database, store storage.Store, ntf notifier.Notifier, logger *zap.Logger) *MCP

func (*MCP) HandleGetConfigNames

func (h *MCP) HandleGetConfigNames(c *gin.Context)

HandleGetConfigNames handles the request to get all configuration names

func (*MCP) HandleGetConfigVersions

func (h *MCP) HandleGetConfigVersions(c *gin.Context)

HandleGetConfigVersions handles the request to get configuration versions

func (*MCP) HandleListMCPServers

func (h *MCP) HandleListMCPServers(c *gin.Context)

func (*MCP) HandleMCPServerCreate

func (h *MCP) HandleMCPServerCreate(c *gin.Context)

func (*MCP) HandleMCPServerDelete

func (h *MCP) HandleMCPServerDelete(c *gin.Context)

func (*MCP) HandleMCPServerSync

func (h *MCP) HandleMCPServerSync(c *gin.Context)

func (*MCP) HandleMCPServerUpdate

func (h *MCP) HandleMCPServerUpdate(c *gin.Context)

func (*MCP) HandleSetActiveVersion

func (h *MCP) HandleSetActiveVersion(c *gin.Context)

HandleSetActiveVersion handles setting a version as active

type OpenAPI

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

OpenAPI handles OpenAPI related operations

func NewOpenAPI

func NewOpenAPI(db database.Database, store storage.Store, ntf notifier.Notifier, logger *zap.Logger) *OpenAPI

NewOpenAPI creates a new OpenAPI handler

func (*OpenAPI) HandleImport

func (h *OpenAPI) HandleImport(c *gin.Context)

HandleImport handles OpenAPI import requests

type WebSocket

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

func NewWebSocket

func NewWebSocket(db database.Database, openaiCli *openai.Client, jwtService *jwt.Service, logger *zap.Logger) *WebSocket

func (*WebSocket) HandleWebSocket

func (h *WebSocket) HandleWebSocket(c *gin.Context)

Jump to

Keyboard shortcuts

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