Documentation
¶
Overview ¶
Package api provides shared API handlers and utilities for article creation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserIDFromCtx ¶
GetUserIDFromCtx extracts the user ID from the gin context with proper type handling.
func HandleCreateArticleAPI ¶
HandleCreateArticleAPI handles POST /api/v1/tickets/:ticket_id/articles.
func HandleListTicketsAPI ¶
HandleListTicketsAPI handles GET /api/v1/tickets.
func HandleUpdateTicketAPI ¶
HandleUpdateTicketAPI handles PUT /api/v1/tickets/:id.
Types ¶
type PaginationInfo ¶
type PaginationInfo 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"`
}
PaginationInfo contains pagination metadata.
type TicketListResponse ¶
type TicketListResponse struct {
Success bool `json:"success"`
Data []map[string]interface{} `json:"data"`
Pagination PaginationInfo `json:"pagination"`
Error string `json:"error,omitempty"`
}
TicketListResponse represents the response for ticket list API.
Click to show internal directories.
Click to hide internal directories.