Files
byre/internal/api/api.gen.go
T

3639 lines
132 KiB
Go

//go:build go1.22
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
package api
import (
"bytes"
"compress/flate"
"encoding/base64"
"errors"
"fmt"
"net/http"
"net/url"
"path"
"strings"
"time"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oapi-codegen/runtime"
)
// Defines values for AgentProcessHealth.
const (
HealthExited AgentProcessHealth = "exited"
HealthOk AgentProcessHealth = "ok"
HealthStuck AgentProcessHealth = "stuck"
)
// Valid indicates whether the value is a known member of the AgentProcessHealth enum.
func (e AgentProcessHealth) Valid() bool {
switch e {
case HealthExited:
return true
case HealthOk:
return true
case HealthStuck:
return true
default:
return false
}
}
// Defines values for AgentSessionRole.
const (
Implementer AgentSessionRole = "implementer"
Lead AgentSessionRole = "lead"
Reviewer AgentSessionRole = "reviewer"
)
// Valid indicates whether the value is a known member of the AgentSessionRole enum.
func (e AgentSessionRole) Valid() bool {
switch e {
case Implementer:
return true
case Lead:
return true
case Reviewer:
return true
default:
return false
}
}
// Defines values for AgentSessionState.
const (
AgentSessionStateCompleted AgentSessionState = "completed"
AgentSessionStateIdle AgentSessionState = "idle"
AgentSessionStateRunning AgentSessionState = "running"
)
// Valid indicates whether the value is a known member of the AgentSessionState enum.
func (e AgentSessionState) Valid() bool {
switch e {
case AgentSessionStateCompleted:
return true
case AgentSessionStateIdle:
return true
case AgentSessionStateRunning:
return true
default:
return false
}
}
// Defines values for AgentSessionVendor.
const (
Claude AgentSessionVendor = "claude"
Codex AgentSessionVendor = "codex"
)
// Valid indicates whether the value is a known member of the AgentSessionVendor enum.
func (e AgentSessionVendor) Valid() bool {
switch e {
case Claude:
return true
case Codex:
return true
default:
return false
}
}
// Defines values for AttachmentKind.
const (
AttachmentKindDiagram AttachmentKind = "diagram"
AttachmentKindDiff AttachmentKind = "diff"
AttachmentKindFile AttachmentKind = "file"
AttachmentKindImage AttachmentKind = "image"
AttachmentKindSnapshot AttachmentKind = "snapshot"
AttachmentKindTask AttachmentKind = "task"
AttachmentKindUrl AttachmentKind = "url"
)
// Valid indicates whether the value is a known member of the AttachmentKind enum.
func (e AttachmentKind) Valid() bool {
switch e {
case AttachmentKindDiagram:
return true
case AttachmentKindDiff:
return true
case AttachmentKindFile:
return true
case AttachmentKindImage:
return true
case AttachmentKindSnapshot:
return true
case AttachmentKindTask:
return true
case AttachmentKindUrl:
return true
default:
return false
}
}
// Defines values for DirEntryType.
const (
DirEntryTypeDir DirEntryType = "dir"
DirEntryTypeFile DirEntryType = "file"
DirEntryTypeOther DirEntryType = "other"
)
// Valid indicates whether the value is a known member of the DirEntryType enum.
func (e DirEntryType) Valid() bool {
switch e {
case DirEntryTypeDir:
return true
case DirEntryTypeFile:
return true
case DirEntryTypeOther:
return true
default:
return false
}
}
// Defines values for FileChangeStatus.
const (
Added FileChangeStatus = "added"
Deleted FileChangeStatus = "deleted"
Modified FileChangeStatus = "modified"
Renamed FileChangeStatus = "renamed"
TypeChanged FileChangeStatus = "type_changed"
)
// Valid indicates whether the value is a known member of the FileChangeStatus enum.
func (e FileChangeStatus) Valid() bool {
switch e {
case Added:
return true
case Deleted:
return true
case Modified:
return true
case Renamed:
return true
case TypeChanged:
return true
default:
return false
}
}
// Defines values for FindingState.
const (
FindingFixed FindingState = "fixed"
FindingIgnored FindingState = "ignored"
)
// Valid indicates whether the value is a known member of the FindingState enum.
func (e FindingState) Valid() bool {
switch e {
case FindingFixed:
return true
case FindingIgnored:
return true
default:
return false
}
}
// Defines values for InboxItemKind.
const (
Question InboxItemKind = "question"
RateLimited InboxItemKind = "rate_limited"
SessionError InboxItemKind = "session_error"
)
// Valid indicates whether the value is a known member of the InboxItemKind enum.
func (e InboxItemKind) Valid() bool {
switch e {
case Question:
return true
case RateLimited:
return true
case SessionError:
return true
default:
return false
}
}
// Defines values for InboxResponseType.
const (
Dismiss InboxResponseType = "dismiss"
Option InboxResponseType = "option"
Other InboxResponseType = "other"
)
// Valid indicates whether the value is a known member of the InboxResponseType enum.
func (e InboxResponseType) Valid() bool {
switch e {
case Dismiss:
return true
case Option:
return true
case Other:
return true
default:
return false
}
}
// Defines values for InboxState.
const (
Answered InboxState = "answered"
Dismissed InboxState = "dismissed"
Open InboxState = "open"
Superseded InboxState = "superseded"
)
// Valid indicates whether the value is a known member of the InboxState enum.
func (e InboxState) Valid() bool {
switch e {
case Answered:
return true
case Dismissed:
return true
case Open:
return true
case Superseded:
return true
default:
return false
}
}
// Defines values for ReviewState.
const (
ReviewStateDone ReviewState = "done"
ReviewStateFailed ReviewState = "failed"
ReviewStateRunning ReviewState = "running"
ReviewStateSkipped ReviewState = "skipped"
)
// Valid indicates whether the value is a known member of the ReviewState enum.
func (e ReviewState) Valid() bool {
switch e {
case ReviewStateDone:
return true
case ReviewStateFailed:
return true
case ReviewStateRunning:
return true
case ReviewStateSkipped:
return true
default:
return false
}
}
// Defines values for SnapshotTrigger.
const (
SnapshotTriggerAskHuman SnapshotTrigger = "ask_human"
SnapshotTriggerMessage SnapshotTrigger = "message"
SnapshotTriggerTimer SnapshotTrigger = "timer"
SnapshotTriggerToolCall SnapshotTrigger = "tool_call"
SnapshotTriggerTurnEnd SnapshotTrigger = "turn_end"
)
// Valid indicates whether the value is a known member of the SnapshotTrigger enum.
func (e SnapshotTrigger) Valid() bool {
switch e {
case SnapshotTriggerAskHuman:
return true
case SnapshotTriggerMessage:
return true
case SnapshotTriggerTimer:
return true
case SnapshotTriggerToolCall:
return true
case SnapshotTriggerTurnEnd:
return true
default:
return false
}
}
// Defines values for StageBase.
const (
StageBaseMain StageBase = "main"
StageBaseParent StageBase = "parent"
)
// Valid indicates whether the value is a known member of the StageBase enum.
func (e StageBase) Valid() bool {
switch e {
case StageBaseMain:
return true
case StageBaseParent:
return true
default:
return false
}
}
// Defines values for StageAttemptState.
const (
AttemptStateCleanedUp StageAttemptState = "cleaned_up"
AttemptStateDiscarded StageAttemptState = "discarded"
AttemptStateFinished StageAttemptState = "finished"
AttemptStateIdle StageAttemptState = "idle"
AttemptStateMerged StageAttemptState = "merged"
AttemptStateRunning StageAttemptState = "running"
)
// Valid indicates whether the value is a known member of the StageAttemptState enum.
func (e StageAttemptState) Valid() bool {
switch e {
case AttemptStateCleanedUp:
return true
case AttemptStateDiscarded:
return true
case AttemptStateFinished:
return true
case AttemptStateIdle:
return true
case AttemptStateMerged:
return true
case AttemptStateRunning:
return true
default:
return false
}
}
// Defines values for TaskState.
const (
TaskStateDiscarded TaskState = "discarded"
TaskStateDiscarding TaskState = "discarding"
TaskStateIdle TaskState = "idle"
TaskStateMerged TaskState = "merged"
TaskStateMerging TaskState = "merging"
TaskStateNoAgent TaskState = "no_agent"
TaskStateReviewPending TaskState = "review_pending"
TaskStateReviewing TaskState = "reviewing"
TaskStateRunning TaskState = "running"
)
// Valid indicates whether the value is a known member of the TaskState enum.
func (e TaskState) Valid() bool {
switch e {
case TaskStateDiscarded:
return true
case TaskStateDiscarding:
return true
case TaskStateIdle:
return true
case TaskStateMerged:
return true
case TaskStateMerging:
return true
case TaskStateNoAgent:
return true
case TaskStateReviewPending:
return true
case TaskStateReviewing:
return true
case TaskStateRunning:
return true
default:
return false
}
}
// Defines values for TaskStatus.
const (
TaskStatusActive TaskStatus = "active"
TaskStatusDiscarded TaskStatus = "discarded"
TaskStatusMerged TaskStatus = "merged"
)
// Valid indicates whether the value is a known member of the TaskStatus enum.
func (e TaskStatus) Valid() bool {
switch e {
case TaskStatusActive:
return true
case TaskStatusDiscarded:
return true
case TaskStatusMerged:
return true
default:
return false
}
}
// Defines values for TaskTab.
const (
TabChanges TaskTab = "changes"
TabFiles TaskTab = "files"
TabInbox TaskTab = "inbox"
TabProject TaskTab = "project"
TabReviews TaskTab = "reviews"
TabTerminal TaskTab = "terminal"
TabTranscript TaskTab = "transcript"
TabWorkflow TaskTab = "workflow"
)
// Valid indicates whether the value is a known member of the TaskTab enum.
func (e TaskTab) Valid() bool {
switch e {
case TabChanges:
return true
case TabFiles:
return true
case TabInbox:
return true
case TabProject:
return true
case TabReviews:
return true
case TabTerminal:
return true
case TabTranscript:
return true
case TabWorkflow:
return true
default:
return false
}
}
// Defines values for WorkflowRunStageState.
const (
StageStateCleanedUp WorkflowRunStageState = "cleaned_up"
StageStateDiscarded WorkflowRunStageState = "discarded"
StageStateFinished WorkflowRunStageState = "finished"
StageStateIdle WorkflowRunStageState = "idle"
StageStateMerged WorkflowRunStageState = "merged"
StageStateRunning WorkflowRunStageState = "running"
StageStateWaiting WorkflowRunStageState = "waiting"
)
// Valid indicates whether the value is a known member of the WorkflowRunStageState enum.
func (e WorkflowRunStageState) Valid() bool {
switch e {
case StageStateCleanedUp:
return true
case StageStateDiscarded:
return true
case StageStateFinished:
return true
case StageStateIdle:
return true
case StageStateMerged:
return true
case StageStateRunning:
return true
case StageStateWaiting:
return true
default:
return false
}
}
// Defines values for ZombieKind.
const (
ProcessWithoutSession ZombieKind = "process_without_session"
RunningWithoutProcess ZombieKind = "running_without_process"
)
// Valid indicates whether the value is a known member of the ZombieKind enum.
func (e ZombieKind) Valid() bool {
switch e {
case ProcessWithoutSession:
return true
case RunningWithoutProcess:
return true
default:
return false
}
}
// Defines values for MergeTaskJSONBodyTarget.
const (
MergeTargetMain MergeTaskJSONBodyTarget = "main"
MergeTargetParent MergeTaskJSONBodyTarget = "parent"
)
// Valid indicates whether the value is a known member of the MergeTaskJSONBodyTarget enum.
func (e MergeTaskJSONBodyTarget) Valid() bool {
switch e {
case MergeTargetMain:
return true
case MergeTargetParent:
return true
default:
return false
}
}
// AgentProcess defines model for AgentProcess.
type AgentProcess struct {
// Health stuck means a turn is running and no stream event has arrived for stuck_after_seconds; exited means the process is gone.
Health AgentProcessHealth `json:"health"`
// LastEventAt When the process last wrote a line to its stream
LastEventAt time.Time `json:"last_event_at"`
Pid int `json:"pid"`
SessionId string `json:"session_id"`
// State The session's state
State string `json:"state"`
TaskId string `json:"task_id"`
Vendor string `json:"vendor"`
}
// AgentProcessHealth stuck means a turn is running and no stream event has arrived for stuck_after_seconds; exited means the process is gone.
type AgentProcessHealth string
// AgentSession defines model for AgentSession.
type AgentSession struct {
CreatedAt time.Time `json:"created_at"`
CreatedBy string `json:"created_by"`
// ForkedAt With forked_from: the vendor's id of the last thing the fork keeps, a message for Claude Code, a turn for Codex.
ForkedAt *string `json:"forked_at,omitempty"`
// ForkedFrom A fork's first start resumes this vendor session, cut at forked_at, under a new vendor_session_id; absent for other sessions.
ForkedFrom *string `json:"forked_from,omitempty"`
Id string `json:"id"`
// Model Requested model; empty means the vendor's default. A session only switches between its own vendor's models.
Model string `json:"model"`
// Owner The login whose lead agent this is; empty for a task's session.
Owner string `json:"owner"`
// Role reviewer: a review's session (see Review); a task's sessions list leaves these out.
Role AgentSessionRole `json:"role"`
State AgentSessionState `json:"state"`
// TaskId Empty for a lead session.
TaskId string `json:"task_id"`
// Vendor Follows from the model the session was created with: gpt-* models run on Codex, every other model on Claude Code.
Vendor AgentSessionVendor `json:"vendor"`
// VendorSessionId Claude Code's session id, chosen by byre; or the Codex thread id, empty until the session's first turn starts its thread.
VendorSessionId string `json:"vendor_session_id"`
}
// AgentSessionRole reviewer: a review's session (see Review); a task's sessions list leaves these out.
type AgentSessionRole string
// AgentSessionState defines model for AgentSession.State.
type AgentSessionState string
// AgentSessionVendor Follows from the model the session was created with: gpt-* models run on Codex, every other model on Claude Code.
type AgentSessionVendor string
// Attachment defines model for Attachment.
type Attachment struct {
Caption *string `json:"caption,omitempty"`
EndLine *int `json:"end_line,omitempty"`
// Image image: data URL.
Image *string `json:"image,omitempty"`
Kind AttachmentKind `json:"kind"`
// Mermaid diagram: Mermaid source.
Mermaid *string `json:"mermaid,omitempty"`
// Path file: repo-relative path. image: an image file in the task's worktree, absolute or relative to it.
Path *string `json:"path,omitempty"`
// Ref diff: git revision range.
Ref *string `json:"ref,omitempty"`
SnapshotId *string `json:"snapshot_id,omitempty"`
StartLine *int `json:"start_line,omitempty"`
TaskId *string `json:"task_id,omitempty"`
Url *string `json:"url,omitempty"`
}
// AttachmentKind defines model for Attachment.Kind.
type AttachmentKind string
// Blob defines model for Blob.
type Blob struct {
ContentType string `json:"content_type"`
CreatedAt time.Time `json:"created_at"`
CreatedBy string `json:"created_by"`
Id string `json:"id"`
}
// DirEntry defines model for DirEntry.
type DirEntry struct {
// Ignored git ignores the entry: .gitignore and the other exclude files match it or a directory above it.
Ignored bool `json:"ignored"`
Name string `json:"name"`
// Size file: its size in bytes.
Size int64 `json:"size"`
Symlink bool `json:"symlink"`
// Type What the entry is, following a symlink that stays in the worktree. other: a symlink that leaves the worktree or points nowhere, or a device, socket or pipe.
Type DirEntryType `json:"type"`
}
// DirEntryType What the entry is, following a symlink that stays in the worktree. other: a symlink that leaves the worktree or points nowhere, or a device, socket or pipe.
type DirEntryType string
// DirListing defines model for DirListing.
type DirListing struct {
Entries []DirEntry `json:"entries"`
// Path The directory, relative to the worktree root; empty for the root.
Path string `json:"path"`
// Truncated The directory has more entries than were returned.
Truncated bool `json:"truncated"`
}
// Error defines model for Error.
type Error struct {
Message string `json:"message"`
}
// Event defines model for Event.
type Event struct {
Actor string `json:"actor"`
AgentSessionId *string `json:"agent_session_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
Kind string `json:"kind"`
// Owner Set on a lead agent's events and a user's focus.updated: the login they belong to. Only that user is sent them.
Owner *string `json:"owner,omitempty"`
Payload map[string]interface{} `json:"payload"`
ProjectId *string `json:"project_id,omitempty"`
Seq int64 `json:"seq"`
TaskId *string `json:"task_id,omitempty"`
}
// FileChange defines model for FileChange.
type FileChange struct {
Additions int `json:"additions"`
Binary bool `json:"binary"`
Deletions int `json:"deletions"`
// OldPath renamed: the path before the rename.
OldPath *string `json:"old_path,omitempty"`
Path string `json:"path"`
Status FileChangeStatus `json:"status"`
}
// FileChangeStatus defines model for FileChange.Status.
type FileChangeStatus string
// FileContent defines model for FileContent.
type FileContent struct {
// Binary The file isn't UTF-8 text; text is empty.
Binary bool `json:"binary"`
Path string `json:"path"`
Size int64 `json:"size"`
Text string `json:"text"`
// Truncated text holds only the start of the file.
Truncated bool `json:"truncated"`
}
// FileDiff defines model for FileDiff.
type FileDiff struct {
Patch string `json:"patch"`
Path string `json:"path"`
}
// FindingState fixed: sent to the task's agent to fix. ignored: dismissed, and left out of the Merge warning.
type FindingState string
// FindingStateUpdate defines model for FindingStateUpdate.
type FindingStateUpdate struct {
// State fixed: sent to the task's agent to fix. ignored: dismissed, and left out of the Merge warning.
State FindingState `json:"state"`
}
// Focus defines model for Focus.
type Focus struct {
// ProjectId The project the right pane shows; the task's project when task_id is set
ProjectId *string `json:"project_id,omitempty"`
Tab TaskTab `json:"tab"`
// Tabs The tabs the lead put first, in order. The other task tabs follow them.
Tabs []TaskTab `json:"tabs"`
// TaskId The task the right pane shows; absent for none.
TaskId *string `json:"task_id,omitempty"`
}
// InboxItem defines model for InboxItem.
type InboxItem struct {
AgentSessionId string `json:"agent_session_id"`
CreatedAt time.Time `json:"created_at"`
Id string `json:"id"`
Kind InboxItemKind `json:"kind"`
// Payload question: context (Markdown with the choices inline as `- ( ) text` / `- (*) text` pick-one or `- [ ] text` / `- [x] text` pick-any list items), question, why_blocked, options (each choice's text, in order), multiple (true for pick-any), recommended (the marked choices' text), attachments. session_error: error. rate_limited: vendor, rate_limit (the vendor's rate-limit status), error.
Payload map[string]interface{} `json:"payload"`
ProjectId string `json:"project_id"`
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
ResolvedBy *string `json:"resolved_by,omitempty"`
Responses []InboxResponse `json:"responses"`
State InboxState `json:"state"`
TaskId string `json:"task_id"`
ThreadId string `json:"thread_id"`
}
// InboxItemKind defines model for InboxItem.Kind.
type InboxItemKind string
// InboxRespond defines model for InboxRespond.
type InboxRespond struct {
Responses []InboxResponseCreate `json:"responses"`
}
// InboxResponse defines model for InboxResponse.
type InboxResponse struct {
Attachments []Attachment `json:"attachments"`
CreatedAt time.Time `json:"created_at"`
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
Id string `json:"id"`
ItemId string `json:"item_id"`
Options *[]string `json:"options,omitempty"`
Text *string `json:"text,omitempty"`
Type InboxResponseType `json:"type"`
User string `json:"user"`
}
// InboxResponseCreate defines model for InboxResponseCreate.
type InboxResponseCreate struct {
Attachments *[]Attachment `json:"attachments,omitempty"`
ItemId string `json:"item_id"`
// Options option: the chosen options; exactly one for a pick-one question, one or more for a pick-any question.
Options *[]string `json:"options,omitempty"`
// Text other: the text sent to the agent. option on a pick-any question: optional text sent along with the checked options.
Text *string `json:"text,omitempty"`
Type InboxResponseType `json:"type"`
}
// InboxResponseType defines model for InboxResponseType.
type InboxResponseType string
// InboxState defines model for InboxState.
type InboxState string
// LeadNote defines model for LeadNote.
type LeadNote struct {
CreatedAt time.Time `json:"created_at"`
Id string `json:"id"`
Text string `json:"text"`
UpdatedAt time.Time `json:"updated_at"`
}
// MessageCreate defines model for MessageCreate.
type MessageCreate struct {
// Images Blob ids from uploadBlob, sent to the agent as images alongside the text.
Images *[]string `json:"images,omitempty"`
// Model Model for this turn and later ones. When it differs from the session's model, the session switches before the message is sent.
Model *string `json:"model,omitempty"`
// Text May be empty when images are given.
Text string `json:"text"`
}
// NotificationPrefs Which new inbox items and finished turns notify this user in their open byre pages.
type NotificationPrefs struct {
// Errors session_error items.
Errors bool `json:"errors"`
// Questions Questions. On by default.
Questions bool `json:"questions"`
// RateLimits rate_limited items.
RateLimits bool `json:"rate_limits"`
// Reports Task turns that end with a summary (turn.ended with summary: true).
Reports bool `json:"reports"`
}
// PaneFocus defines model for PaneFocus.
type PaneFocus struct {
// Drafting True while a text box in the right pane holds unsent text.
Drafting bool `json:"drafting"`
// Focused True while the browser window has focus and the focused element is inside the right pane.
Focused bool `json:"focused"`
}
// Participant defines model for Participant.
type Participant struct {
DisplayName string `json:"display_name"`
GitEmail string `json:"git_email"`
// GitName Empty when the user hasn't set a git identity; they then get no trailer.
GitName string `json:"git_name"`
Login string `json:"login"`
}
// Preview defines model for Preview.
type Preview struct {
CreatedAt time.Time `json:"created_at"`
Name string `json:"name"`
// Port A port in the task's block, served at https://<byre's host>:<port>/.
Port int `json:"port"`
TaskId string `json:"task_id"`
}
// Project defines model for Project.
type Project struct {
CreatedAt time.Time `json:"created_at"`
CreatedBy string `json:"created_by"`
DefaultBranch string `json:"default_branch"`
Id string `json:"id"`
Name string `json:"name"`
Remote string `json:"remote"`
RepoPath string `json:"repo_path"`
}
// ProjectCreate defines model for ProjectCreate.
type ProjectCreate struct {
Name string `json:"name"`
RepoPath string `json:"repo_path"`
}
// ProtocolError defines model for ProtocolError.
type ProtocolError struct {
At time.Time `json:"at"`
// Raw The line as received
Raw string `json:"raw"`
Reason string `json:"reason"`
SessionId string `json:"session_id"`
// Size The line's full length in bytes.
Size int `json:"size"`
Vendor string `json:"vendor"`
}
// ProtocolErrors defines model for ProtocolErrors.
type ProtocolErrors struct {
// Counts Stream lines the adapter couldn't parse or didn't recognise since byre started, keyed by vendor.
Counts map[string]int `json:"counts"`
// Recent The most recent ones, newest first.
Recent []ProtocolError `json:"recent"`
}
// Review An agent session on the vendor the task's agent doesn't use, reviewing one snapshot's change.
type Review struct {
// AgentSessionId The reviewer's session; empty when skipped.
AgentSessionId string `json:"agent_session_id"`
CreatedAt time.Time `json:"created_at"`
// Error failed: why.
Error string `json:"error"`
// FindingStates How the human addressed each finding, keyed by its index in result.findings; a finding not listed is open.
FindingStates map[string]FindingState `json:"finding_states"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
Id string `json:"id"`
// Model Empty when skipped.
Model string `json:"model"`
// Result done: the reviewer's submit_review arguments: summary (Markdown) and findings, each with severity, category, title, detail, path and line.
Result *map[string]interface{} `json:"result,omitempty"`
SnapshotN int `json:"snapshot_n"`
// State skipped: the snapshot's step changed no files, so no reviewer ran.
State ReviewState `json:"state"`
TaskId string `json:"task_id"`
// Vendor Empty when skipped.
Vendor string `json:"vendor"`
}
// ReviewState skipped: the snapshot's step changed no files, so no reviewer ran.
type ReviewState string
// SessionCreate defines model for SessionCreate.
type SessionCreate struct {
// Images Blob ids from uploadBlob, sent to the agent as images alongside the prompt.
Images *[]string `json:"images,omitempty"`
Model *string `json:"model,omitempty"`
Prompt string `json:"prompt"`
}
// Snapshot defines model for Snapshot.
type Snapshot struct {
AgentSessionId string `json:"agent_session_id"`
// CommitSha A commit of tree_sha whose parent is the worktree's HEAD when it was taken.
CommitSha string `json:"commit_sha"`
CreatedAt time.Time `json:"created_at"`
// EventSeq The task's latest event when the snapshot was started: the tree holds at least the work up to it.
EventSeq int64 `json:"event_seq"`
Id string `json:"id"`
// N Position in the task's snapshots, from 1; the ref is refs/byre/tasks/{task_id}/snap/{n}.
N int `json:"n"`
TaskId string `json:"task_id"`
TreeSha string `json:"tree_sha"`
// Trigger turn_end: after byre's end-of-turn commit. message (the agent wrote text after one or more tool calls), tool_call, ask_human and timer appear only on snapshots taken by earlier builds.
Trigger SnapshotTrigger `json:"trigger"`
}
// SnapshotTrigger turn_end: after byre's end-of-turn commit. message (the agent wrote text after one or more tool calls), tool_call, ask_human and timer appear only on snapshots taken by earlier builds.
type SnapshotTrigger string
// Stage defines model for Stage.
type Stage struct {
// After The stages whose outputs this stage gets, by name; it starts once all of them have finished. Absent means the previous stage in the list (for the first stage, none); empty means it starts from the brief.
After *[]string `json:"after,omitempty"`
// Base Where the stage's task branches from. parent (the default): the commit its one after stage finished at, or for a stage with none, where the workflow was started from. main: the project's default branch. Refused on a stage with more than one after stage, which always branches from the default branch.
Base *StageBase `json:"base,omitempty"`
// Model The stage agent's model, which also picks its vendor: gpt-* models run on Codex, every other model on Claude Code.
Model string `json:"model"`
// Name One line of 1 to 100 characters, unique within the workflow.
Name string `json:"name"`
// Prompt The stage agent's instructions.
Prompt string `json:"prompt"`
}
// StageBase Where the stage's task branches from. parent (the default): the commit its one after stage finished at, or for a stage with none, where the workflow was started from. main: the project's default branch. Refused on a stage with more than one after stage, which always branches from the default branch.
type StageBase string
// StageAttempt defines model for StageAttempt.
type StageAttempt struct {
// Commit With output: the commit the stage finished at.
Commit *string `json:"commit,omitempty"`
// DiscardedBy discarded and cleaned_up: who discarded it; byre for the cleanup.
DiscardedBy *string `json:"discarded_by,omitempty"`
// Discarding Whether a Discard was started and the task isn't closed yet.
Discarding bool `json:"discarding"`
// ForkedFrom The task this attempt was forked from; absent for the stage's first attempt.
ForkedFrom *string `json:"forked_from,omitempty"`
// Inputs The attempts whose outputs it started from, one per after stage; a fork has its source's.
Inputs []StageInput `json:"inputs"`
// Output The finish_stage output the stages after it get; absent until it finishes.
Output *string `json:"output,omitempty"`
// State running: its agent is mid-turn. idle: active, and finish_stage hasn't taken. finished: active, its output recorded. merged. discarded: discarded before finishing. cleaned_up: discarded after finishing, as byre does to the run's other tasks when the final stage finishes.
State StageAttemptState `json:"state"`
TaskId string `json:"task_id"`
Title string `json:"title"`
}
// StageAttemptState running: its agent is mid-turn. idle: active, and finish_stage hasn't taken. finished: active, its output recorded. merged. discarded: discarded before finishing. cleaned_up: discarded after finishing, as byre does to the run's other tasks when the final stage finishes.
type StageAttemptState string
// StageInput defines model for StageInput.
type StageInput struct {
Stage string `json:"stage"`
TaskId string `json:"task_id"`
}
// Status defines model for Status.
type Status struct {
ActiveTasks int `json:"active_tasks"`
// AgentProcesses Every agent process byre is tracking, idle sessions included.
AgentProcesses []AgentProcess `json:"agent_processes"`
DbBytes int64 `json:"db_bytes"`
LastEventSeq int64 `json:"last_event_seq"`
// LiveAgents Agent processes currently running.
LiveAgents int `json:"live_agents"`
Projects int `json:"projects"`
ProtocolErrors ProtocolErrors `json:"protocol_errors"`
// RateLimits The latest rate-limit status each vendor reported, keyed by vendor.
RateLimits map[string]map[string]interface{} `json:"rate_limits"`
// RunningTurns Turns running now, oldest session first.
RunningTurns []TurnRef `json:"running_turns"`
SseClients int `json:"sse_clients"`
StartedAt time.Time `json:"started_at"`
// StuckAfterSeconds How long a running turn may go without a stream event before it counts as stuck.
StuckAfterSeconds int `json:"stuck_after_seconds"`
// Zombies Sessions marked running with no live process, and agent processes byre has no session for.
Zombies []Zombie `json:"zombies"`
}
// SummaryRead defines model for SummaryRead.
type SummaryRead struct {
// Seq The seq of the turn.ended event whose summary was shown.
Seq int64 `json:"seq"`
}
// Task defines model for Task.
type Task struct {
BaseRef string `json:"base_ref"`
Branch string `json:"branch"`
// ClosedAt When the task was merged or discarded.
ClosedAt *time.Time `json:"closed_at,omitempty"`
// Color Index into the UI's task palette, assigned at creation: a colour no active task holds, the one given out longest ago.
Color int `json:"color"`
CreatedAt time.Time `json:"created_at"`
CreatedBy string `json:"created_by"`
// Discarding Whether a Discard was started and the task isn't closed yet: its summary turn is waiting for the running turn, running, or done and the task is being removed.
Discarding bool `json:"discarding"`
// ForkedAt With forked_from: the n of the snapshot it was forked at.
ForkedAt *int `json:"forked_at,omitempty"`
// ForkedFrom The task this one was forked from; absent for other tasks.
ForkedFrom *string `json:"forked_from,omitempty"`
Id string `json:"id"`
// MergeCommit merged: the squash commit on the default branch; empty when there was nothing to merge.
MergeCommit *string `json:"merge_commit,omitempty"`
// MergeQueuedAt When Merge was requested while another task in the project was merging; absent once the merge starts or when none is held.
MergeQueuedAt *time.Time `json:"merge_queued_at,omitempty"`
// MergeTitle The title of the squash commit Merge makes: the task title until the agent sets another with set_merge_title.
MergeTitle string `json:"merge_title"`
// Merging Whether a Merge was started and hasn't finished: its turn is running, or the turn ended and byre is squashing, pushing and closing the task.
Merging bool `json:"merging"`
// MergingIntoParent Whether a merge of this subtask into its parent was requested and the parent hasn't merged it yet.
MergingIntoParent bool `json:"merging_into_parent"`
// ParentTaskId The task whose agent created this one as its subtask; absent for other tasks.
ParentTaskId *string `json:"parent_task_id,omitempty"`
// PortBase The first of the task's block of ports (port_base to port_base+9), passed to its agent and terminal as PORT.
PortBase int `json:"port_base"`
ProjectId string `json:"project_id"`
// State What the task is doing, kept by the store in the same transaction as every change to it (a task.state event carries each change): merged or discarded once closed, else discarding, merging, the state of its agent's latest live session when that isn't idle, reviewing while a review runs, review_pending between a turn's end and its snapshot's review starting or being skipped, idle, or no_agent.
State TaskState `json:"state"`
Status TaskStatus `json:"status"`
// SummarySeq The seq of the task's latest turn.ended event with summary: true; 0 when it has none.
SummarySeq int64 `json:"summary_seq"`
Title string `json:"title"`
// TodoItem The title of the TODO.md item the task was started from; absent for other tasks.
TodoItem *string `json:"todo_item,omitempty"`
// Workflow The name of the workflow the task froze at creation (getTaskWorkflow has its copy); absent for a task without one.
Workflow *string `json:"workflow,omitempty"`
// WorkflowRun With workflow: the id every task of one run of the workflow shares.
WorkflowRun *string `json:"workflow_run,omitempty"`
// WorkflowStage With workflow: the name of the stage this task runs.
WorkflowStage *string `json:"workflow_stage,omitempty"`
WorktreePath string `json:"worktree_path"`
}
// TaskState What the task is doing, kept by the store in the same transaction as every change to it (a task.state event carries each change): merged or discarded once closed, else discarding, merging, the state of its agent's latest live session when that isn't idle, reviewing while a review runs, review_pending between a turn's end and its snapshot's review starting or being skipped, idle, or no_agent.
type TaskState string
// TaskStatus defines model for Task.Status.
type TaskStatus string
// TaskChanges defines model for TaskChanges.
type TaskChanges struct {
// Base The commit or tree compared with: the merge-base of the task branch and the default branch, since, or the previous snapshot's tree.
Base string `json:"base"`
Files []FileChange `json:"files"`
// Tree Tree of the worktree as if everything were staged, or the snapshot's tree.
Tree string `json:"tree"`
}
// TaskCreate defines model for TaskCreate.
type TaskCreate struct {
Title string `json:"title"`
// Workflow The name of a saved workflow to run instead of creating one task with no agent: each stage with no after stages becomes its own task, titled "<title>: <stage>", with the title as the run's brief. The response is the first of those tasks.
Workflow *string `json:"workflow,omitempty"`
}
// TaskTab defines model for TaskTab.
type TaskTab string
// TaskWorkflow The workflow a task froze when it was created, as it was then.
type TaskWorkflow struct {
// Definition The WorkflowDefinition as YAML.
Definition string `json:"definition"`
Name string `json:"name"`
}
// TerminalSize defines model for TerminalSize.
type TerminalSize struct {
Cols int `json:"cols"`
Rows int `json:"rows"`
}
// Todo defines model for Todo.
type Todo struct {
// Exists Whether the default branch has a TODO.md at its root.
Exists bool `json:"exists"`
Items []TodoItem `json:"items"`
}
// TodoItem defines model for TodoItem.
type TodoItem struct {
// Body The item's further lines
Body string `json:"body"`
// Section The text of the nearest heading above the item; empty when there is none.
Section string `json:"section"`
// Title The item's first line, without its list marker: the item's identity.
Title string `json:"title"`
}
// TodoStart defines model for TodoStart.
type TodoStart struct {
// Discuss Tell the agent the human wants to discuss the item in chat before anything is built.
Discuss *bool `json:"discuss,omitempty"`
Model *string `json:"model,omitempty"`
// Title The title of the item to start.
Title string `json:"title"`
}
// TurnRef defines model for TurnRef.
type TurnRef struct {
SessionId string `json:"session_id"`
TaskId string `json:"task_id"`
Vendor string `json:"vendor"`
}
// Unmerged defines model for Unmerged.
type Unmerged struct {
// Commits Commits on the task branch that aren't on the default branch.
Commits int `json:"commits"`
Deletions int `json:"deletions"`
// Files Files that differ from the merge base
Files int `json:"files"`
Insertions int `json:"insertions"`
// Uncommitted Paths with uncommitted changes in the worktree.
Uncommitted int `json:"uncommitted"`
}
// User defines model for User.
type User struct {
DisplayName string `json:"display_name"`
GitEmail string `json:"git_email"`
GitName string `json:"git_name"`
Login string `json:"login"`
// NotificationPrefs Which new inbox items and finished turns notify this user in their open byre pages.
NotificationPrefs NotificationPrefs `json:"notification_prefs"`
}
// UserUpdate defines model for UserUpdate.
type UserUpdate struct {
GitEmail string `json:"git_email"`
GitName string `json:"git_name"`
}
// WorkflowDefinition A workflow's file, which holds everything but its name: its stages, each run as its own task once the stages it comes after have finished. Sent and returned as YAML.
type WorkflowDefinition struct {
Description string `json:"description,omitempty"`
Stages []Stage `json:"stages"`
}
// WorkflowRun defines model for WorkflowRun.
type WorkflowRun struct {
Brief string `json:"brief"`
// Definition A workflow's file, which holds everything but its name: its stages, each run as its own task once the stages it comes after have finished. Sent and returned as YAML.
Definition WorkflowDefinition `json:"definition"`
// Finished Whether the final stage finished, which ends the run.
Finished bool `json:"finished"`
Name string `json:"name"`
Run string `json:"run"`
// Stages In the definition's order.
Stages []WorkflowRunStage `json:"stages"`
Title string `json:"title"`
}
// WorkflowRunStage defines model for WorkflowRunStage.
type WorkflowRunStage struct {
// After The stages it comes after, with the definition's defaults applied.
After []string `json:"after"`
// Attempts The tasks that ran the stage (the first, and forks of it), oldest first.
Attempts []StageAttempt `json:"attempts"`
Name string `json:"name"`
// State waiting: no task yet. Otherwise the state of its latest finished attempt, or of its latest attempt when none has finished.
State WorkflowRunStageState `json:"state"`
// WaitingOn The after stages with no finished attempt yet.
WaitingOn []string `json:"waiting_on"`
}
// WorkflowRunStageState waiting: no task yet. Otherwise the state of its latest finished attempt, or of its latest attempt when none has finished.
type WorkflowRunStageState string
// WorkflowSummary defines model for WorkflowSummary.
type WorkflowSummary struct {
Description string `json:"description"`
Name string `json:"name"`
}
// Zombie defines model for Zombie.
type Zombie struct {
Detail string `json:"detail"`
Kind ZombieKind `json:"kind"`
Pid *int `json:"pid,omitempty"`
SessionId *string `json:"session_id,omitempty"`
TaskId *string `json:"task_id,omitempty"`
}
// ZombieKind defines model for Zombie.Kind.
type ZombieKind string
// StreamEventsParams defines parameters for StreamEvents.
type StreamEventsParams struct {
After *int64 `form:"after,omitempty" json:"after,omitempty"`
TaskId *string `form:"task_id,omitempty" json:"task_id,omitempty"`
Lead *bool `form:"lead,omitempty" json:"lead,omitempty"`
LastEventID *int64 `json:"Last-Event-ID,omitempty"`
}
// ListInboxParams defines parameters for ListInbox.
type ListInboxParams struct {
ProjectId *string `form:"project_id,omitempty" json:"project_id,omitempty"`
TaskId *string `form:"task_id,omitempty" json:"task_id,omitempty"`
State *InboxState `form:"state,omitempty" json:"state,omitempty"`
}
// GetTaskChangesParams defines parameters for GetTaskChanges.
type GetTaskChangesParams struct {
// Since A commit to compare with instead of the merge-base, such as a user.message event's head. Not allowed with snapshot.
Since *string `form:"since,omitempty" json:"since,omitempty"`
// Snapshot A snapshot's n: show the task as it was in that snapshot rather than the live worktree.
Snapshot *int `form:"snapshot,omitempty" json:"snapshot,omitempty"`
// Step With snapshot: compare with the previous snapshot (the snapshot commit's parent for the first one).
Step *bool `form:"step,omitempty" json:"step,omitempty"`
}
// GetTaskDiffParams defines parameters for GetTaskDiff.
type GetTaskDiffParams struct {
Base string `form:"base" json:"base"`
Tree string `form:"tree" json:"tree"`
Path string `form:"path" json:"path"`
OldPath *string `form:"old_path,omitempty" json:"old_path,omitempty"`
}
// GetTaskDirParams defines parameters for GetTaskDir.
type GetTaskDirParams struct {
// Path Slash-separated, relative to the worktree root; empty or absent for the root.
Path *string `form:"path,omitempty" json:"path,omitempty"`
}
// ListTaskEventsParams defines parameters for ListTaskEvents.
type ListTaskEventsParams struct {
After *int64 `form:"after,omitempty" json:"after,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
// GetTaskFileParams defines parameters for GetTaskFile.
type GetTaskFileParams struct {
// Path Slash-separated, relative to the worktree root.
Path string `form:"path" json:"path"`
}
// GetTaskImageParams defines parameters for GetTaskImage.
type GetTaskImageParams struct {
Path string `form:"path" json:"path"`
}
// MergeTaskJSONBody defines parameters for MergeTask.
type MergeTaskJSONBody struct {
// MergeTitle The squash commit's title: one line, at most 72 characters. Required for target main.
MergeTitle *string `json:"merge_title,omitempty"`
// Target main (the default): squash onto the project's default branch. parent: merge into the parent task's branch; only for a subtask.
Target *MergeTaskJSONBodyTarget `json:"target,omitempty"`
}
// MergeTaskJSONBodyTarget defines parameters for MergeTask.
type MergeTaskJSONBodyTarget string
// GetTaskTerminalParams defines parameters for GetTaskTerminal.
type GetTaskTerminalParams struct {
Cols int `form:"cols" json:"cols"`
Rows int `form:"rows" json:"rows"`
}
// RespondInboxJSONRequestBody defines body for RespondInbox for application/json ContentType.
type RespondInboxJSONRequestBody = InboxRespond
// UpdateMeJSONRequestBody defines body for UpdateMe for application/json ContentType.
type UpdateMeJSONRequestBody = UserUpdate
// SetFocusJSONRequestBody defines body for SetFocus for application/json ContentType.
type SetFocusJSONRequestBody = Focus
// MessageLeadJSONRequestBody defines body for MessageLead for application/json ContentType.
type MessageLeadJSONRequestBody = MessageCreate
// UpdateNotificationPrefsJSONRequestBody defines body for UpdateNotificationPrefs for application/json ContentType.
type UpdateNotificationPrefsJSONRequestBody = NotificationPrefs
// SetPaneFocusJSONRequestBody defines body for SetPaneFocus for application/json ContentType.
type SetPaneFocusJSONRequestBody = PaneFocus
// CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType.
type CreateProjectJSONRequestBody = ProjectCreate
// CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.
type CreateTaskJSONRequestBody = TaskCreate
// StartTodoItemJSONRequestBody defines body for StartTodoItem for application/json ContentType.
type StartTodoItemJSONRequestBody = TodoStart
// SetFindingStateJSONRequestBody defines body for SetFindingState for application/json ContentType.
type SetFindingStateJSONRequestBody = FindingStateUpdate
// SendMessageJSONRequestBody defines body for SendMessage for application/json ContentType.
type SendMessageJSONRequestBody = MessageCreate
// MergeTaskJSONRequestBody defines body for MergeTask for application/json ContentType.
type MergeTaskJSONRequestBody MergeTaskJSONBody
// CreateSessionJSONRequestBody defines body for CreateSession for application/json ContentType.
type CreateSessionJSONRequestBody = SessionCreate
// MarkSummaryReadJSONRequestBody defines body for MarkSummaryRead for application/json ContentType.
type MarkSummaryReadJSONRequestBody = SummaryRead
// ServerInterface represents all server handlers.
type ServerInterface interface {
// (GET /api/admin/status)
GetStatus(w http.ResponseWriter, r *http.Request)
// (POST /api/blobs)
UploadBlob(w http.ResponseWriter, r *http.Request)
// (GET /api/blobs/{blobId})
GetBlob(w http.ResponseWriter, r *http.Request, blobId string)
// (GET /api/events)
StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams)
// (GET /api/inbox)
ListInbox(w http.ResponseWriter, r *http.Request, params ListInboxParams)
// (POST /api/inbox/responses)
RespondInbox(w http.ResponseWriter, r *http.Request)
// (GET /api/inbox/{itemId})
GetInboxItem(w http.ResponseWriter, r *http.Request, itemId string)
// (GET /api/me)
GetMe(w http.ResponseWriter, r *http.Request)
// (PUT /api/me)
UpdateMe(w http.ResponseWriter, r *http.Request)
// (GET /api/me/focus)
GetFocus(w http.ResponseWriter, r *http.Request)
// (PUT /api/me/focus)
SetFocus(w http.ResponseWriter, r *http.Request)
// (POST /api/me/lead/messages)
MessageLead(w http.ResponseWriter, r *http.Request)
// (GET /api/me/lead/notes)
ListLeadNotes(w http.ResponseWriter, r *http.Request)
// (DELETE /api/me/lead/notes/{noteId})
DeleteLeadNote(w http.ResponseWriter, r *http.Request, noteId string)
// (GET /api/me/lead/sessions)
ListLeadSessions(w http.ResponseWriter, r *http.Request)
// (PUT /api/me/notifications)
UpdateNotificationPrefs(w http.ResponseWriter, r *http.Request)
// (PUT /api/me/pane-focus)
SetPaneFocus(w http.ResponseWriter, r *http.Request)
// (GET /api/me/summary-reads)
GetSummaryReads(w http.ResponseWriter, r *http.Request)
// (GET /api/projects)
ListProjects(w http.ResponseWriter, r *http.Request)
// (POST /api/projects)
CreateProject(w http.ResponseWriter, r *http.Request)
// (GET /api/projects/{projectId})
GetProject(w http.ResponseWriter, r *http.Request, projectId string)
// (GET /api/projects/{projectId}/tasks)
ListTasks(w http.ResponseWriter, r *http.Request, projectId string)
// (POST /api/projects/{projectId}/tasks)
CreateTask(w http.ResponseWriter, r *http.Request, projectId string)
// (GET /api/projects/{projectId}/todo)
GetTodo(w http.ResponseWriter, r *http.Request, projectId string)
// (POST /api/projects/{projectId}/todo/tasks)
StartTodoItem(w http.ResponseWriter, r *http.Request, projectId string)
// (PUT /api/reviews/{reviewId}/findings/{index})
SetFindingState(w http.ResponseWriter, r *http.Request, reviewId string, index int)
// (GET /api/sessions/{sessionId})
GetSession(w http.ResponseWriter, r *http.Request, sessionId string)
// (POST /api/sessions/{sessionId}/compact)
CompactSession(w http.ResponseWriter, r *http.Request, sessionId string)
// (POST /api/sessions/{sessionId}/interrupt)
InterruptSession(w http.ResponseWriter, r *http.Request, sessionId string)
// (POST /api/sessions/{sessionId}/messages)
SendMessage(w http.ResponseWriter, r *http.Request, sessionId string)
// (GET /api/tasks/{taskId})
GetTask(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/changes)
GetTaskChanges(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskChangesParams)
// (GET /api/tasks/{taskId}/co-authors)
GetCoAuthors(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/diff)
GetTaskDiff(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskDiffParams)
// (GET /api/tasks/{taskId}/dir)
GetTaskDir(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskDirParams)
// (POST /api/tasks/{taskId}/discard)
DiscardTask(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/events)
ListTaskEvents(w http.ResponseWriter, r *http.Request, taskId string, params ListTaskEventsParams)
// (GET /api/tasks/{taskId}/file)
GetTaskFile(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskFileParams)
// (GET /api/tasks/{taskId}/image)
GetTaskImage(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskImageParams)
// (POST /api/tasks/{taskId}/merge)
MergeTask(w http.ResponseWriter, r *http.Request, taskId string)
// (POST /api/tasks/{taskId}/merge-in)
MergeIn(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/previews)
ListPreviews(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/reviews)
ListReviews(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/sessions)
ListSessions(w http.ResponseWriter, r *http.Request, taskId string)
// (POST /api/tasks/{taskId}/sessions)
CreateSession(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/snapshots)
ListSnapshots(w http.ResponseWriter, r *http.Request, taskId string)
// (POST /api/tasks/{taskId}/snapshots/{n}/fork)
ForkSnapshot(w http.ResponseWriter, r *http.Request, taskId string, n int)
// (PUT /api/tasks/{taskId}/summary-read)
MarkSummaryRead(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/terminal)
GetTaskTerminal(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskTerminalParams)
// (GET /api/tasks/{taskId}/unmerged)
GetUnmerged(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/workflow)
GetTaskWorkflow(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/tasks/{taskId}/workflow/run)
GetWorkflowRun(w http.ResponseWriter, r *http.Request, taskId string)
// (GET /api/workflows)
ListWorkflows(w http.ResponseWriter, r *http.Request)
// (DELETE /api/workflows/{name})
DeleteWorkflow(w http.ResponseWriter, r *http.Request, name string)
// (GET /api/workflows/{name})
GetWorkflow(w http.ResponseWriter, r *http.Request, name string)
// (PUT /api/workflows/{name})
PutWorkflow(w http.ResponseWriter, r *http.Request, name string)
}
// ServerInterfaceWrapper converts contexts to parameters.
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type MiddlewareFunc func(http.Handler) http.Handler
// GetStatus operation middleware
func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetStatus(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// UploadBlob operation middleware
func (siw *ServerInterfaceWrapper) UploadBlob(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.UploadBlob(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetBlob operation middleware
func (siw *ServerInterfaceWrapper) GetBlob(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "blobId" -------------
var blobId string
err = runtime.BindStyledParameterWithOptions("simple", "blobId", r.PathValue("blobId"), &blobId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "blobId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetBlob(w, r, blobId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// StreamEvents operation middleware
func (siw *ServerInterfaceWrapper) StreamEvents(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// Parameter object where we will unmarshal all parameters from the context
var params StreamEventsParams
// ------------- Optional query parameter "after" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "after", r.URL.Query(), &params.After, runtime.BindQueryParameterOptions{Type: "integer", Format: "int64"})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "after"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "after", Err: err})
}
return
}
// ------------- Optional query parameter "task_id" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "task_id", r.URL.Query(), &params.TaskId, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "task_id"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "task_id", Err: err})
}
return
}
// ------------- Optional query parameter "lead" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "lead", r.URL.Query(), &params.Lead, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "lead"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "lead", Err: err})
}
return
}
headers := r.Header
// ------------- Optional header parameter "Last-Event-ID" -------------
if valueList, found := headers[http.CanonicalHeaderKey("Last-Event-ID")]; found {
var LastEventID int64
n := len(valueList)
if n != 1 {
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Last-Event-ID", Count: n})
return
}
err = runtime.BindStyledParameterWithOptions("simple", "Last-Event-ID", valueList[0], &LastEventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "integer", Format: "int64"})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Last-Event-ID", Err: err})
return
}
params.LastEventID = &LastEventID
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.StreamEvents(w, r, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListInbox operation middleware
func (siw *ServerInterfaceWrapper) ListInbox(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// Parameter object where we will unmarshal all parameters from the context
var params ListInboxParams
// ------------- Optional query parameter "project_id" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "project_id", r.URL.Query(), &params.ProjectId, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "project_id"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "project_id", Err: err})
}
return
}
// ------------- Optional query parameter "task_id" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "task_id", r.URL.Query(), &params.TaskId, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "task_id"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "task_id", Err: err})
}
return
}
// ------------- Optional query parameter "state" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "state", r.URL.Query(), &params.State, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "state"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "state", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListInbox(w, r, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// RespondInbox operation middleware
func (siw *ServerInterfaceWrapper) RespondInbox(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.RespondInbox(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetInboxItem operation middleware
func (siw *ServerInterfaceWrapper) GetInboxItem(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "itemId" -------------
var itemId string
err = runtime.BindStyledParameterWithOptions("simple", "itemId", r.PathValue("itemId"), &itemId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "itemId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetInboxItem(w, r, itemId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetMe operation middleware
func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetMe(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// UpdateMe operation middleware
func (siw *ServerInterfaceWrapper) UpdateMe(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.UpdateMe(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetFocus operation middleware
func (siw *ServerInterfaceWrapper) GetFocus(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetFocus(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// SetFocus operation middleware
func (siw *ServerInterfaceWrapper) SetFocus(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.SetFocus(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// MessageLead operation middleware
func (siw *ServerInterfaceWrapper) MessageLead(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.MessageLead(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListLeadNotes operation middleware
func (siw *ServerInterfaceWrapper) ListLeadNotes(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListLeadNotes(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// DeleteLeadNote operation middleware
func (siw *ServerInterfaceWrapper) DeleteLeadNote(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "noteId" -------------
var noteId string
err = runtime.BindStyledParameterWithOptions("simple", "noteId", r.PathValue("noteId"), &noteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "noteId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.DeleteLeadNote(w, r, noteId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListLeadSessions operation middleware
func (siw *ServerInterfaceWrapper) ListLeadSessions(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListLeadSessions(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// UpdateNotificationPrefs operation middleware
func (siw *ServerInterfaceWrapper) UpdateNotificationPrefs(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.UpdateNotificationPrefs(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// SetPaneFocus operation middleware
func (siw *ServerInterfaceWrapper) SetPaneFocus(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.SetPaneFocus(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetSummaryReads operation middleware
func (siw *ServerInterfaceWrapper) GetSummaryReads(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetSummaryReads(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListProjects operation middleware
func (siw *ServerInterfaceWrapper) ListProjects(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListProjects(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// CreateProject operation middleware
func (siw *ServerInterfaceWrapper) CreateProject(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.CreateProject(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetProject operation middleware
func (siw *ServerInterfaceWrapper) GetProject(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "projectId" -------------
var projectId string
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetProject(w, r, projectId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListTasks operation middleware
func (siw *ServerInterfaceWrapper) ListTasks(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "projectId" -------------
var projectId string
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListTasks(w, r, projectId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// CreateTask operation middleware
func (siw *ServerInterfaceWrapper) CreateTask(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "projectId" -------------
var projectId string
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.CreateTask(w, r, projectId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTodo operation middleware
func (siw *ServerInterfaceWrapper) GetTodo(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "projectId" -------------
var projectId string
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTodo(w, r, projectId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// StartTodoItem operation middleware
func (siw *ServerInterfaceWrapper) StartTodoItem(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "projectId" -------------
var projectId string
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.StartTodoItem(w, r, projectId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// SetFindingState operation middleware
func (siw *ServerInterfaceWrapper) SetFindingState(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "reviewId" -------------
var reviewId string
err = runtime.BindStyledParameterWithOptions("simple", "reviewId", r.PathValue("reviewId"), &reviewId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "reviewId", Err: err})
return
}
// ------------- Path parameter "index" -------------
var index int
err = runtime.BindStyledParameterWithOptions("simple", "index", r.PathValue("index"), &index, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "index", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.SetFindingState(w, r, reviewId, index)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetSession operation middleware
func (siw *ServerInterfaceWrapper) GetSession(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "sessionId" -------------
var sessionId string
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetSession(w, r, sessionId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// CompactSession operation middleware
func (siw *ServerInterfaceWrapper) CompactSession(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "sessionId" -------------
var sessionId string
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.CompactSession(w, r, sessionId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// InterruptSession operation middleware
func (siw *ServerInterfaceWrapper) InterruptSession(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "sessionId" -------------
var sessionId string
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.InterruptSession(w, r, sessionId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// SendMessage operation middleware
func (siw *ServerInterfaceWrapper) SendMessage(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "sessionId" -------------
var sessionId string
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.SendMessage(w, r, sessionId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTask operation middleware
func (siw *ServerInterfaceWrapper) GetTask(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTask(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskChanges operation middleware
func (siw *ServerInterfaceWrapper) GetTaskChanges(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params GetTaskChangesParams
// ------------- Optional query parameter "since" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "since", r.URL.Query(), &params.Since, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "since"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "since", Err: err})
}
return
}
// ------------- Optional query parameter "snapshot" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "snapshot", r.URL.Query(), &params.Snapshot, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "snapshot"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "snapshot", Err: err})
}
return
}
// ------------- Optional query parameter "step" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "step", r.URL.Query(), &params.Step, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "step"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "step", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskChanges(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetCoAuthors operation middleware
func (siw *ServerInterfaceWrapper) GetCoAuthors(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetCoAuthors(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskDiff operation middleware
func (siw *ServerInterfaceWrapper) GetTaskDiff(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params GetTaskDiffParams
// ------------- Required query parameter "base" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "base", r.URL.Query(), &params.Base, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "base"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "base", Err: err})
}
return
}
// ------------- Required query parameter "tree" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "tree", r.URL.Query(), &params.Tree, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "tree"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "tree", Err: err})
}
return
}
// ------------- Required query parameter "path" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "path", r.URL.Query(), &params.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
}
return
}
// ------------- Optional query parameter "old_path" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "old_path", r.URL.Query(), &params.OldPath, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "old_path"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "old_path", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskDiff(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskDir operation middleware
func (siw *ServerInterfaceWrapper) GetTaskDir(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params GetTaskDirParams
// ------------- Optional query parameter "path" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "path", r.URL.Query(), &params.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskDir(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// DiscardTask operation middleware
func (siw *ServerInterfaceWrapper) DiscardTask(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.DiscardTask(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListTaskEvents operation middleware
func (siw *ServerInterfaceWrapper) ListTaskEvents(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params ListTaskEventsParams
// ------------- Optional query parameter "after" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "after", r.URL.Query(), &params.After, runtime.BindQueryParameterOptions{Type: "integer", Format: "int64"})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "after"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "after", Err: err})
}
return
}
// ------------- Optional query parameter "limit" -------------
err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), &params.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListTaskEvents(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskFile operation middleware
func (siw *ServerInterfaceWrapper) GetTaskFile(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params GetTaskFileParams
// ------------- Required query parameter "path" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "path", r.URL.Query(), &params.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskFile(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskImage operation middleware
func (siw *ServerInterfaceWrapper) GetTaskImage(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params GetTaskImageParams
// ------------- Required query parameter "path" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "path", r.URL.Query(), &params.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskImage(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// MergeTask operation middleware
func (siw *ServerInterfaceWrapper) MergeTask(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.MergeTask(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// MergeIn operation middleware
func (siw *ServerInterfaceWrapper) MergeIn(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.MergeIn(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListPreviews operation middleware
func (siw *ServerInterfaceWrapper) ListPreviews(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListPreviews(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListReviews operation middleware
func (siw *ServerInterfaceWrapper) ListReviews(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListReviews(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListSessions operation middleware
func (siw *ServerInterfaceWrapper) ListSessions(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListSessions(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// CreateSession operation middleware
func (siw *ServerInterfaceWrapper) CreateSession(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.CreateSession(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListSnapshots operation middleware
func (siw *ServerInterfaceWrapper) ListSnapshots(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListSnapshots(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ForkSnapshot operation middleware
func (siw *ServerInterfaceWrapper) ForkSnapshot(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// ------------- Path parameter "n" -------------
var n int
err = runtime.BindStyledParameterWithOptions("simple", "n", r.PathValue("n"), &n, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "n", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ForkSnapshot(w, r, taskId, n)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// MarkSummaryRead operation middleware
func (siw *ServerInterfaceWrapper) MarkSummaryRead(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.MarkSummaryRead(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskTerminal operation middleware
func (siw *ServerInterfaceWrapper) GetTaskTerminal(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
// Parameter object where we will unmarshal all parameters from the context
var params GetTaskTerminalParams
// ------------- Required query parameter "cols" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "cols", r.URL.Query(), &params.Cols, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "cols"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cols", Err: err})
}
return
}
// ------------- Required query parameter "rows" -------------
err = runtime.BindQueryParameterWithOptions("form", true, true, "rows", r.URL.Query(), &params.Rows, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
if err != nil {
var requiredError *runtime.RequiredParameterError
if errors.As(err, &requiredError) {
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "rows"})
} else {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "rows", Err: err})
}
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskTerminal(w, r, taskId, params)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetUnmerged operation middleware
func (siw *ServerInterfaceWrapper) GetUnmerged(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetUnmerged(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetTaskWorkflow operation middleware
func (siw *ServerInterfaceWrapper) GetTaskWorkflow(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetTaskWorkflow(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetWorkflowRun operation middleware
func (siw *ServerInterfaceWrapper) GetWorkflowRun(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "taskId" -------------
var taskId string
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetWorkflowRun(w, r, taskId)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// ListWorkflows operation middleware
func (siw *ServerInterfaceWrapper) ListWorkflows(w http.ResponseWriter, r *http.Request) {
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.ListWorkflows(w, r)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// DeleteWorkflow operation middleware
func (siw *ServerInterfaceWrapper) DeleteWorkflow(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "name" -------------
var name string
err = runtime.BindStyledParameterWithOptions("simple", "name", r.PathValue("name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.DeleteWorkflow(w, r, name)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// GetWorkflow operation middleware
func (siw *ServerInterfaceWrapper) GetWorkflow(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "name" -------------
var name string
err = runtime.BindStyledParameterWithOptions("simple", "name", r.PathValue("name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.GetWorkflow(w, r, name)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
// PutWorkflow operation middleware
func (siw *ServerInterfaceWrapper) PutWorkflow(w http.ResponseWriter, r *http.Request) {
var err error
_ = err
// ------------- Path parameter "name" -------------
var name string
err = runtime.BindStyledParameterWithOptions("simple", "name", r.PathValue("name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
return
}
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
siw.Handler.PutWorkflow(w, r, name)
}))
for _, middleware := range siw.HandlerMiddlewares {
handler = middleware(handler)
}
handler.ServeHTTP(w, r)
}
type UnescapedCookieParamError struct {
ParamName string
Err error
}
func (e *UnescapedCookieParamError) Error() string {
return fmt.Sprintf("error unescaping cookie parameter '%s'", e.ParamName)
}
func (e *UnescapedCookieParamError) Unwrap() error {
return e.Err
}
type UnmarshalingParamError struct {
ParamName string
Err error
}
func (e *UnmarshalingParamError) Error() string {
return fmt.Sprintf("Error unmarshaling parameter %s as JSON: %s", e.ParamName, e.Err.Error())
}
func (e *UnmarshalingParamError) Unwrap() error {
return e.Err
}
type RequiredParamError struct {
ParamName string
}
func (e *RequiredParamError) Error() string {
return fmt.Sprintf("Query argument %s is required, but not found", e.ParamName)
}
type RequiredHeaderError struct {
ParamName string
Err error
}
func (e *RequiredHeaderError) Error() string {
return fmt.Sprintf("Header parameter %s is required, but not found", e.ParamName)
}
func (e *RequiredHeaderError) Unwrap() error {
return e.Err
}
type InvalidParamFormatError struct {
ParamName string
Err error
}
func (e *InvalidParamFormatError) Error() string {
return fmt.Sprintf("Invalid format for parameter %s: %s", e.ParamName, e.Err.Error())
}
func (e *InvalidParamFormatError) Unwrap() error {
return e.Err
}
type TooManyValuesForParamError struct {
ParamName string
Count int
}
func (e *TooManyValuesForParamError) Error() string {
return fmt.Sprintf("Expected one value for %s, got %d", e.ParamName, e.Count)
}
// Handler creates http.Handler with routing matching OpenAPI spec.
func Handler(si ServerInterface) http.Handler {
return HandlerWithOptions(si, StdHTTPServerOptions{})
}
// ServeMux is an abstraction of [http.ServeMux].
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
// HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler {
return HandlerWithOptions(si, StdHTTPServerOptions{
BaseRouter: m,
})
}
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler {
return HandlerWithOptions(si, StdHTTPServerOptions{
BaseURL: baseURL,
BaseRouter: m,
})
}
// HandlerWithOptions creates http.Handler with additional options
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler {
m := options.BaseRouter
if m == nil {
m = http.NewServeMux()
}
if options.ErrorHandlerFunc == nil {
options.ErrorHandlerFunc = func(w http.ResponseWriter, r *http.Request, err error) {
http.Error(w, err.Error(), http.StatusBadRequest)
}
}
wrapper := ServerInterfaceWrapper{
Handler: si,
HandlerMiddlewares: options.Middlewares,
ErrorHandlerFunc: options.ErrorHandlerFunc,
}
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me", wrapper.GetMe)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me", wrapper.UpdateMe)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/notifications", wrapper.UpdateNotificationPrefs)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/lead/sessions", wrapper.ListLeadSessions)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/me/lead/messages", wrapper.MessageLead)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/lead/notes", wrapper.ListLeadNotes)
m.HandleFunc(http.MethodDelete+" "+options.BaseURL+"/api/me/lead/notes/{noteId}", wrapper.DeleteLeadNote)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/focus", wrapper.GetFocus)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/focus", wrapper.SetFocus)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/summary-reads", wrapper.GetSummaryReads)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/pane-focus", wrapper.SetPaneFocus)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects", wrapper.ListProjects)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/projects", wrapper.CreateProject)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects/{projectId}", wrapper.GetProject)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects/{projectId}/tasks", wrapper.ListTasks)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/projects/{projectId}/tasks", wrapper.CreateTask)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects/{projectId}/todo", wrapper.GetTodo)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/projects/{projectId}/todo/tasks", wrapper.StartTodoItem)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}", wrapper.GetTask)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/workflow", wrapper.GetTaskWorkflow)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/tasks/{taskId}/summary-read", wrapper.MarkSummaryRead)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/workflow/run", wrapper.GetWorkflowRun)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/unmerged", wrapper.GetUnmerged)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/co-authors", wrapper.GetCoAuthors)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/merge", wrapper.MergeTask)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/merge-in", wrapper.MergeIn)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/discard", wrapper.DiscardTask)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/events", wrapper.ListTaskEvents)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/changes", wrapper.GetTaskChanges)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/image", wrapper.GetTaskImage)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/diff", wrapper.GetTaskDiff)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/dir", wrapper.GetTaskDir)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/file", wrapper.GetTaskFile)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/terminal", wrapper.GetTaskTerminal)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/previews", wrapper.ListPreviews)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/snapshots", wrapper.ListSnapshots)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/reviews", wrapper.ListReviews)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/reviews/{reviewId}/findings/{index}", wrapper.SetFindingState)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/snapshots/{n}/fork", wrapper.ForkSnapshot)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/sessions", wrapper.ListSessions)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/sessions", wrapper.CreateSession)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/sessions/{sessionId}", wrapper.GetSession)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/messages", wrapper.SendMessage)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/compact", wrapper.CompactSession)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/interrupt", wrapper.InterruptSession)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/blobs", wrapper.UploadBlob)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/blobs/{blobId}", wrapper.GetBlob)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/inbox", wrapper.ListInbox)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/inbox/{itemId}", wrapper.GetInboxItem)
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/inbox/responses", wrapper.RespondInbox)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/events", wrapper.StreamEvents)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/admin/status", wrapper.GetStatus)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/workflows", wrapper.ListWorkflows)
m.HandleFunc(http.MethodDelete+" "+options.BaseURL+"/api/workflows/{name}", wrapper.DeleteWorkflow)
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/workflows/{name}", wrapper.GetWorkflow)
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/workflows/{name}", wrapper.PutWorkflow)
return m
}
// Base64 encoded, compressed with deflate, json marshaled OpenAPI spec.
// Stored as a slice of fixed-width chunks rather than one concatenated
// const string: with thousands of chunks the chained `+` fold is several
// times slower for the Go compiler than parsing a slice literal.
var swaggerSpec = []string{
"7H1/cxu3kuBXQfGuStbuiHLey97dSnV/KLaTeC9OfJZyqb33UlpwBiTxNARoACOKcfm7X6G7gcEMMeRI",
"thRnc/8k8nAGaDQajf7dHyalXq21EsrZydmHiRF2rZUV8I9Xxmjj/yi1ckI5/ydfr2tZcie1Ov2H1co/",
"s+VSrLj/678aMZ+cTf7LaTvqKf5qT3G0jx8/FpNK2NLItR9kcobTTCf+B3rXD3WxEMq9NboUFv69Nnot",
"jJMI2lLw2i39X92xrGvKG7YSXFnGmWuMYtIy0ygl1YJxVTGlmXVG8BUTt0I5tuSWcWPkrajYXBsGI1zz",
"uRPm2opSq8qeM3EnnahoXLcUbI2A+cEXWonppJgI1awmZ3+b6JtJgXD4h/Dh5Ndi4rZrAQAaqRaTYnJ3",
"4j84ueVG8ZVf1N8m38OifvLf4Z+XNAr+6xWN9bGY1Ny6a4D/mrtdLPyyFKoDpn+fbYx2gnFWSyWY00w6",
"S6iYFJO5Nis/1KTiTpw4uRKTYqIN2/ihpGPWceNENZ2cqaau+8v5WEzWsvKA0HOpnFgI43+wwlqp1XXn",
"9/Y767gTQFmWacVg2y/xkzhZd3VXS8Fo0CO/Av99BiDH7c3QpLdCVUjavZ8+FhMj3jfSiMrvSAJ7O2D8",
"HBcdltDflSIQabv5evYPUToPQLrMXeoujeBOVLS32a3ZWVL4ZrbNrniuzU0csUct0i0Z/T43enUGpINr",
"PLJMVkzP4RFQkVv6k+T/6T9hN0KsbcE4Wwlr+QKeshc1byrBXuhKFOEYwnNdibtpDvpk+l0AL2CqI8vm",
"0lgiRWaEbVbCn0ZpCdhAFQUrG8e4Y3HRBWtUJQzjTIkNvX3dbu454zPrmYEHUruliEPZLLQDVLXSlah3",
"wX8n3jfCAv/wL5wzs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PCaYn8tanMHRDxC8bJkGt+zfL978AFcIV0mULqUchjI7j9U1",
"BJu8f7o+HGxJEEi8rnmZhJ+l9YgRHV73GUYG5Gr92+VPPwZbDtQItTF+xXPor7z4+tXz5534lYSiguaM",
"lNWBpE9jGZb5tulSyxhteBShPF1FxB2esbdjVu8+v1cl948f/18AAAD//w==",
}
// decodeSpec returns the embedded OpenAPI spec as raw JSON bytes,
// after base64-decoding and flate-decompressing the embedded blob.
func decodeSpec() ([]byte, error) {
encoded := strings.Join(swaggerSpec, "")
compressed, err := base64.StdEncoding.DecodeString(encoded)
if err != nil {
return nil, fmt.Errorf("error base64 decoding spec: %w", err)
}
zr := flate.NewReader(bytes.NewReader(compressed))
var buf bytes.Buffer
if _, err := buf.ReadFrom(zr); err != nil {
return nil, fmt.Errorf("read flate: %w", err)
}
if err := zr.Close(); err != nil {
return nil, fmt.Errorf("close flate reader: %w", err)
}
return buf.Bytes(), nil
}
var rawSpec = decodeSpecCached()
// a naive cache of the decoded OpenAPI spec
func decodeSpecCached() func() ([]byte, error) {
data, err := decodeSpec()
return func() ([]byte, error) {
return data, err
}
}
// Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
res := make(map[string]func() ([]byte, error))
if len(pathToFile) > 0 {
res[pathToFile] = rawSpec
}
return res
}
// GetSpec returns the OpenAPI specification corresponding to the generated
// code in this file. External references in the spec are resolved through
// PathToRawSpec; externally-referenced files must be embedded in their
// corresponding Go packages (via the import-mapping feature). URL-based
// external refs are not supported.
func GetSpec() (swagger *openapi3.T, err error) {
resolvePath := PathToRawSpec("")
loader := openapi3.NewLoader()
loader.IsExternalRefsAllowed = true
loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
pathToFile := url.String()
pathToFile = path.Clean(pathToFile)
getSpec, ok := resolvePath[pathToFile]
if !ok {
err1 := fmt.Errorf("path not found: %s", pathToFile)
return nil, err1
}
return getSpec()
}
var specData []byte
specData, err = rawSpec()
if err != nil {
return
}
swagger, err = loader.LoadFromData(specData)
if err != nil {
return
}
return
}
// GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI
// specification: decompressed but not unmarshaled. External references
// are not resolved here; the bytes are the spec exactly as embedded by
// codegen. The result is cached at package init time, so repeated calls
// are cheap.
func GetSpecJSON() ([]byte, error) {
return rawSpec()
}
// GetSwagger returns the OpenAPI specification corresponding to the
// generated code in this file.
//
// Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger
// to openapi3.T. Use [GetSpec] instead. This wrapper is retained for
// backwards compatibility.
func GetSwagger() (*openapi3.T, error) {
return GetSpec()
}