Documentation ¶
Index ¶
- Constants
- type CreateRunnerTokenParams
- type CreateRunnerTokenResponse
- type Credentials
- type CredentialsResponse
- type GeneratePresignedUrlParams
- type GeneratePresignedUrlResponse
- type GetRunRequest
- type GetRunResponse
- type ListRunsParams
- type ListRunsResponse
- type Run
- type Runs
- func (r *Runs) Get(params *GetRunRequest) (*GetRunResponse, error)
- func (r *Runs) List(params *ListRunsParams) (*ListRunsResponse, error)
- func (r *Runs) PresignedUrl(params *GeneratePresignedUrlParams) (*GeneratePresignedUrlResponse, error)
- func (r *Runs) Update(params *UpdateRunParams) (*UpdateRunResponse, error)
- func (r *Runs) UploadLogs(runId string, logs string) error
- func (r *Runs) UploadPlan(params *UploadPlanParams) (*UploadPlanResponse, error)
- type Sdk
- func (s *Sdk) GetOrganizationUrl(path string) string
- func (s *Sdk) GetWorkspace(workspaceId string) (*WorkspaceResponse, error)
- func (s *Sdk) Runs() *Runs
- func (s *Sdk) Tokens() *Tokens
- func (s *Sdk) WithAccessToken(accessToken string) *Sdk
- func (s *Sdk) WithBaseUrl(baseUrl string) *Sdk
- func (s *Sdk) WithClient(client *http.Client) *Sdk
- func (s *Sdk) WithClientCredentials(clientId string, clientSecret string, tokenUrl string) *Sdk
- func (s *Sdk) WithOrganizationId(organizationId uuid.UUID) *Sdk
- func (s *Sdk) Workspaces() *Workspaces
- type Tokens
- type UpdateRunParams
- type UpdateRunResponse
- type UploadPlanParams
- type UploadPlanResponse
- type Variable
- type Workspace
- type WorkspaceResponse
- type WorkspaceVariablesResponse
- type WorkspaceVcs
- type Workspaces
Constants ¶
View Source
const ( ClientIdEnvVar = "CHUSHI_CLIENT_ID" ClientSecretEnvVar = "CHUSHI_CLIENT_SECRET" AccessTokenEnvVar = "CHUSHI_ACCESS_TOKEN" UrlEnvVar = "CHUSHI_URL" OrganizationIdEnvVar = "CHUSHI_ORGANIZATION_ID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRunnerTokenParams ¶
type CreateRunnerTokenResponse ¶
type CreateRunnerTokenResponse struct {
Token string `json:"token"`
}
type Credentials ¶ added in v1.3.0
type Credentials struct {
Token string `json:"token"`
}
type CredentialsResponse ¶ added in v1.3.0
type CredentialsResponse struct {
Credentials Credentials `json:"credentials"`
}
type GeneratePresignedUrlParams ¶
type GeneratePresignedUrlParams struct {
RunId string
}
type GeneratePresignedUrlResponse ¶
type GeneratePresignedUrlResponse struct {
Url string `json:"url"`
}
type GetRunRequest ¶ added in v1.5.0
type GetRunRequest struct {
RunId string
}
type GetRunResponse ¶ added in v1.5.0
type GetRunResponse struct {
Run *Run `json:"run"`
}
type ListRunsParams ¶
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) Get ¶ added in v1.5.0
func (r *Runs) Get(params *GetRunRequest) (*GetRunResponse, error)
func (*Runs) List ¶
func (r *Runs) List(params *ListRunsParams) (*ListRunsResponse, error)
func (*Runs) PresignedUrl ¶
func (r *Runs) PresignedUrl(params *GeneratePresignedUrlParams) (*GeneratePresignedUrlResponse, error)
func (*Runs) Update ¶
func (r *Runs) Update(params *UpdateRunParams) (*UpdateRunResponse, error)
func (*Runs) UploadPlan ¶
func (r *Runs) UploadPlan(params *UploadPlanParams) (*UploadPlanResponse, error)
type Sdk ¶
type Sdk struct { Client *sling.Sling TokenUrl string OrganizationId uuid.UUID // contains filtered or unexported fields }
func (*Sdk) GetOrganizationUrl ¶ added in v1.2.2
func (*Sdk) GetWorkspace ¶
func (s *Sdk) GetWorkspace(workspaceId string) (*WorkspaceResponse, error)
func (*Sdk) WithAccessToken ¶ added in v1.2.2
func (*Sdk) WithBaseUrl ¶ added in v1.2.2
func (*Sdk) WithClientCredentials ¶ added in v1.2.2
func (*Sdk) WithOrganizationId ¶ added in v1.2.2
func (*Sdk) Workspaces ¶ added in v1.2.2
func (s *Sdk) Workspaces() *Workspaces
type Tokens ¶
type Tokens struct {
// contains filtered or unexported fields
}
func (*Tokens) CreateRunnerToken ¶
func (t *Tokens) CreateRunnerToken(params *CreateRunnerTokenParams) (*CreateRunnerTokenResponse, error)
type UpdateRunParams ¶
type UpdateRunResponse ¶
type UpdateRunResponse struct {
Run Run `json:"run"`
}
type UploadPlanParams ¶
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"` Vcs WorkspaceVcs `json:"vcs"` }
type WorkspaceResponse ¶
type WorkspaceResponse struct {
Workspace Workspace `json:"workspace"`
}
type WorkspaceVariablesResponse ¶ added in v1.3.0
type WorkspaceVariablesResponse struct {
Variables []Variable `json:"variables"`
}
type WorkspaceVcs ¶ added in v1.2.1
type Workspaces ¶ added in v1.2.2
type Workspaces struct {
// contains filtered or unexported fields
}
func (*Workspaces) GetConnectionCredentials ¶ added in v1.3.0
func (w *Workspaces) GetConnectionCredentials(connectionId uuid.UUID) (*CredentialsResponse, error)
func (*Workspaces) GetVariables ¶ added in v1.3.0
func (w *Workspaces) GetVariables(workspaceId string) ([]Variable, error)
Click to show internal directories.
Click to hide internal directories.