Documentation ¶
Overview ¶
Package client provides a Circle http client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // FindOrg returns an organization by slug. FindOrg(slug string) (*Org, error) // FindOrgID returns an organization by ID. FindOrgID(id string) (*Org, error) // FindProject returns a project by slug. FindProject(slug string) (*Project, error) // FindPipeline returns a pipeline by slug. FindPipeline(slug string) (*Pipeline, error) // FindConfig returns a pipeline configuration by // pipeline id. FindConfig(id string) (*Config, error) // ListOrgs returns the user organization list. ListOrgs() ([]*Org, error) // ListProjects returns a project list by organization id. ListProjects(id string) ([]*Project, error) // ListPipelines returns a pipeline list by pipeline slug. ListPipelines(slug string) ([]*Pipeline, error) // ListEnvs returns an environment variable list by // pipeline slug. ListEnvs(slug string) ([]*Env, error) }
Client is used to communicate with the Circle server.
type Collab ¶
type Collab struct { ID string `json:"id"` Type string `json:"vcs_type"` Name string `json:"name"` Slug string `json:"slug"` }
Collab defines a collaboration.
type Option ¶
type Option func(*client)
Option configures a Digital Ocean provider option.
func WithAddress ¶
WithAddress returns an option to set the base address.
func WithTracing ¶
WithTracing returns an option to enable tracing.
type Org ¶
type Org struct { ID string `json:"id"` Type string `json:"type"` Name string `json:"name"` Slug string `json:"slug"` }
Org defines an organization.
type Pipeline ¶
type Pipeline struct { ID string `json:"id"` Slug string `json:"project_slug"` Number int `json:"number"` State string `json:"state"` Created time.Time `json:"created_at"` Updated time.Time `json:"updated_at"` Params struct { Gitlab struct { ID string `json:"project_id"` Name string `json:"repo_name"` Remote string `json:"repo_url"` DeepLink string `json:"web_url"` Branch string `json:"branch"` BranchDefault string `json:"default_branch"` } `json:"gitlab"` } `json:"trigger_parameters"` }
Pipeline defines a pipeline.
type PipelineList ¶
type PipelineList struct { Items []*Pipeline `json:"items"` Token *string `json:"next_page_token"` }
PipelineList defines a pipeline list.
type Project ¶
type Project struct { ID string `json:"id"` Name string `json:"name"` Slug string `json:"slug"` Vcs struct { Link string `json:"vcs_url"` Branch string `json:"default_branch"` Provider string `json:"provider"` } `json:"vcs_info"` }
Project defines a project.
type ProjectList ¶
ProjectList defines a project list.
Click to show internal directories.
Click to hide internal directories.