api

package
v0.19.770 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

README

Internal API Client

This client should only be used to access the internal API, all other api access should use our go-sdk.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(v *validator.Validate, opts ...clientOption) (*client, error)

func WithAdminEmail

func WithAdminEmail(email string) clientOption

WithAdminEmail specifies the email to use

func WithTimeout

func WithTimeout(dur time.Duration) clientOption

WithTimeout specifies the timeout to use

func WithURL

func WithURL(url string) clientOption

WithURL specifies the url to use

Types

type AWSSettings

type AWSSettings struct {
	Region string `json:"region"`
}

type App

type App struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type AzureAccount

type AzureAccount struct{}

type Client

type Client interface {
	ListOrgs(ctx context.Context, typ string) ([]Org, error)
	DeleteOrg(ctx context.Context, orgID string) error
	DeprovisionOrg(ctx context.Context, orgID string) error
	ReprovisionOrg(ctx context.Context, orgID string) error
	RestartOrg(ctx context.Context, orgID string) error
	AddSupportUsers(ctx context.Context, orgID string) error
	UpdateOrgFeatures(ctx context.Context, orgID string, features map[string]bool) error

	GetFeatures(ctx context.Context) ([]string, error)

	ListApps(ctx context.Context) ([]App, error)
	ReprovisionApp(ctx context.Context, appID string) error
	RestartApp(ctx context.Context, appID string) error
	UpdateAppSandbox(ctx context.Context, appID string) error

	GetInstall(ctx context.Context, id string) (*Install, error)
	ListInstalls(ctx context.Context, typ string) ([]Install, error)
	ReprovisionInstall(ctx context.Context, installID string) error
	RestartInstall(ctx context.Context, installID string) error
	DeprovisionInstall(ctx context.Context, installID string) error
	DeleteInstall(ctx context.Context, installID string) error
	UpdateInstallSandbox(ctx context.Context, installID string) error

	ListComponents(ctx context.Context) ([]Component, error)
	RestartComponent(ctx context.Context, componentID string) error

	ListReleases(ctx context.Context) ([]Release, error)
	RestartRelease(ctx context.Context, releaseID string) error

	ProvisionCanary(ctx context.Context, sandboxMode bool) error
	DeprovisionCanary(ctx context.Context, canaryID string) error
	StartCanaryCron(ctx context.Context) error
	StopCanaryCron(ctx context.Context) error

	CreateIntegrationUser(ctx context.Context) (*CreateIntegrationUserResponse, error)
	CreateCanaryUser(ctx context.Context, canaryID string) (*CreateCanaryUserResponse, error)
	CreateSeedUser(ctx context.Context) (*CreateSeedUserResponse, error)

	ListRunners(ctx context.Context, typ string) ([]Runner, error)
	GetRunner(ctx context.Context, id string) (*Runner, error)
	RestartRunner(ctx context.Context, runnerID string) error
	GetRunnerGroup(ctx context.Context, id string) (*RunnerGroup, error)
	GetRunnerServiceAccount(ctx context.Context, runnerID string) (*RunnerServiceAccount, error)
	GetRunnerServiceAccountToken(ctx context.Context, runnerID string, dur time.Duration, invalidate bool) (string, error)
}

type Component

type Component struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type CreateCanaryUserRequest

type CreateCanaryUserRequest struct {
	CanaryID string `json:"canary_id"`
}

type CreateCanaryUserResponse

type CreateCanaryUserResponse struct {
	APIToken        string `json:"api_token"`
	GithubInstallID string `json:"github_install_id"`
	Email           string `json:"email"`
}

type CreateIntegrationUserRequest

type CreateIntegrationUserRequest struct{}

type CreateIntegrationUserResponse

type CreateIntegrationUserResponse struct {
	APIToken        string `json:"api_token"`
	GithubInstallID string `json:"github_install_id"`
	Email           string `json:"email"`
}

type CreateSeedUserRequest

type CreateSeedUserRequest struct{}

type CreateSeedUserResponse

type CreateSeedUserResponse struct {
	APIToken        string `json:"api_token"`
	GithubInstallID string `json:"github_install_id"`
	Email           string `json:"email"`
}

type DeprovisionCanaryRequest

type DeprovisionCanaryRequest struct {
	CanaryID string `json:"canary_id"`
}

type Install

type Install struct {
	Id            string `json:"id"`
	Name          string `json:"name"`
	SandboxStatus string `json:"sandbox_status"`
	Status        string `json:"status"`

	AWSAccount   *AWSSettings  `json:"aws_account"`
	AzureAccount *AzureAccount `json:"azure_account"`
}

type Org

type Org struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type ProvisionCanaryRequest

type ProvisionCanaryRequest struct {
	SandboxMode bool `json:"sandbox_mode"`
}

type Release

type Release struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type Runner

type Runner struct {
	ID                string `json:"id"`
	OrgID             string `json:"org_id"`
	Status            string `json:"status"`
	StatusDescription string `json:"status_description"`

	RunnerGroupID string `json:"runner_group_id"`
	Name          string `json:"name"`
	DisplayName   string `json:"display_name"`
}

type RunnerGroup

type RunnerGroup struct {
	Type    string `json:"type"`
	OwnerID string `json:"owner_id"`

	Settings *RunnerGroupSettings `json:"settings"`
}

type RunnerGroupSettings

type RunnerGroupSettings struct {
	LocalAWSIAMRoleARN string
}

type RunnerServiceAccount

type RunnerServiceAccount struct {
	Email string `json:"email"`
}

type RunnerServiceAccountTokenRequest

type RunnerServiceAccountTokenRequest struct {
	Duration   string `json:"duration"`
	Invalidate bool   `json:"invalidate"`
}

type RunnerServiceAccountTokenResponse

type RunnerServiceAccountTokenResponse struct {
	Token string `json:"token"`
}

type StartCanaryCron

type StartCanaryCron struct{}

type StopCanaryCron

type StopCanaryCron struct{}

Jump to

Keyboard shortcuts

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