fakes

package
v0.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collaboration

type Collaboration struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	VCSType string `json:"vcs-type"`
	Slug    string `json:"slug"`
}

type ExecResponse

type ExecResponse struct {
	CommandID string `json:"command_id"`
	PID       int    `json:"pid"`
	Stdout    string `json:"stdout"`
	Stderr    string `json:"stderr"`
	ExitCode  int    `json:"exit_code"`
}

type FakeAnthropic

type FakeAnthropic struct {
	http.Handler
	Recorder *recorder.RequestRecorder
	// contains filtered or unexported fields
}

FakeAnthropic serves canned responses for the Anthropic Messages API.

func NewFakeAnthropic

func NewFakeAnthropic(responses ...string) *FakeAnthropic

func (*FakeAnthropic) SetTokenLimitErrors

func (f *FakeAnthropic) SetTokenLimitErrors(n int)

SetTokenLimitErrors configures the fake to return n consecutive "prompt is too long" errors before returning normal responses.

type FakeCircleCI

type FakeCircleCI struct {
	http.Handler
	Recorder *recorder.RequestRecorder

	Collaborations []Collaboration
	Projects       []Project
	Sandboxes      []Sandbox
	RunResponse    *RunResponse
	AddKeyURL      string
	ExecResponse   *ExecResponse
	RunStatusCode  int // override status code for trigger run endpoint

	// Per-endpoint status code overrides for testing error responses.
	ListStatusCode   int // override for GET /sandbox/instances
	CreateStatusCode int // override for POST /sandbox/instances
	ExecStatusCode   int // override for POST /sandbox/instances/:id/exec
	AddKeyStatusCode int // override for POST /sandbox/instances/:id/ssh/add-key
	// contains filtered or unexported fields
}

FakeCircleCI serves canned responses for the CircleCI API.

func NewFakeCircleCI

func NewFakeCircleCI() *FakeCircleCI

type FakeGitHub

type FakeGitHub struct {
	http.Handler
	Recorder *recorder.RequestRecorder
	// contains filtered or unexported fields
}

FakeGitHub serves canned responses for GitHub's GraphQL API.

func NewFakeGitHub

func NewFakeGitHub() *FakeGitHub

func (*FakeGitHub) SetOrgRepos

func (f *FakeGitHub) SetOrgRepos(resp string)

func (*FakeGitHub) SetOrgValidation

func (f *FakeGitHub) SetOrgValidation(resp string)

func (*FakeGitHub) SetRateLimit

func (f *FakeGitHub) SetRateLimit(resp string)

func (*FakeGitHub) SetRepoError

func (f *FakeGitHub) SetRepoError(repo string, resp string)

func (*FakeGitHub) SetReviewActivity

func (f *FakeGitHub) SetReviewActivity(repo string, resp string)

type Project

type Project struct {
	VCSType  string `json:"vcs_type"`
	Username string `json:"username"`
	Reponame string `json:"reponame"`
}

type RunResponse

type RunResponse struct {
	RunID      string `json:"runId,omitempty"`
	PipelineID string `json:"pipelineId,omitempty"`
}

type Sandbox

type Sandbox struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	OrganizationID string `json:"organization_id"`
	Image          string `json:"image,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL