Documentation
¶
Index ¶
- func OrgSlug(vcs, org string) string
- func Slug(vcs, org, project string) string
- type Client
- func (c *Client) DoRequest(req *http.Request, resp interface{}) (statusCode int, err error)
- func (c *Client) GetCurrentLogin() (*CurrentLogin, error)
- func (c *Client) HasProjectEnvironmentVariable(vcs, org, project, name string) (bool, error)
- func (c *Client) ListAllContext(organizationSlug string) ([]Context, error)
- func (c *Client) ListAllInsightsWorkflowRuns(projectSlug, workflowName, branch, startDate, endDate string, ...) ([]InsightsWorkflowRun, error)
- func (c *Client) ListContext(organizationSlug, pageToken string) (*ContextResponse, error)
- func (c *Client) ListContextEnvironmentVariable(contextId, pageToken string) (*EnvironmentVariableResponse, error)
- func (c *Client) ListInsightsWorkflowRuns(projectSlug, workflowName, branch, startDate, endDate, pageToken string, ...) (*InsightsWorkflowRunResponse, error)
- func (c *Client) ListOrganizations() (*[]OrganizationResponse, error)
- func (c *Client) ListPipelines(vcs, org string) (*PipelineResponse, error)
- func (c *Client) ListPipelinesWorkflow(pipelineId string) (*WorkflowResponse, error)
- func (c *Client) NewRequest(method string, u *url.URL, payload interface{}) (req *http.Request, err error)
- type Config
- type Context
- type ContextResponse
- type CurrentLogin
- type EnvironmentVariable
- type EnvironmentVariableResponse
- type HTTPError
- type InsightsWorkflowRun
- type InsightsWorkflowRunResponse
- type OrganizationResponse
- type PipelineResponse
- type Workflow
- type WorkflowResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCurrentLogin ¶ added in v1.0.0
func (c *Client) GetCurrentLogin() (*CurrentLogin, error)
func (*Client) HasProjectEnvironmentVariable ¶
func (*Client) ListAllContext ¶ added in v0.1.0
func (*Client) ListAllInsightsWorkflowRuns ¶ added in v0.3.0
func (c *Client) ListAllInsightsWorkflowRuns(projectSlug, workflowName, branch, startDate, endDate string, logger hclog.Logger) ([]InsightsWorkflowRun, error)
func (*Client) ListContext ¶ added in v0.1.0
func (c *Client) ListContext(organizationSlug, pageToken string) (*ContextResponse, error)
func (*Client) ListContextEnvironmentVariable ¶ added in v0.1.0
func (c *Client) ListContextEnvironmentVariable(contextId, pageToken string) (*EnvironmentVariableResponse, error)
func (*Client) ListInsightsWorkflowRuns ¶ added in v0.3.0
func (c *Client) ListInsightsWorkflowRuns(projectSlug, workflowName, branch, startDate, endDate, pageToken string, logger hclog.Logger) (*InsightsWorkflowRunResponse, error)
func (*Client) ListOrganizations ¶ added in v0.1.0
func (c *Client) ListOrganizations() (*[]OrganizationResponse, error)
func (*Client) ListPipelines ¶
func (c *Client) ListPipelines(vcs, org string) (*PipelineResponse, error)
func (*Client) ListPipelinesWorkflow ¶
func (c *Client) ListPipelinesWorkflow(pipelineId string) (*WorkflowResponse, error)
type ContextResponse ¶ added in v0.1.0
type CurrentLogin ¶ added in v1.0.0
type EnvironmentVariable ¶ added in v0.1.0
type EnvironmentVariableResponse ¶ added in v0.1.0
type EnvironmentVariableResponse struct { Items []EnvironmentVariable `json:"items"` NextPageToken string `json:"next_page_token"` }
type InsightsWorkflowRun ¶ added in v0.3.0
type InsightsWorkflowRun struct { ID string `json:"id"` WorkflowName string `json:"workflow_name"` ProjectSlug string `json:"project_slug"` Branch string `json:"branch"` Duration int `json:"duration"` CreatedAt time.Time `json:"created_at"` StoppedAt time.Time `json:"stopped_at"` CreditsUsed int `json:"credits_used"` Status string `json:"status"` }
type InsightsWorkflowRunResponse ¶ added in v0.3.0
type InsightsWorkflowRunResponse struct { Items []InsightsWorkflowRun `json:"items"` NextPageToken string `json:"next_page_token"` }
type OrganizationResponse ¶ added in v0.1.0
type PipelineResponse ¶
type PipelineResponse struct { Items []struct { ID string `json:"id"` Errors []struct { Type string `json:"type"` Message string `json:"message"` } `json:"errors"` ProjectSlug string `json:"project_slug"` UpdatedAt time.Time `json:"updated_at"` Number int `json:"number"` TriggerParameters map[string]interface{} `json:"trigger_parameters"` State string `json:"state"` CreatedAt time.Time `json:"created_at"` Trigger struct { Type string `json:"type"` ReceivedAt time.Time `json:"received_at"` Actor struct { Login string `json:"login"` AvatarURL string `json:"avatar_url"` } `json:"actor"` } `json:"trigger"` Vcs struct { ProviderName string `json:"provider_name"` TargetRepositoryURL string `json:"target_repository_url"` Branch string `json:"branch"` ReviewID string `json:"review_id"` ReviewURL string `json:"review_url"` Revision string `json:"revision"` Tag string `json:"tag"` Commit struct { Subject string `json:"subject"` Body string `json:"body"` } `json:"commit"` OriginRepositoryURL string `json:"origin_repository_url"` } `json:"vcs"` } `json:"items"` NextPageToken string `json:"next_page_token"` }
type Workflow ¶ added in v0.3.0
type Workflow struct { PipelineID string `json:"pipeline_id"` CanceledBy string `json:"canceled_by"` ID string `json:"id"` Name string `json:"name"` ProjectSlug string `json:"project_slug"` ErroredBy string `json:"errored_by"` Tag string `json:"tag"` Status string `json:"status"` StartedBy string `json:"started_by"` PipelineNumber int `json:"pipeline_number"` CreatedAt time.Time `json:"created_at"` StoppedAt time.Time `json:"stopped_at"` }
type WorkflowResponse ¶
Click to show internal directories.
Click to hide internal directories.