v1

package
v0.6.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data,omitempty"`
	Error   string      `json:"error,omitempty"`
	Message string      `json:"message,omitempty"`
}

Response helper structures.

type APIRouter

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

APIRouter manages all v1 API routes.

func NewAPIRouter

func NewAPIRouter(rbac *auth.RBAC, jwtManager *auth.JWTManager, ldapHandlers *ldap.LDAPHandlers) *APIRouter

NewAPIRouter creates a new API router instance.

func (*APIRouter) HandleAssignTicket

func (router *APIRouter) HandleAssignTicket(c *gin.Context)

HandleAssignTicket assigns a ticket to a user.

func (*APIRouter) HandleCloseTicket

func (router *APIRouter) HandleCloseTicket(c *gin.Context)

HandleCloseTicket closes a ticket.

func (*APIRouter) HandleCreateTicket

func (router *APIRouter) HandleCreateTicket(c *gin.Context)

HandleCreateTicket creates a new ticket.

func (*APIRouter) HandleDeleteTicket

func (router *APIRouter) HandleDeleteTicket(c *gin.Context)

HandleDeleteTicket archives a ticket (OTRS doesn't hard delete tickets) - exported for YAML routing.

func (*APIRouter) HandleListTickets

func (router *APIRouter) HandleListTickets(c *gin.Context)

HandleListTickets returns a paginated list of tickets (exported for tests).

func (*APIRouter) HandleReopenTicket

func (router *APIRouter) HandleReopenTicket(c *gin.Context)

HandleReopenTicket reopens a closed ticket.

func (*APIRouter) HandleUpdateTicket

func (router *APIRouter) HandleUpdateTicket(c *gin.Context)

HandleUpdateTicket updates a ticket (exported for tests).

func (*APIRouter) SetupTicketArticleRoutes

func (router *APIRouter) SetupTicketArticleRoutes(r *gin.Engine)

SetupTicketArticleRoutes registers only ticket article routes (not in YAML).

func (*APIRouter) SetupV1Routes

func (router *APIRouter) SetupV1Routes(r *gin.Engine)

SetupV1Routes configures all v1 API routes.

type IncidentHandlers

type IncidentHandlers struct {
}

IncidentHandlers handles incident-related HTTP requests.

func NewIncidentHandlers

func NewIncidentHandlers() *IncidentHandlers

NewIncidentHandlers creates a new incident handlers instance.

func (*IncidentHandlers) RegisterRoutes

func (h *IncidentHandlers) RegisterRoutes(router *gin.RouterGroup)

RegisterRoutes registers incident routes.

type LDAPHandler

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

LDAPHandler handles LDAP-related API endpoints.

func NewLDAPHandler

func NewLDAPHandler(ldapService *service.LDAPService) *LDAPHandler

NewLDAPHandler creates a new LDAP handler.

func (*LDAPHandler) AuthenticateUser

func (h *LDAPHandler) AuthenticateUser(c *gin.Context)

POST /api/v1/ldap/authenticate.

func (*LDAPHandler) ConfigureLDAP

func (h *LDAPHandler) ConfigureLDAP(c *gin.Context)

POST /api/v1/ldap/configure.

func (*LDAPHandler) DisableLDAP

func (h *LDAPHandler) DisableLDAP(c *gin.Context)

POST /api/v1/ldap/disable.

func (*LDAPHandler) GetAuthenticationLogs

func (h *LDAPHandler) GetAuthenticationLogs(c *gin.Context)

GET /api/v1/ldap/logs/auth.

func (*LDAPHandler) GetConfiguration

func (h *LDAPHandler) GetConfiguration(c *gin.Context)

GET /api/v1/ldap/config.

func (*LDAPHandler) GetGroupMappings

func (h *LDAPHandler) GetGroupMappings(c *gin.Context)

GET /api/v1/ldap/mappings/groups.

func (*LDAPHandler) GetGroups

func (h *LDAPHandler) GetGroups(c *gin.Context)

GET /api/v1/ldap/groups.

func (*LDAPHandler) GetSyncStatus

func (h *LDAPHandler) GetSyncStatus(c *gin.Context)

GET /api/v1/ldap/sync/status.

func (*LDAPHandler) GetUser

func (h *LDAPHandler) GetUser(c *gin.Context)

GET /api/v1/ldap/users/:username.

func (*LDAPHandler) GetUserMappings

func (h *LDAPHandler) GetUserMappings(c *gin.Context)

GET /api/v1/ldap/mappings/users.

func (*LDAPHandler) ImportUsers

func (h *LDAPHandler) ImportUsers(c *gin.Context)

POST /api/v1/ldap/import/users.

func (*LDAPHandler) RegisterRoutes

func (h *LDAPHandler) RegisterRoutes(r *gin.RouterGroup)

RegisterRoutes registers LDAP routes.

func (*LDAPHandler) SearchUsers

func (h *LDAPHandler) SearchUsers(c *gin.Context)

GET /api/v1/ldap/users/search.

func (*LDAPHandler) SyncUsers

func (h *LDAPHandler) SyncUsers(c *gin.Context)

POST /api/v1/ldap/sync/users.

func (*LDAPHandler) TestConnection

func (h *LDAPHandler) TestConnection(c *gin.Context)

POST /api/v1/ldap/test.

type PaginatedResponse

type PaginatedResponse struct {
	Success    bool        `json:"success"`
	Data       interface{} `json:"data"`
	Pagination Pagination  `json:"pagination"`
	Error      string      `json:"error,omitempty"`
}

type Pagination

type Pagination struct {
	Page       int  `json:"page"`
	PerPage    int  `json:"per_page"`
	Total      int  `json:"total"`
	TotalPages int  `json:"total_pages"`
	HasNext    bool `json:"has_next"`
	HasPrev    bool `json:"has_prev"`
}

type WebhookHandlers

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

WebhookHandlers handles webhook-related API endpoints.

func NewWebhookHandlers

func NewWebhookHandlers(webhookManager *webhook.Manager) *WebhookHandlers

NewWebhookHandlers creates a new webhook handlers instance.

func (*WebhookHandlers) SetupWebhookRoutes

func (h *WebhookHandlers) SetupWebhookRoutes(router *APIRouter, adminRoutes *gin.RouterGroup)

SetupWebhookRoutes sets up webhook API routes.

Jump to

Keyboard shortcuts

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