Documentation
¶
Overview ¶
Package http provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type APIHandler
- func (h *APIHandler) CreateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) CreateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) DeleteSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) DeleteTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) GetHealth(w http.ResponseWriter, r *http.Request)
- func (h *APIHandler) GetPrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) GetSlackUserInfo(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, userId string)
- func (h *APIHandler) GetTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) GetWorkspace(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) GetWorkspaceConfig(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) ListComments(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) ListPromptHistory(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) ListPrompts(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) ListSlackUsers(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) ListSources(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) ListTickets(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) ListToolSettings(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (h *APIHandler) ListWorkspaces(w http.ResponseWriter, r *http.Request)
- func (h *APIHandler) RestorePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) SavePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) SetToolEnabled(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) UpdateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (h *APIHandler) UpdateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- type ChiServerOptions
- type Comment
- type CreateSourceJSONRequestBody
- type CreateSourceRequest
- type CreateSourceRequestProvider
- type CreateTicketJSONRequestBody
- type CreateTicketRequest
- type EntityLabels
- type FieldDefinition
- type FieldOption
- type FieldType
- type FieldValue
- type InvalidParamFormatError
- type ListTicketsParams
- type MiddlewareFunc
- type NotionSource
- type NotionSourceObjectType
- type PromptAuthor
- type PromptDetail
- type PromptId
- type PromptSlot
- type PromptVersion
- type PromptVersionConflict
- type PromptVersionConflictError
- type QuickActionsInteractionsUC
- type RequiredHeaderError
- type RequiredParamError
- type RestorePromptJSONBody
- type RestorePromptJSONRequestBody
- type SavePromptJSONBody
- type SavePromptJSONRequestBody
- type Server
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTicket(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteTicket(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPrompt(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSlackUserInfo(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTicket(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetWorkspace(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetWorkspaceConfig(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListComments(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPromptHistory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPrompts(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSlackUsers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSources(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListTickets(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListToolSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListWorkspaces(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RestorePrompt(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SavePrompt(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SetToolEnabled(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateTicket(w http.ResponseWriter, r *http.Request)
- type ServerOption
- type SetToolEnabledJSONBody
- type SetToolEnabledJSONRequestBody
- type SlackConfig
- type SlackUserInfo
- type Source
- type SourceProvider
- type StatusDef
- type Ticket
- type TicketConfig
- type TicketId
- type TooManyValuesForParamError
- type ToolState
- type ToolStateReason
- type TriageInteractionsUC
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CreateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) CreateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) DeleteSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) DeleteTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetPrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) GetSlackUserInfo(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, userId string)
- func (_ Unimplemented) GetTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) GetWorkspace(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) GetWorkspaceConfig(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) ListComments(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) ListPromptHistory(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) ListPrompts(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) ListSlackUsers(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) ListSources(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) ListTickets(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) ListToolSettings(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
- func (_ Unimplemented) ListWorkspaces(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) RestorePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) SavePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) SetToolEnabled(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) UpdateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- func (_ Unimplemented) UpdateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ...)
- type UnmarshalingParamError
- type UpdateSourceJSONRequestBody
- type UpdateSourceRequest
- type UpdateTicketJSONRequestBody
- type UpdateTicketRequest
- type Workspace
- type WorkspaceConfig
- type WorkspaceId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
func NewAPIHandler ¶
func NewAPIHandler(registry *model.WorkspaceRegistry, repo interfaces.Repository, notifier usecase.TicketChangeNotifier, llm gollem.LLMClient, slackUC *usecase.SlackUseCase, sourceUC *source.UseCase, catalog *tool.Catalog, promptUC *prompt.UseCase) *APIHandler
func (*APIHandler) CreateSource ¶
func (h *APIHandler) CreateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) CreateTicket ¶
func (h *APIHandler) CreateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) DeleteSource ¶
func (h *APIHandler) DeleteSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, sourceId string)
func (*APIHandler) DeleteTicket ¶
func (h *APIHandler) DeleteTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
func (*APIHandler) GetHealth ¶
func (h *APIHandler) GetHealth(w http.ResponseWriter, r *http.Request)
func (*APIHandler) GetPrompt ¶
func (h *APIHandler) GetPrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
func (*APIHandler) GetSlackUserInfo ¶
func (h *APIHandler) GetSlackUserInfo(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, userId string)
func (*APIHandler) GetTicket ¶
func (h *APIHandler) GetTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
func (*APIHandler) GetWorkspace ¶
func (h *APIHandler) GetWorkspace(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) GetWorkspaceConfig ¶
func (h *APIHandler) GetWorkspaceConfig(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) ListComments ¶
func (h *APIHandler) ListComments(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
func (*APIHandler) ListPromptHistory ¶
func (h *APIHandler) ListPromptHistory(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
func (*APIHandler) ListPrompts ¶
func (h *APIHandler) ListPrompts(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) ListSlackUsers ¶
func (h *APIHandler) ListSlackUsers(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) ListSources ¶
func (h *APIHandler) ListSources(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) ListTickets ¶
func (h *APIHandler) ListTickets(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, params ListTicketsParams)
func (*APIHandler) ListToolSettings ¶
func (h *APIHandler) ListToolSettings(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
func (*APIHandler) ListWorkspaces ¶
func (h *APIHandler) ListWorkspaces(w http.ResponseWriter, r *http.Request)
func (*APIHandler) RestorePrompt ¶
func (h *APIHandler) RestorePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
func (*APIHandler) SavePrompt ¶
func (h *APIHandler) SavePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
func (*APIHandler) SetToolEnabled ¶
func (h *APIHandler) SetToolEnabled(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, providerId string)
func (*APIHandler) UpdateSource ¶
func (h *APIHandler) UpdateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, sourceId string)
func (*APIHandler) UpdateTicket ¶
func (h *APIHandler) UpdateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type Comment ¶
type Comment struct {
Body string `json:"body"`
CreatedAt time.Time `json:"createdAt"`
Id string `json:"id"`
SlackUserId string `json:"slackUserId"`
}
Comment defines model for Comment.
type CreateSourceJSONRequestBody ¶
type CreateSourceJSONRequestBody = CreateSourceRequest
CreateSourceJSONRequestBody defines body for CreateSource for application/json ContentType.
type CreateSourceRequest ¶
type CreateSourceRequest struct {
Description *string `json:"description,omitempty"`
Provider CreateSourceRequestProvider `json:"provider"`
Url string `json:"url"`
}
CreateSourceRequest defines model for CreateSourceRequest.
type CreateSourceRequestProvider ¶
type CreateSourceRequestProvider string
CreateSourceRequestProvider defines model for CreateSourceRequest.Provider.
const (
CreateSourceRequestProviderNotion CreateSourceRequestProvider = "notion"
)
Defines values for CreateSourceRequestProvider.
type CreateTicketJSONRequestBody ¶
type CreateTicketJSONRequestBody = CreateTicketRequest
CreateTicketJSONRequestBody defines body for CreateTicket for application/json ContentType.
type CreateTicketRequest ¶
type CreateTicketRequest struct {
AssigneeIds *[]string `json:"assigneeIds,omitempty"`
Description *string `json:"description,omitempty"`
Fields *[]FieldValue `json:"fields,omitempty"`
StatusId *string `json:"statusId,omitempty"`
Title string `json:"title"`
}
CreateTicketRequest defines model for CreateTicketRequest.
type EntityLabels ¶
type EntityLabels struct {
Description string `json:"description"`
Ticket string `json:"ticket"`
Title string `json:"title"`
}
EntityLabels defines model for EntityLabels.
type FieldDefinition ¶
type FieldDefinition struct {
Description *string `json:"description,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
Options *[]FieldOption `json:"options,omitempty"`
Required bool `json:"required"`
Type FieldType `json:"type"`
}
FieldDefinition defines model for FieldDefinition.
type FieldOption ¶
type FieldOption struct {
Color *string `json:"color,omitempty"`
Id string `json:"id"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name"`
}
FieldOption defines model for FieldOption.
type FieldValue ¶
FieldValue defines model for FieldValue.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListTicketsParams ¶
type ListTicketsParams struct {
StatusId *string `form:"statusId,omitempty" json:"statusId,omitempty"`
IsClosed *bool `form:"isClosed,omitempty" json:"isClosed,omitempty"`
}
ListTicketsParams defines parameters for ListTickets.
type NotionSource ¶
type NotionSource struct {
ObjectId string `json:"objectId"`
ObjectType NotionSourceObjectType `json:"objectType"`
Title *string `json:"title,omitempty"`
Url string `json:"url"`
}
NotionSource defines model for NotionSource.
type NotionSourceObjectType ¶
type NotionSourceObjectType string
NotionSourceObjectType defines model for NotionSource.ObjectType.
const ( Database NotionSourceObjectType = "database" Page NotionSourceObjectType = "page" )
Defines values for NotionSourceObjectType.
type PromptAuthor ¶
PromptAuthor defines model for PromptAuthor.
type PromptDetail ¶
type PromptDetail struct {
// Content The workspace-specific additional guidance text the user has saved.
// Empty when no override exists yet (the slot is using the bare base
// prompt managed by shepherd).
Content string `json:"content"`
Id string `json:"id"`
IsOverride bool `json:"isOverride"`
UpdatedAt *time.Time `json:"updatedAt"`
UpdatedBy *PromptAuthor `json:"updatedBy,omitempty"`
// Version 0 when no override exists yet, else the latest stored version.
Version int `json:"version"`
}
PromptDetail defines model for PromptDetail.
type PromptSlot ¶
type PromptSlot struct {
// Configured true when at least one override version exists.
Configured bool `json:"configured"`
// Customizable false for slots that are placeholders only.
Customizable bool `json:"customizable"`
Description string `json:"description"`
// Id Stable identifier (e.g. "triage").
Id string `json:"id"`
Label string `json:"label"`
Length int `json:"length"`
UpdatedAt *time.Time `json:"updatedAt"`
UpdatedBy *PromptAuthor `json:"updatedBy,omitempty"`
// Version Current version (0 when no override exists yet).
Version int `json:"version"`
}
PromptSlot defines model for PromptSlot.
type PromptVersion ¶
type PromptVersion struct {
Content string `json:"content"`
Current bool `json:"current"`
UpdatedAt time.Time `json:"updatedAt"`
UpdatedBy *PromptAuthor `json:"updatedBy,omitempty"`
Version int `json:"version"`
}
PromptVersion defines model for PromptVersion.
type PromptVersionConflict ¶
type PromptVersionConflict struct {
CurrentVersion int `json:"currentVersion"`
Error PromptVersionConflictError `json:"error"`
}
PromptVersionConflict defines model for PromptVersionConflict.
type PromptVersionConflictError ¶
type PromptVersionConflictError string
PromptVersionConflictError defines model for PromptVersionConflict.Error.
const (
VersionConflict PromptVersionConflictError = "version_conflict"
)
Defines values for PromptVersionConflictError.
type QuickActionsInteractionsUC ¶
type QuickActionsInteractionsUC interface {
HandleAssigneeChange(ctx context.Context, channelID, threadTS string, userIDs []string) error
HandleStatusChange(ctx context.Context, channelID, threadTS, statusID string) error
}
QuickActionsInteractionsUC is the surface needed to react to the inline quick-actions menu (assignee + status selects). Resolution of the underlying ticket happens inside the usecase via channel + thread timestamp, so the handler does not touch the registry.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type RestorePromptJSONBody ¶
type RestorePromptJSONBody struct {
// TargetVersion The version to restore from.
TargetVersion int `json:"targetVersion"`
// Version The new version number to write the restored content as. Must equal current+1.
Version int `json:"version"`
}
RestorePromptJSONBody defines parameters for RestorePrompt.
type RestorePromptJSONRequestBody ¶
type RestorePromptJSONRequestBody RestorePromptJSONBody
RestorePromptJSONRequestBody defines body for RestorePrompt for application/json ContentType.
type SavePromptJSONBody ¶
type SavePromptJSONBody struct {
Content string `json:"content"`
// Version The version number the caller is writing. Must equal current+1 (or 1 when no override exists yet); otherwise 409 Conflict.
Version int `json:"version"`
}
SavePromptJSONBody defines parameters for SavePrompt.
type SavePromptJSONRequestBody ¶
type SavePromptJSONRequestBody SavePromptJSONBody
SavePromptJSONRequestBody defines body for SavePrompt for application/json ContentType.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(registry *model.WorkspaceRegistry, repo interfaces.Repository, authUC usecase.AuthUseCaseInterface, opts ...ServerOption) *Server
type ServerInterface ¶
type ServerInterface interface {
// (GET /api/v1/health)
GetHealth(w http.ResponseWriter, r *http.Request)
// (GET /api/v1/ws)
ListWorkspaces(w http.ResponseWriter, r *http.Request)
// (GET /api/v1/ws/{workspaceId})
GetWorkspace(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (GET /api/v1/ws/{workspaceId}/config)
GetWorkspaceConfig(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (GET /api/v1/ws/{workspaceId}/prompts)
ListPrompts(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (GET /api/v1/ws/{workspaceId}/prompts/{promptId})
GetPrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
// (PUT /api/v1/ws/{workspaceId}/prompts/{promptId})
SavePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
// (GET /api/v1/ws/{workspaceId}/prompts/{promptId}/history)
ListPromptHistory(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
// (POST /api/v1/ws/{workspaceId}/prompts/{promptId}/restore)
RestorePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
// (GET /api/v1/ws/{workspaceId}/slack/users)
ListSlackUsers(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (GET /api/v1/ws/{workspaceId}/slack/users/{userId})
GetSlackUserInfo(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, userId string)
// (GET /api/v1/ws/{workspaceId}/sources)
ListSources(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (POST /api/v1/ws/{workspaceId}/sources)
CreateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (DELETE /api/v1/ws/{workspaceId}/sources/{sourceId})
DeleteSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, sourceId string)
// (PATCH /api/v1/ws/{workspaceId}/sources/{sourceId})
UpdateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, sourceId string)
// (GET /api/v1/ws/{workspaceId}/tickets)
ListTickets(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, params ListTicketsParams)
// (POST /api/v1/ws/{workspaceId}/tickets)
CreateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (DELETE /api/v1/ws/{workspaceId}/tickets/{ticketId})
DeleteTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
// (GET /api/v1/ws/{workspaceId}/tickets/{ticketId})
GetTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
// (PATCH /api/v1/ws/{workspaceId}/tickets/{ticketId})
UpdateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
// (GET /api/v1/ws/{workspaceId}/tickets/{ticketId}/comments)
ListComments(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
// (GET /api/v1/ws/{workspaceId}/tools)
ListToolSettings(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
// (PUT /api/v1/ws/{workspaceId}/tools/{providerId})
SetToolEnabled(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, providerId string)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateSource ¶
func (siw *ServerInterfaceWrapper) CreateSource(w http.ResponseWriter, r *http.Request)
CreateSource operation middleware
func (*ServerInterfaceWrapper) CreateTicket ¶
func (siw *ServerInterfaceWrapper) CreateTicket(w http.ResponseWriter, r *http.Request)
CreateTicket operation middleware
func (*ServerInterfaceWrapper) DeleteSource ¶
func (siw *ServerInterfaceWrapper) DeleteSource(w http.ResponseWriter, r *http.Request)
DeleteSource operation middleware
func (*ServerInterfaceWrapper) DeleteTicket ¶
func (siw *ServerInterfaceWrapper) DeleteTicket(w http.ResponseWriter, r *http.Request)
DeleteTicket operation middleware
func (*ServerInterfaceWrapper) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetPrompt ¶
func (siw *ServerInterfaceWrapper) GetPrompt(w http.ResponseWriter, r *http.Request)
GetPrompt operation middleware
func (*ServerInterfaceWrapper) GetSlackUserInfo ¶
func (siw *ServerInterfaceWrapper) GetSlackUserInfo(w http.ResponseWriter, r *http.Request)
GetSlackUserInfo operation middleware
func (*ServerInterfaceWrapper) GetTicket ¶
func (siw *ServerInterfaceWrapper) GetTicket(w http.ResponseWriter, r *http.Request)
GetTicket operation middleware
func (*ServerInterfaceWrapper) GetWorkspace ¶
func (siw *ServerInterfaceWrapper) GetWorkspace(w http.ResponseWriter, r *http.Request)
GetWorkspace operation middleware
func (*ServerInterfaceWrapper) GetWorkspaceConfig ¶
func (siw *ServerInterfaceWrapper) GetWorkspaceConfig(w http.ResponseWriter, r *http.Request)
GetWorkspaceConfig operation middleware
func (*ServerInterfaceWrapper) ListComments ¶
func (siw *ServerInterfaceWrapper) ListComments(w http.ResponseWriter, r *http.Request)
ListComments operation middleware
func (*ServerInterfaceWrapper) ListPromptHistory ¶
func (siw *ServerInterfaceWrapper) ListPromptHistory(w http.ResponseWriter, r *http.Request)
ListPromptHistory operation middleware
func (*ServerInterfaceWrapper) ListPrompts ¶
func (siw *ServerInterfaceWrapper) ListPrompts(w http.ResponseWriter, r *http.Request)
ListPrompts operation middleware
func (*ServerInterfaceWrapper) ListSlackUsers ¶
func (siw *ServerInterfaceWrapper) ListSlackUsers(w http.ResponseWriter, r *http.Request)
ListSlackUsers operation middleware
func (*ServerInterfaceWrapper) ListSources ¶
func (siw *ServerInterfaceWrapper) ListSources(w http.ResponseWriter, r *http.Request)
ListSources operation middleware
func (*ServerInterfaceWrapper) ListTickets ¶
func (siw *ServerInterfaceWrapper) ListTickets(w http.ResponseWriter, r *http.Request)
ListTickets operation middleware
func (*ServerInterfaceWrapper) ListToolSettings ¶
func (siw *ServerInterfaceWrapper) ListToolSettings(w http.ResponseWriter, r *http.Request)
ListToolSettings operation middleware
func (*ServerInterfaceWrapper) ListWorkspaces ¶
func (siw *ServerInterfaceWrapper) ListWorkspaces(w http.ResponseWriter, r *http.Request)
ListWorkspaces operation middleware
func (*ServerInterfaceWrapper) RestorePrompt ¶
func (siw *ServerInterfaceWrapper) RestorePrompt(w http.ResponseWriter, r *http.Request)
RestorePrompt operation middleware
func (*ServerInterfaceWrapper) SavePrompt ¶
func (siw *ServerInterfaceWrapper) SavePrompt(w http.ResponseWriter, r *http.Request)
SavePrompt operation middleware
func (*ServerInterfaceWrapper) SetToolEnabled ¶
func (siw *ServerInterfaceWrapper) SetToolEnabled(w http.ResponseWriter, r *http.Request)
SetToolEnabled operation middleware
func (*ServerInterfaceWrapper) UpdateSource ¶
func (siw *ServerInterfaceWrapper) UpdateSource(w http.ResponseWriter, r *http.Request)
UpdateSource operation middleware
func (*ServerInterfaceWrapper) UpdateTicket ¶
func (siw *ServerInterfaceWrapper) UpdateTicket(w http.ResponseWriter, r *http.Request)
UpdateTicket operation middleware
type ServerOption ¶
type ServerOption func(*Server)
func WithLLM ¶
func WithLLM(llm gollem.LLMClient) ServerOption
WithLLM wires the LLM client used by ticket-side close-time conclusion generation. When omitted, the conclusion generator on TicketUseCase gracefully no-ops (status updates and notifications still run).
func WithPrompt ¶
func WithPrompt(promptUC *prompt.UseCase) ServerOption
WithPrompt wires the Prompt management endpoints.
func WithSlack ¶
func WithSlack(cfg SlackConfig) ServerOption
func WithSource ¶
func WithSource(sourceUC *source.UseCase, catalog *tool.Catalog) ServerOption
WithSource wires the Source/Tool-settings management endpoints. catalog and sourceUC are required when this option is applied.
type SetToolEnabledJSONBody ¶
type SetToolEnabledJSONBody struct {
Enabled bool `json:"enabled"`
}
SetToolEnabledJSONBody defines parameters for SetToolEnabled.
type SetToolEnabledJSONRequestBody ¶
type SetToolEnabledJSONRequestBody SetToolEnabledJSONBody
SetToolEnabledJSONRequestBody defines body for SetToolEnabled for application/json ContentType.
type SlackConfig ¶
type SlackConfig struct {
SigningSecret string
SlackUC *usecase.SlackUseCase
Notifier usecase.TicketChangeNotifier
TriageUC TriageInteractionsUC
QuickUC QuickActionsInteractionsUC
}
type SlackUserInfo ¶
type SlackUserInfo struct {
Email *string `json:"email,omitempty"`
Id string `json:"id"`
ImageUrl *string `json:"imageUrl,omitempty"`
Name string `json:"name"`
}
SlackUserInfo defines model for SlackUserInfo.
type Source ¶
type Source struct {
CreatedAt time.Time `json:"createdAt"`
CreatedBy *string `json:"createdBy,omitempty"`
Description *string `json:"description,omitempty"`
Id string `json:"id"`
Notion *NotionSource `json:"notion,omitempty"`
Provider SourceProvider `json:"provider"`
WorkspaceId string `json:"workspaceId"`
}
Source defines model for Source.
type SourceProvider ¶
type SourceProvider string
SourceProvider defines model for Source.Provider.
const (
SourceProviderNotion SourceProvider = "notion"
)
Defines values for SourceProvider.
type StatusDef ¶
type StatusDef struct {
Color string `json:"color"`
Id string `json:"id"`
IsClosed bool `json:"isClosed"`
Name string `json:"name"`
Order int `json:"order"`
}
StatusDef defines model for StatusDef.
type Ticket ¶
type Ticket struct {
AssigneeIds []string `json:"assigneeIds"`
Conclusion *string `json:"conclusion,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Description *string `json:"description,omitempty"`
Fields []FieldValue `json:"fields"`
Id string `json:"id"`
ReporterSlackUserId *string `json:"reporterSlackUserId,omitempty"`
SeqNum int64 `json:"seqNum"`
SlackChannelId *string `json:"slackChannelId,omitempty"`
SlackThreadTs *string `json:"slackThreadTs,omitempty"`
StatusId string `json:"statusId"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updatedAt"`
}
Ticket defines model for Ticket.
type TicketConfig ¶
type TicketConfig struct {
ClosedStatusIds []string `json:"closedStatusIds"`
DefaultStatusId string `json:"defaultStatusId"`
}
TicketConfig defines model for TicketConfig.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type ToolState ¶
type ToolState struct {
Available bool `json:"available"`
DefaultEnabled bool `json:"defaultEnabled"`
Enabled bool `json:"enabled"`
ProviderId string `json:"providerId"`
Reason *ToolStateReason `json:"reason,omitempty"`
}
ToolState defines model for ToolState.
type ToolStateReason ¶
type ToolStateReason string
ToolStateReason defines model for ToolState.Reason.
const ( GateBlocked ToolStateReason = "gate_blocked" WorkspaceDisabled ToolStateReason = "workspace_disabled" )
Defines values for ToolStateReason.
type TriageInteractionsUC ¶
type TriageInteractionsUC interface {
HandleSubmit(ctx context.Context, sub triage.Submission) error
HandleRetry(ctx context.Context, ticketID types.TicketID, channelID, messageTS string) error
// Review flow (new). Open methods are invoked SYNCHRONOUSLY because
// Slack's trigger_id has a ~3-second TTL and views.open must be called
// before that window closes.
HandleReviewEditOpen(ctx context.Context, ticketID types.TicketID, channelID, messageTS, triggerID string) error
HandleReviewReinvestigateOpen(ctx context.Context, ticketID types.TicketID, channelID, messageTS, triggerID string) error
HandleReviewSubmit(ctx context.Context, ticketID types.TicketID, channelID, messageTS, actorID string) error
HandleReviewEditSubmit(ctx context.Context, ticketID types.TicketID, channelID, messageTS, actorID string, state *slackgo.ViewState) (triage.ReviewFieldErrors, error)
HandleReviewReinvestigate(ctx context.Context, ticketID types.TicketID, channelID, messageTS, actorID string, state *slackgo.ViewState) error
}
TriageInteractionsUC is the slim surface the interactions endpoint needs from the triage usecase. Defined as an interface so tests can substitute a fake without instantiating the full executor. The handler stays free of workspace / ticket resolution — every method below takes only raw Slack payload fields and the usecase resolves ticket + workspace internally.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) CreateSource ¶
func (_ Unimplemented) CreateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(POST /api/v1/ws/{workspaceId}/sources)
func (Unimplemented) CreateTicket ¶
func (_ Unimplemented) CreateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(POST /api/v1/ws/{workspaceId}/tickets)
func (Unimplemented) DeleteSource ¶
func (_ Unimplemented) DeleteSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, sourceId string)
(DELETE /api/v1/ws/{workspaceId}/sources/{sourceId})
func (Unimplemented) DeleteTicket ¶
func (_ Unimplemented) DeleteTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
(DELETE /api/v1/ws/{workspaceId}/tickets/{ticketId})
func (Unimplemented) GetHealth ¶
func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
(GET /api/v1/health)
func (Unimplemented) GetPrompt ¶
func (_ Unimplemented) GetPrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
(GET /api/v1/ws/{workspaceId}/prompts/{promptId})
func (Unimplemented) GetSlackUserInfo ¶
func (_ Unimplemented) GetSlackUserInfo(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, userId string)
(GET /api/v1/ws/{workspaceId}/slack/users/{userId})
func (Unimplemented) GetTicket ¶
func (_ Unimplemented) GetTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
(GET /api/v1/ws/{workspaceId}/tickets/{ticketId})
func (Unimplemented) GetWorkspace ¶
func (_ Unimplemented) GetWorkspace(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(GET /api/v1/ws/{workspaceId})
func (Unimplemented) GetWorkspaceConfig ¶
func (_ Unimplemented) GetWorkspaceConfig(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(GET /api/v1/ws/{workspaceId}/config)
func (Unimplemented) ListComments ¶
func (_ Unimplemented) ListComments(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
(GET /api/v1/ws/{workspaceId}/tickets/{ticketId}/comments)
func (Unimplemented) ListPromptHistory ¶
func (_ Unimplemented) ListPromptHistory(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
(GET /api/v1/ws/{workspaceId}/prompts/{promptId}/history)
func (Unimplemented) ListPrompts ¶
func (_ Unimplemented) ListPrompts(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(GET /api/v1/ws/{workspaceId}/prompts)
func (Unimplemented) ListSlackUsers ¶
func (_ Unimplemented) ListSlackUsers(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(GET /api/v1/ws/{workspaceId}/slack/users)
func (Unimplemented) ListSources ¶
func (_ Unimplemented) ListSources(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(GET /api/v1/ws/{workspaceId}/sources)
func (Unimplemented) ListTickets ¶
func (_ Unimplemented) ListTickets(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, params ListTicketsParams)
(GET /api/v1/ws/{workspaceId}/tickets)
func (Unimplemented) ListToolSettings ¶
func (_ Unimplemented) ListToolSettings(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId)
(GET /api/v1/ws/{workspaceId}/tools)
func (Unimplemented) ListWorkspaces ¶
func (_ Unimplemented) ListWorkspaces(w http.ResponseWriter, r *http.Request)
(GET /api/v1/ws)
func (Unimplemented) RestorePrompt ¶
func (_ Unimplemented) RestorePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
(POST /api/v1/ws/{workspaceId}/prompts/{promptId}/restore)
func (Unimplemented) SavePrompt ¶
func (_ Unimplemented) SavePrompt(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, promptId PromptId)
(PUT /api/v1/ws/{workspaceId}/prompts/{promptId})
func (Unimplemented) SetToolEnabled ¶
func (_ Unimplemented) SetToolEnabled(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, providerId string)
(PUT /api/v1/ws/{workspaceId}/tools/{providerId})
func (Unimplemented) UpdateSource ¶
func (_ Unimplemented) UpdateSource(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, sourceId string)
(PATCH /api/v1/ws/{workspaceId}/sources/{sourceId})
func (Unimplemented) UpdateTicket ¶
func (_ Unimplemented) UpdateTicket(w http.ResponseWriter, r *http.Request, workspaceId WorkspaceId, ticketId TicketId)
(PATCH /api/v1/ws/{workspaceId}/tickets/{ticketId})
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateSourceJSONRequestBody ¶
type UpdateSourceJSONRequestBody = UpdateSourceRequest
UpdateSourceJSONRequestBody defines body for UpdateSource for application/json ContentType.
type UpdateSourceRequest ¶
type UpdateSourceRequest struct {
Description string `json:"description"`
}
UpdateSourceRequest defines model for UpdateSourceRequest.
type UpdateTicketJSONRequestBody ¶
type UpdateTicketJSONRequestBody = UpdateTicketRequest
UpdateTicketJSONRequestBody defines body for UpdateTicket for application/json ContentType.
type UpdateTicketRequest ¶
type UpdateTicketRequest struct {
AssigneeIds *[]string `json:"assigneeIds,omitempty"`
Conclusion *string `json:"conclusion,omitempty"`
Description *string `json:"description,omitempty"`
Fields *[]FieldValue `json:"fields,omitempty"`
StatusId *string `json:"statusId,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateTicketRequest defines model for UpdateTicketRequest.
type WorkspaceConfig ¶
type WorkspaceConfig struct {
Fields []FieldDefinition `json:"fields"`
Labels EntityLabels `json:"labels"`
Statuses []StatusDef `json:"statuses"`
TicketConfig TicketConfig `json:"ticketConfig"`
}
WorkspaceConfig defines model for WorkspaceConfig.