Documentation ¶
Index ¶
- Variables
- type CheckoutKey
- type Client
- func (c *Client) ComposeElementId(identifiers []string) (string, error)
- func (c *Client) CreateCheckoutKey(project, keyType string) (*CheckoutKey, error)
- func (c *Client) CreateContext(name string) (*api.Context, error)
- func (c *Client) CreateOrUpdateContextEnvironmentVariable(context_name, variable, value string) error
- func (c *Client) CreateProjectEnvironmentVariable(project, name, value string) error
- func (c *Client) DecomposeElementId(id string, identifiers []string) (map[string]string, error)
- func (c *Client) DeleteCheckoutKey(project, fingerprint string) error
- func (c *Client) DeleteContext(id string) error
- func (c *Client) DeleteContextEnvironmentVariable(context_name, variable string) error
- func (c *Client) DeleteProjectEnvironmentVariable(project, name string) error
- func (c *Client) GetCheckoutKey(project, fingerprint string) (*CheckoutKey, error)
- func (c *Client) GetContext(id string) (*api.Context, error)
- func (c *Client) GetContextByIDOrName(id string) (*api.Context, error)
- func (c *Client) GetContextByName(name string) (*api.Context, error)
- func (c *Client) GetProject(project string) (*Project, error)
- func (c *Client) HasContextEnvironmentVariable(context_name, variable string) (bool, error)
- func (c *Client) HasProjectCheckoutKey(project, fingerprint string) (bool, error)
- func (c *Client) HasProjectEnvironmentVariable(project, name string) (bool, error)
- func (c *Client) ListContextEnvironmentVariables(context_name string) (*[]api.EnvironmentVariable, error)
- func (c *Client) Organization() string
- func (c *Client) Slug(project string) (string, error)
- type Config
- type Project
- type VCSInfo
Constants ¶
This section is empty.
Variables ¶
var ErrContextNotFound = errors.New("context not found")
Functions ¶
This section is empty.
Types ¶
type CheckoutKey ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to the CircleCI REST API It uses upstream client functionality where possible and defines its own methods as needed
func (*Client) ComposeElementId ¶
func (*Client) CreateCheckoutKey ¶
func (c *Client) CreateCheckoutKey(project, keyType string) (*CheckoutKey, error)
CreateCheckoutKey creates a new checkout key and returns the created object
func (*Client) CreateContext ¶
CreateContext creates a new context and returns the created context object
func (*Client) CreateOrUpdateContextEnvironmentVariable ¶
func (c *Client) CreateOrUpdateContextEnvironmentVariable(context_name, variable, value string) error
CreateOrUpdateContextEnvironmentVariable creates a new context environment variable
func (*Client) CreateProjectEnvironmentVariable ¶
CreateProjectEnvironmentVariable creates a new project environment variable
func (*Client) DecomposeElementId ¶
func (*Client) DeleteCheckoutKey ¶
DeleteCheckoutKey deletes an existing checkout key and returns the created object
func (*Client) DeleteContext ¶
func (*Client) DeleteContextEnvironmentVariable ¶
DeleteContextEnvironmentVariable deletes a context environment variable by context ID and name
func (*Client) DeleteProjectEnvironmentVariable ¶
DeleteProjectEnvironmentVariable deletes an existing project environment variable
func (*Client) GetCheckoutKey ¶
func (c *Client) GetCheckoutKey(project, fingerprint string) (*CheckoutKey, error)
GetCheckoutKey gets an existing project's checkout key by its fingerprint
func (*Client) GetContext ¶
GetContext gets an existing context by its ID (UUID)
func (*Client) GetContextByIDOrName ¶
GetContextByIDOrName gets a context by ID if a UUID is specified, and by name otherwise
func (*Client) GetContextByName ¶
GetContextByName gets an existing context by its name
func (*Client) GetProject ¶
GetProject gets an existing project by its project slug (vcs-slug/org-name/repo-name)
func (*Client) HasContextEnvironmentVariable ¶
HasContextEnvironmentVariable lists all environment variables for a given context and checks whether the specified variable is defined. If either the context or the variable does not exist, it returns false.
func (*Client) HasProjectCheckoutKey ¶
HasProjectCheckoutKey checks if an existing project contains checkout key by its fingerprint
func (*Client) HasProjectEnvironmentVariable ¶
HasProjectEnvironmentVariable checks for the existence of a matching project environment variable by name
func (*Client) ListContextEnvironmentVariables ¶
func (c *Client) ListContextEnvironmentVariables(context_name string) (*[]api.EnvironmentVariable, error)
ListContextEnvironmentVariables lists all environment variables for a given context
func (*Client) Organization ¶
Organization returns the organization for a request. The organization configured in the provider is returned.