Documentation
¶
Overview ¶
Package server provides HTTP handlers for status, queue, and inbox endpoints.
Index ¶
- func NewCompletedHandler(checker status.Checker) libhttp.WithError
- func NewHealthHandler() libhttp.WithError
- func NewInboxHandler(inboxDir string) libhttp.WithError
- func NewQueueActionHandler(inboxDir string, queueDir string, promptManager prompt.Manager, ...) libhttp.WithError
- func NewQueueHandler(checker status.Checker) libhttp.WithError
- func NewStatusHandler(checker status.Checker) libhttp.WithError
- type InboxFile
- type InboxListResponse
- type QueueRequest
- type QueueResponse
- type QueuedFile
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCompletedHandler ¶
NewCompletedHandler creates a handler for the /api/v1/completed endpoint.
func NewHealthHandler ¶
NewHealthHandler creates a handler for the /health endpoint.
func NewInboxHandler ¶
NewInboxHandler creates a handler for the /api/v1/inbox endpoint.
func NewQueueActionHandler ¶
func NewQueueActionHandler( inboxDir string, queueDir string, promptManager prompt.Manager, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) libhttp.WithError
NewQueueActionHandler creates a handler for POST /api/v1/queue endpoints.
func NewQueueHandler ¶
NewQueueHandler creates a handler for the /api/v1/queue endpoint.
Types ¶
type InboxFile ¶
type InboxFile struct {
Name string `json:"name"`
}
InboxFile represents a file in the inbox directory.
type InboxListResponse ¶
type InboxListResponse struct {
Files []InboxFile `json:"files"`
}
InboxListResponse represents the response for GET /api/v1/inbox.
type QueueRequest ¶
type QueueRequest struct {
File string `json:"file"`
}
QueueRequest represents the request body for POST /api/v1/queue.
type QueueResponse ¶
type QueueResponse struct {
Queued []QueuedFile `json:"queued"`
}
QueueResponse represents the response for POST /api/v1/queue.
type QueuedFile ¶
QueuedFile represents a single queued file.