client

package
v0.0.0-...-7e525bc Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionDefinition

type ActionDefinition struct {
	Type string          `json:"type"`
	Args json.RawMessage `json:"args"`
}

type BuildpackInfo

type BuildpackInfo struct {
	Slug     string `json:"slug"`
	IsLatest bool   `json:"is_latest"`
}

type CodecraftersClient

type CodecraftersClient struct {
	ServerUrl string
}

func NewCodecraftersClient

func NewCodecraftersClient() CodecraftersClient

func (CodecraftersClient) CreateSubmission

func (c CodecraftersClient) CreateSubmission(repositoryId string, commitSha string, command string, stageSelectionStrategy string) (CreateSubmissionResponse, error)

func (CodecraftersClient) FetchAutofixRequest

func (c CodecraftersClient) FetchAutofixRequest(submissionId string) (FetchAutofixRequestResponse, error)

func (CodecraftersClient) FetchBuild

func (c CodecraftersClient) FetchBuild(buildId string) (FetchBuildStatusResponse, error)

func (CodecraftersClient) FetchBuildpacks

func (c CodecraftersClient) FetchBuildpacks(repositoryId string) (FetchBuildpacksResponse, error)

func (CodecraftersClient) FetchDynamicActions

func (c CodecraftersClient) FetchDynamicActions(eventName string, eventParams map[string]interface{}) (FetchDynamicActionsResponse, error)

func (CodecraftersClient) FetchRepositoryBuildpack

func (c CodecraftersClient) FetchRepositoryBuildpack(repositoryId string) (FetchRepositoryBuildpackResponse, error)

func (CodecraftersClient) FetchStageList

func (c CodecraftersClient) FetchStageList(repositoryId string) (FetchStageListResponse, error)

func (CodecraftersClient) FetchSubmission

func (c CodecraftersClient) FetchSubmission(submissionId string) (FetchSubmissionResponse, error)

func (CodecraftersClient) Ping

func (c CodecraftersClient) Ping(repositoryId string) (PingResponse, error)

func (CodecraftersClient) UpdateBuildpack

func (c CodecraftersClient) UpdateBuildpack(repositoryId string) (UpdateBuildpackResponse, error)

type CreateSubmissionResponse

type CreateSubmissionResponse struct {
	Id string `json:"id"`

	// Actions is the list of actions to execute for this submission
	Actions []ActionDefinition `json:"actions"`

	CommitSHA string `json:"commit_sha"`

	// IsError is true when the submission failed to be created, and ErrorMessage is the human-friendly error message
	IsError      bool   `json:"is_error"`
	ErrorMessage string `json:"error_message"`
}

type FetchAutofixRequestResponse

type FetchAutofixRequestResponse struct {
	ErrorMessage string `json:"error_message"`
	IsError      bool   `json:"is_error"`
	Status       string `json:"status"`
}

type FetchBuildStatusResponse

type FetchBuildStatusResponse struct {
	Status string `json:"status"`

	ErrorMessage string `json:"error_message"`
	IsError      bool   `json:"is_error"`
}

type FetchBuildpacksResponse

type FetchBuildpacksResponse struct {
	Buildpacks   []BuildpackInfo `json:"buildpacks"`
	ErrorMessage string          `json:"error_message"`
	IsError      bool            `json:"is_error"`
}

type FetchDynamicActionsResponse

type FetchDynamicActionsResponse struct {
	ActionDefinitions []ActionDefinition `json:"actions"`
}

type FetchRepositoryBuildpackResponse

type FetchRepositoryBuildpackResponse struct {
	Buildpack    BuildpackInfo `json:"buildpack"`
	ErrorMessage string        `json:"error_message"`
	IsError      bool          `json:"is_error"`
}

type FetchStageListResponse

type FetchStageListResponse struct {
	Stages       []Stage `json:"stages"`
	ErrorMessage string  `json:"error_message"`
	IsError      bool    `json:"is_error"`
}

type FetchSubmissionResponse

type FetchSubmissionResponse struct {
	ErrorMessage string `json:"error_message"`
	IsError      bool   `json:"is_error"`
	Status       string `json:"status"`
}

type PingResponse

type PingResponse struct {
	Actions []ActionDefinition `json:"actions"`
}

type Stage

type Stage struct {
	Slug                 string `json:"slug"`
	Name                 string `json:"name"`
	IsCurrent            bool   `json:"is_current"`
	InstructionsMarkdown string `json:"instructions_markdown"`
}

func (Stage) GetDocsMarkdown

func (s Stage) GetDocsMarkdown() string

type UpdateBuildpackResponse

type UpdateBuildpackResponse struct {
	Buildpack    BuildpackInfo `json:"buildpack"`
	ErrorMessage string        `json:"error_message"`
	IsError      bool          `json:"is_error"`
}

Jump to

Keyboard shortcuts

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