Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, account string, params *ConfigurationCreateParameters) (*ConfigurationResponse, error)
- func (c *Client) Delete(ctx context.Context, account, name string) error
- func (c *Client) Get(ctx context.Context, account, name string) (*ConfigurationResponse, error)
- func (c *Client) List(ctx context.Context, account string) (*ConfigurationListResponse, error)
- func (c *Client) ListTemplates(ctx context.Context) (*ConfigurationTemplateListResponse, error)
- type ConfigurationCreateParameters
- type ConfigurationListResponse
- type ConfigurationResponse
- type ConfigurationTemplateListResponse
- type ConfigurationTemplateReponse
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*up.Config
}
Client is a configurations client.
func NewClient ¶
func NewClient(cfg *up.Config) *Client
NewClient builds a configurations client from the given config.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, account string, params *ConfigurationCreateParameters) (*ConfigurationResponse, error)
Create a configuration on Upbound Note that when using GitHub, this will make a new repo, and that requires the GitHub app to be authorized and installed. That's a separate API, which begins with the gitsources login. The full login is implemented in the CLI (https://github.com/upbound/up).
func (*Client) Delete ¶
Delete a configuration on an Upbound account by name. This operation can potentially orphan Managed Control Planes that have deployed the configuration, as they can no longer update them. The API will return an HTTP 403 status code in this case indicating that the configuration is still in use.
func (*Client) ListTemplates ¶
func (c *Client) ListTemplates(ctx context.Context) (*ConfigurationTemplateListResponse, error)
ListTemplates all configuration Templates that can be used to make a configuration
type ConfigurationCreateParameters ¶
type ConfigurationCreateParameters struct { Context string `json:"context"` // Name of the GitHub account/org Name string `json:"name"` // Name of the configuration Provider Provider `json:"provider"` // See Provider above Repo string `json:"repo"` // Name of the repo. Usually the same as the configuration name TemplateID string `json:"templateId"` // Name of the template we clone. There is no API for this today. Private bool `json:"private"` // True if the Github repo should be private }
ConfigurationCreateParameters are the parameters for creating a control plane.
type ConfigurationListResponse ¶
type ConfigurationListResponse struct { Configurations []ConfigurationResponse `json:"configurations"` Count int `json:"count"` Page int `json:"page"` Size int `json:"size"` }
ConfigurationListResponse is a list of all configurations belonging to the account.
type ConfigurationResponse ¶
type ConfigurationResponse struct { ID uuid.UUID `json:"id"` Name *string `json:"name"` LatestVersion *string `json:"latestVersion,omitempty"` TemplateID string `json:"templateID"` Provider Provider `json:"provider"` Context string `json:"context"` Repo string `json:"repo"` Branch string `json:"branch"` CreatorID uint `json:"creatorId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` SyncedAt *time.Time `json:"syncedAt,omitempty"` }
ConfigurationResponse represents the concept of a Configuration on Upbound. It is used to configure a Managed Control Plane with a set of API types and optional extensions.
type ConfigurationTemplateListResponse ¶
type ConfigurationTemplateListResponse struct {
Templates []ConfigurationTemplateReponse `json:"templates"`
}
ConfigurationTemplateListResponse is a list of configuration templates
type ConfigurationTemplateReponse ¶
type ConfigurationTemplateReponse struct { ID string `json:"id"` ImageURI string `json:"imageUri"` Name string `json:"name"` Repo string `json:"repo"` }
ConfigurationTemplateReponse is a single configuration template The ID of the template is the TemplateId for the ConfigurationCreateParameters