Documentation
¶
Overview ¶
Package oapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- Constants
- func NewAddFollowupRequest(server string, id string, body AddFollowupJSONRequestBody) (*http.Request, error)
- func NewAddFollowupRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAgentRequest(server string, body CreateAgentJSONRequestBody) (*http.Request, error)
- func NewCreateAgentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteAgentRequest(server string, id string) (*http.Request, error)
- func NewGetAgentConversationRequest(server string, id string) (*http.Request, error)
- func NewGetAgentRequest(server string, id string) (*http.Request, error)
- func NewGetMeRequest(server string) (*http.Request, error)
- func NewListAgentsRequest(server string, params *ListAgentsParams) (*http.Request, error)
- func NewListModelsRequest(server string) (*http.Request, error)
- func NewListRepositoriesRequest(server string) (*http.Request, error)
- func NewStopAgentRequest(server string, id string) (*http.Request, error)
- type AddFollowupJSONBody
- type AddFollowupJSONRequestBody
- type AddFollowupResponse
- type Client
- func (c *Client) AddFollowup(ctx context.Context, id string, body AddFollowupJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AddFollowupWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAgent(ctx context.Context, body CreateAgentJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAgentWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteAgent(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAgent(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAgentConversation(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListAgents(ctx context.Context, params *ListAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListRepositories(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) StopAgent(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AddFollowupWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*AddFollowupResponse, error)
- func (c *ClientWithResponses) AddFollowupWithResponse(ctx context.Context, id string, body AddFollowupJSONRequestBody, ...) (*AddFollowupResponse, error)
- func (c *ClientWithResponses) CreateAgentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAgentResponse, error)
- func (c *ClientWithResponses) CreateAgentWithResponse(ctx context.Context, body CreateAgentJSONRequestBody, ...) (*CreateAgentResponse, error)
- func (c *ClientWithResponses) DeleteAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAgentResponse, error)
- func (c *ClientWithResponses) GetAgentConversationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentConversationResponse, error)
- func (c *ClientWithResponses) GetAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentResponse, error)
- func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error)
- func (c *ClientWithResponses) ListAgentsWithResponse(ctx context.Context, params *ListAgentsParams, reqEditors ...RequestEditorFn) (*ListAgentsResponse, error)
- func (c *ClientWithResponses) ListModelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListModelsResponse, error)
- func (c *ClientWithResponses) ListRepositoriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListRepositoriesResponse, error)
- func (c *ClientWithResponses) StopAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*StopAgentResponse, error)
- type ClientWithResponsesInterface
- type CreateAgent201Status
- type CreateAgentJSONRequestBody
- type CreateAgentRequest
- type CreateAgentResponse
- type DeleteAgentResponse
- type Error
- type GetAgent200Status
- type GetAgentConversation200MessagesType
- type GetAgentConversationResponse
- type GetAgentResponse
- type GetMeResponse
- type HttpRequestDoer
- type Image
- type ImageDimension
- type ListAgents200AgentsStatus
- type ListAgentsParams
- type ListAgentsResponse
- type ListModelsResponse
- type ListRepositoriesResponse
- type RequestEditorFn
- type StopAgentResponse
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewAddFollowupRequest ¶
func NewAddFollowupRequest(server string, id string, body AddFollowupJSONRequestBody) (*http.Request, error)
NewAddFollowupRequest calls the generic AddFollowup builder with application/json body
func NewAddFollowupRequestWithBody ¶
func NewAddFollowupRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewAddFollowupRequestWithBody generates requests for AddFollowup with any type of body
func NewCreateAgentRequest ¶
func NewCreateAgentRequest(server string, body CreateAgentJSONRequestBody) (*http.Request, error)
NewCreateAgentRequest calls the generic CreateAgent builder with application/json body
func NewCreateAgentRequestWithBody ¶
func NewCreateAgentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAgentRequestWithBody generates requests for CreateAgent with any type of body
func NewDeleteAgentRequest ¶
NewDeleteAgentRequest generates requests for DeleteAgent
func NewGetAgentConversationRequest ¶
NewGetAgentConversationRequest generates requests for GetAgentConversation
func NewGetAgentRequest ¶
NewGetAgentRequest generates requests for GetAgent
func NewGetMeRequest ¶
NewGetMeRequest generates requests for GetMe
func NewListAgentsRequest ¶
func NewListAgentsRequest(server string, params *ListAgentsParams) (*http.Request, error)
NewListAgentsRequest generates requests for ListAgents
func NewListModelsRequest ¶
NewListModelsRequest generates requests for ListModels
func NewListRepositoriesRequest ¶
NewListRepositoriesRequest generates requests for ListRepositories
Types ¶
type AddFollowupJSONBody ¶
type AddFollowupJSONBody struct {
Prompt struct {
// Images Optional array of base64 encoded images (max 5)
Images *[]Image `json:"images,omitempty"`
// Text The followup instruction for the agent
Text string `json:"text"`
} `json:"prompt"`
}
AddFollowupJSONBody defines parameters for AddFollowup.
type AddFollowupJSONRequestBody ¶
type AddFollowupJSONRequestBody AddFollowupJSONBody
AddFollowupJSONRequestBody defines body for AddFollowup for application/json ContentType.
type AddFollowupResponse ¶
type AddFollowupResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Id Unique identifier for the cloud agent
Id string `json:"id"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON409 *Error
JSON429 *Error
JSON500 *Error
}
func ParseAddFollowupResponse ¶
func ParseAddFollowupResponse(rsp *http.Response) (*AddFollowupResponse, error)
ParseAddFollowupResponse parses an HTTP response from a AddFollowupWithResponse call
func (AddFollowupResponse) Status ¶
func (r AddFollowupResponse) Status() string
Status returns HTTPResponse.Status
func (AddFollowupResponse) StatusCode ¶
func (r AddFollowupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) AddFollowup ¶
func (c *Client) AddFollowup(ctx context.Context, id string, body AddFollowupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AddFollowupWithBody ¶
func (*Client) CreateAgent ¶
func (c *Client) CreateAgent(ctx context.Context, body CreateAgentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAgentWithBody ¶
func (*Client) DeleteAgent ¶
func (*Client) GetAgentConversation ¶
func (*Client) ListAgents ¶
func (c *Client) ListAgents(ctx context.Context, params *ListAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListModels ¶
func (*Client) ListRepositories ¶
type ClientInterface ¶
type ClientInterface interface {
// ListAgents request
ListAgents(ctx context.Context, params *ListAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAgentWithBody request with any body
CreateAgentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAgent(ctx context.Context, body CreateAgentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAgent request
DeleteAgent(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAgent request
GetAgent(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAgentConversation request
GetAgentConversation(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// AddFollowupWithBody request with any body
AddFollowupWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AddFollowup(ctx context.Context, id string, body AddFollowupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// StopAgent request
StopAgent(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMe request
GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListModels request
ListModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListRepositories request
ListRepositories(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AddFollowupWithBodyWithResponse ¶
func (c *ClientWithResponses) AddFollowupWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddFollowupResponse, error)
AddFollowupWithBodyWithResponse request with arbitrary body returning *AddFollowupResponse
func (*ClientWithResponses) AddFollowupWithResponse ¶
func (c *ClientWithResponses) AddFollowupWithResponse(ctx context.Context, id string, body AddFollowupJSONRequestBody, reqEditors ...RequestEditorFn) (*AddFollowupResponse, error)
func (*ClientWithResponses) CreateAgentWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAgentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAgentResponse, error)
CreateAgentWithBodyWithResponse request with arbitrary body returning *CreateAgentResponse
func (*ClientWithResponses) CreateAgentWithResponse ¶
func (c *ClientWithResponses) CreateAgentWithResponse(ctx context.Context, body CreateAgentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAgentResponse, error)
func (*ClientWithResponses) DeleteAgentWithResponse ¶
func (c *ClientWithResponses) DeleteAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAgentResponse, error)
DeleteAgentWithResponse request returning *DeleteAgentResponse
func (*ClientWithResponses) GetAgentConversationWithResponse ¶
func (c *ClientWithResponses) GetAgentConversationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentConversationResponse, error)
GetAgentConversationWithResponse request returning *GetAgentConversationResponse
func (*ClientWithResponses) GetAgentWithResponse ¶
func (c *ClientWithResponses) GetAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentResponse, error)
GetAgentWithResponse request returning *GetAgentResponse
func (*ClientWithResponses) GetMeWithResponse ¶
func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error)
GetMeWithResponse request returning *GetMeResponse
func (*ClientWithResponses) ListAgentsWithResponse ¶
func (c *ClientWithResponses) ListAgentsWithResponse(ctx context.Context, params *ListAgentsParams, reqEditors ...RequestEditorFn) (*ListAgentsResponse, error)
ListAgentsWithResponse request returning *ListAgentsResponse
func (*ClientWithResponses) ListModelsWithResponse ¶
func (c *ClientWithResponses) ListModelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListModelsResponse, error)
ListModelsWithResponse request returning *ListModelsResponse
func (*ClientWithResponses) ListRepositoriesWithResponse ¶
func (c *ClientWithResponses) ListRepositoriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListRepositoriesResponse, error)
ListRepositoriesWithResponse request returning *ListRepositoriesResponse
func (*ClientWithResponses) StopAgentWithResponse ¶
func (c *ClientWithResponses) StopAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*StopAgentResponse, error)
StopAgentWithResponse request returning *StopAgentResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListAgentsWithResponse request
ListAgentsWithResponse(ctx context.Context, params *ListAgentsParams, reqEditors ...RequestEditorFn) (*ListAgentsResponse, error)
// CreateAgentWithBodyWithResponse request with any body
CreateAgentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAgentResponse, error)
CreateAgentWithResponse(ctx context.Context, body CreateAgentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAgentResponse, error)
// DeleteAgentWithResponse request
DeleteAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAgentResponse, error)
// GetAgentWithResponse request
GetAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentResponse, error)
// GetAgentConversationWithResponse request
GetAgentConversationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentConversationResponse, error)
// AddFollowupWithBodyWithResponse request with any body
AddFollowupWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddFollowupResponse, error)
AddFollowupWithResponse(ctx context.Context, id string, body AddFollowupJSONRequestBody, reqEditors ...RequestEditorFn) (*AddFollowupResponse, error)
// StopAgentWithResponse request
StopAgentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*StopAgentResponse, error)
// GetMeWithResponse request
GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error)
// ListModelsWithResponse request
ListModelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListModelsResponse, error)
// ListRepositoriesWithResponse request
ListRepositoriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListRepositoriesResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateAgent201Status ¶
type CreateAgent201Status string
type CreateAgentJSONRequestBody ¶
type CreateAgentJSONRequestBody = CreateAgentRequest
CreateAgentJSONRequestBody defines body for CreateAgent for application/json ContentType.
type CreateAgentRequest ¶
type CreateAgentRequest struct {
// Model The LLM to use
Model *string `json:"model,omitempty"`
Prompt struct {
// Images Optional array of base64 encoded images (max 5)
Images *[]Image `json:"images,omitempty"`
// Text The task or instructions for the agent to execute
Text string `json:"text"`
} `json:"prompt"`
Source struct {
// Ref Git ref (branch/tag) to use as the base branch
Ref *string `json:"ref,omitempty"`
// Repository The GitHub repository URL
Repository string `json:"repository"`
} `json:"source"`
Target *struct {
// AutoCreatePr Whether to automatically create a pull request when the agent completes
AutoCreatePr *bool `json:"autoCreatePr,omitempty"`
// BranchName Custom branch name for the agent to create
BranchName *string `json:"branchName,omitempty"`
// OpenAsCursorGithubApp Whether to open the pull request as the Cursor GitHub App instead of as the user. Only applies if autoCreatePr is true.
OpenAsCursorGithubApp *bool `json:"openAsCursorGithubApp,omitempty"`
// SkipReviewerRequest Whether to skip adding the user as a reviewer to the pull request. Only applies if autoCreatePr is true and the PR is opened as the Cursor GitHub App.
SkipReviewerRequest *bool `json:"skipReviewerRequest,omitempty"`
} `json:"target,omitempty"`
Webhook *struct {
// Secret Secret key for webhook payload verification
Secret *string `json:"secret,omitempty"`
// Url URL to receive webhook notifications about agent status changes
Url string `json:"url"`
} `json:"webhook,omitempty"`
}
CreateAgentRequest defines model for CreateAgentRequest.
type CreateAgentResponse ¶
type CreateAgentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *struct {
// CreatedAt When the agent was created
CreatedAt time.Time `json:"createdAt"`
// Id Unique identifier for the cloud agent
Id string `json:"id"`
// Name Name for the agent
Name string `json:"name"`
Source struct {
// Ref Git ref (branch/tag) used as the base branch
Ref *string `json:"ref,omitempty"`
// Repository The GitHub repository URL
Repository string `json:"repository"`
} `json:"source"`
// Status Initial status of the newly created agent
Status CreateAgent201Status `json:"status"`
Target struct {
// AutoCreatePr Whether a pull request will be automatically created
AutoCreatePr *bool `json:"autoCreatePr,omitempty"`
// BranchName The Git branch name where the agent is working
BranchName *string `json:"branchName,omitempty"`
// OpenAsCursorGithubApp Whether the pull request will be opened as the Cursor GitHub App
OpenAsCursorGithubApp *bool `json:"openAsCursorGithubApp,omitempty"`
// SkipReviewerRequest Whether to skip adding the user as a reviewer to the pull request
SkipReviewerRequest *bool `json:"skipReviewerRequest,omitempty"`
// Url URL to view the agent in Cursor Web
Url string `json:"url"`
} `json:"target"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON429 *Error
JSON500 *Error
}
func ParseCreateAgentResponse ¶
func ParseCreateAgentResponse(rsp *http.Response) (*CreateAgentResponse, error)
ParseCreateAgentResponse parses an HTTP response from a CreateAgentWithResponse call
func (CreateAgentResponse) Status ¶
func (r CreateAgentResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAgentResponse) StatusCode ¶
func (r CreateAgentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAgentResponse ¶
type DeleteAgentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Id Unique identifier for the cloud agent
Id string `json:"id"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON409 *Error
JSON429 *Error
JSON500 *Error
}
func ParseDeleteAgentResponse ¶
func ParseDeleteAgentResponse(rsp *http.Response) (*DeleteAgentResponse, error)
ParseDeleteAgentResponse parses an HTTP response from a DeleteAgentWithResponse call
func (DeleteAgentResponse) Status ¶
func (r DeleteAgentResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAgentResponse) StatusCode ¶
func (r DeleteAgentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct {
Error *struct {
// Code Machine-readable error code
Code *string `json:"code,omitempty"`
// Message Human-readable error message
Message *string `json:"message,omitempty"`
} `json:"error,omitempty"`
}
Error defines model for Error.
type GetAgent200Status ¶
type GetAgent200Status string
type GetAgentConversation200MessagesType ¶
type GetAgentConversation200MessagesType string
type GetAgentConversationResponse ¶
type GetAgentConversationResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Id Unique identifier for the cloud agent
Id string `json:"id"`
// Messages Array of conversation messages ordered chronologically
Messages []struct {
// Id Unique identifier for the message
Id string `json:"id"`
// Text The content of the message
Text string `json:"text"`
// Type Type of message - either from the user or the model
Type GetAgentConversation200MessagesType `json:"type"`
} `json:"messages"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON409 *Error
JSON429 *Error
JSON500 *Error
}
func ParseGetAgentConversationResponse ¶
func ParseGetAgentConversationResponse(rsp *http.Response) (*GetAgentConversationResponse, error)
ParseGetAgentConversationResponse parses an HTTP response from a GetAgentConversationWithResponse call
func (GetAgentConversationResponse) Status ¶
func (r GetAgentConversationResponse) Status() string
Status returns HTTPResponse.Status
func (GetAgentConversationResponse) StatusCode ¶
func (r GetAgentConversationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAgentResponse ¶
type GetAgentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// CreatedAt When the agent was created
CreatedAt time.Time `json:"createdAt"`
// Id Unique identifier for the cloud agent
Id string `json:"id"`
// Name Name for the agent
Name string `json:"name"`
Source struct {
// Ref Git ref (branch/tag) used as the base branch
Ref *string `json:"ref,omitempty"`
// Repository The GitHub repository URL
Repository *string `json:"repository,omitempty"`
} `json:"source"`
// Status Current status of the cloud agent
Status GetAgent200Status `json:"status"`
// Summary Summary of the agent's work
Summary *string `json:"summary,omitempty"`
Target struct {
// AutoCreatePr Whether a pull request will be automatically created
AutoCreatePr *bool `json:"autoCreatePr,omitempty"`
// BranchName The Git branch name where the agent is working
BranchName *string `json:"branchName,omitempty"`
// OpenAsCursorGithubApp Whether the pull request will be opened as the Cursor GitHub App
OpenAsCursorGithubApp *bool `json:"openAsCursorGithubApp,omitempty"`
// PrUrl URL to view the pull request in GitHub, if any
PrUrl *string `json:"prUrl,omitempty"`
// SkipReviewerRequest Whether to skip adding the user as a reviewer to the pull request
SkipReviewerRequest *bool `json:"skipReviewerRequest,omitempty"`
// Url URL to view the agent in Cursor Web
Url string `json:"url"`
} `json:"target"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON429 *Error
JSON500 *Error
}
func ParseGetAgentResponse ¶
func ParseGetAgentResponse(rsp *http.Response) (*GetAgentResponse, error)
ParseGetAgentResponse parses an HTTP response from a GetAgentWithResponse call
func (GetAgentResponse) Status ¶
func (r GetAgentResponse) Status() string
Status returns HTTPResponse.Status
func (GetAgentResponse) StatusCode ¶
func (r GetAgentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetMeResponse ¶
type GetMeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// ApiKeyName The name of the API key
ApiKeyName string `json:"apiKeyName"`
// CreatedAt When the API key was created
CreatedAt time.Time `json:"createdAt"`
// UserEmail Email address of the user who owns the API key (if available)
UserEmail *openapi_types.Email `json:"userEmail,omitempty"`
}
JSON401 *Error
JSON404 *Error
JSON429 *Error
JSON500 *Error
}
func ParseGetMeResponse ¶
func ParseGetMeResponse(rsp *http.Response) (*GetMeResponse, error)
ParseGetMeResponse parses an HTTP response from a GetMeWithResponse call
func (GetMeResponse) Status ¶
func (r GetMeResponse) Status() string
Status returns HTTPResponse.Status
func (GetMeResponse) StatusCode ¶
func (r GetMeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Image ¶
type Image struct {
// Data Base64 encoded image data
Data string `json:"data"`
Dimension *ImageDimension `json:"dimension,omitempty"`
}
Image defines model for Image.
type ImageDimension ¶
type ImageDimension struct {
// Height Height must be a positive integer
Height int `json:"height"`
// Width Width must be a positive integer
Width int `json:"width"`
}
ImageDimension defines model for ImageDimension.
type ListAgents200AgentsStatus ¶
type ListAgents200AgentsStatus string
type ListAgentsParams ¶
type ListAgentsParams struct {
// Limit Number of cloud agents to return
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Cursor Pagination cursor from the previous response
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}
ListAgentsParams defines parameters for ListAgents.
type ListAgentsResponse ¶
type ListAgentsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Agents List of agents
Agents []struct {
// CreatedAt When the agent was created
CreatedAt time.Time `json:"createdAt"`
// Id Unique identifier for the cloud agent
Id string `json:"id"`
// Name Name for the agent
Name string `json:"name"`
Source struct {
// Ref Git ref (branch/tag) used as the base branch
Ref *string `json:"ref,omitempty"`
// Repository The GitHub repository URL
Repository *string `json:"repository,omitempty"`
} `json:"source"`
// Status Current status of the cloud agent
Status ListAgents200AgentsStatus `json:"status"`
// Summary Summary of the agent's work
Summary *string `json:"summary,omitempty"`
Target struct {
// AutoCreatePr Whether a pull request will be automatically created
AutoCreatePr *bool `json:"autoCreatePr,omitempty"`
// BranchName The Git branch name where the agent is working
BranchName *string `json:"branchName,omitempty"`
// OpenAsCursorGithubApp Whether the pull request will be opened as the Cursor GitHub App
OpenAsCursorGithubApp *bool `json:"openAsCursorGithubApp,omitempty"`
// PrUrl URL to view the pull request in GitHub, if any
PrUrl *string `json:"prUrl,omitempty"`
// SkipReviewerRequest Whether to skip adding the user as a reviewer to the pull request
SkipReviewerRequest *bool `json:"skipReviewerRequest,omitempty"`
// Url URL to view the agent in Cursor Web
Url string `json:"url"`
} `json:"target"`
} `json:"agents"`
// NextCursor Cursor for fetching the next page of results
NextCursor *string `json:"nextCursor,omitempty"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON429 *Error
JSON500 *Error
}
func ParseListAgentsResponse ¶
func ParseListAgentsResponse(rsp *http.Response) (*ListAgentsResponse, error)
ParseListAgentsResponse parses an HTTP response from a ListAgentsWithResponse call
func (ListAgentsResponse) Status ¶
func (r ListAgentsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAgentsResponse) StatusCode ¶
func (r ListAgentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListModelsResponse ¶
type ListModelsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Models Array of available model names
Models []string `json:"models"`
}
JSON401 *Error
JSON429 *Error
JSON500 *Error
}
func ParseListModelsResponse ¶
func ParseListModelsResponse(rsp *http.Response) (*ListModelsResponse, error)
ParseListModelsResponse parses an HTTP response from a ListModelsWithResponse call
func (ListModelsResponse) Status ¶
func (r ListModelsResponse) Status() string
Status returns HTTPResponse.Status
func (ListModelsResponse) StatusCode ¶
func (r ListModelsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListRepositoriesResponse ¶
type ListRepositoriesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Repositories Array of GitHub repositories the user has access to
Repositories []struct {
// Name The name of the repository
Name string `json:"name"`
// Owner The owner of the repository (user or organization)
Owner string `json:"owner"`
// Repository The full URL to the GitHub repository
Repository string `json:"repository"`
} `json:"repositories"`
}
JSON401 *Error
JSON429 *Error
JSON500 *Error
}
func ParseListRepositoriesResponse ¶
func ParseListRepositoriesResponse(rsp *http.Response) (*ListRepositoriesResponse, error)
ParseListRepositoriesResponse parses an HTTP response from a ListRepositoriesWithResponse call
func (ListRepositoriesResponse) Status ¶
func (r ListRepositoriesResponse) Status() string
Status returns HTTPResponse.Status
func (ListRepositoriesResponse) StatusCode ¶
func (r ListRepositoriesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type StopAgentResponse ¶
type StopAgentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Id Unique identifier for the cloud agent
Id string `json:"id"`
}
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON409 *Error
JSON429 *Error
JSON500 *Error
}
func ParseStopAgentResponse ¶
func ParseStopAgentResponse(rsp *http.Response) (*StopAgentResponse, error)
ParseStopAgentResponse parses an HTTP response from a StopAgentWithResponse call
func (StopAgentResponse) Status ¶
func (r StopAgentResponse) Status() string
Status returns HTTPResponse.Status
func (StopAgentResponse) StatusCode ¶
func (r StopAgentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode