sdk

package
v0.0.0-...-699ca5e Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New()

Types

type CreateRunnerTokenParams

type CreateRunnerTokenParams struct {
}

type CreateRunnerTokenResponse

type CreateRunnerTokenResponse struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	Scope       string `json:"scope"`
	TokenType   string `json:"token_type"`
}

type GeneratePresignedUrlParams

type GeneratePresignedUrlParams struct {
	RunId string
}

type GeneratePresignedUrlResponse

type GeneratePresignedUrlResponse struct {
	Url string `json:"url"`
}

type ListRunsParams

type ListRunsParams struct {
	AgentId     string     `json:"agent_id,omitempty" url:"-"`
	Status      string     `json:"status,omitempty" url:"status,omitempty"`
	WorkspaceId *uuid.UUID `json:"workspace_id,omitempty" url:"-"`
}

type ListRunsResponse

type ListRunsResponse struct {
	Runs []Run `json:"runs"`
}

type Run

type Run struct {
	Id               string     `json:"id"`
	Status           string     `json:"status"`
	WorkspaceId      string     `json:"workspace_id"`
	OrganizationId   string     `json:"organization_id"`
	Operation        string     `json:"operation"`
	Add              int        `json:"add"`
	Change           int        `json:"change"`
	Destroy          int        `json:"destroy"`
	ManagedResources int        `json:"managed_resources"`
	CreatedAt        time.Time  `json:"created_at"`
	UpdatedAt        time.Time  `json:"updated_at"`
	CompletedAt      *time.Time `json:"completed_at"`
	AgentId          *uuid.UUID `json:"agent_id,omitempty"`
}

type Runs

type Runs struct {
	// contains filtered or unexported fields
}

func (*Runs) List

func (r *Runs) List(params *ListRunsParams) (*ListRunsResponse, error)

func (*Runs) PresignedUrl

func (*Runs) Update

func (r *Runs) Update(params *UpdateRunParams) (*UpdateRunResponse, error)

func (*Runs) UploadLogs

func (r *Runs) UploadLogs(runId string, logs string) error

func (*Runs) UploadPlan

func (r *Runs) UploadPlan(params *UploadPlanParams) (*UploadPlanResponse, error)

type Sdk

type Sdk struct {
	Client         *http.Client
	ApiUrl         string
	TokenUrl       string
	OrganizationId string
	// contains filtered or unexported fields
}

func (*Sdk) GetWorkspace

func (s *Sdk) GetWorkspace(workspaceId string) (*WorkspaceResponse, error)

func (*Sdk) Runs

func (s *Sdk) Runs() *Runs

func (*Sdk) Tokens

func (s *Sdk) Tokens() *Tokens

type Tokens

type Tokens struct {
	// contains filtered or unexported fields
}

func (*Tokens) CreateRunnerToken

func (t *Tokens) CreateRunnerToken(params *CreateRunnerTokenParams) (*CreateRunnerTokenResponse, error)

type UpdateRunParams

type UpdateRunParams struct {
	RunId            string
	Status           string `json:"status,omitempty"`
	Add              int    `json:"add,omitempty"`
	Change           int    `json:"change,omitempty"`
	Destroy          int    `json:"destroy,omitempty"`
	ManagedResources int    `json:"managed_resources,omitempty"`
}

type UpdateRunResponse

type UpdateRunResponse struct {
	Run Run `json:"run"`
}

type UploadPlanParams

type UploadPlanParams struct {
	RunId string
	Plan  []byte
}

type UploadPlanResponse

type UploadPlanResponse struct {
	Run Run `json:"run"`
}

type Workspace

type Workspace struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Locked bool   `json:"locked"`
}

type WorkspaceResponse

type WorkspaceResponse struct {
	Workspace Workspace `json:"workspace"`
}

Jump to

Keyboard shortcuts

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