coreo

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext() context.Context

NewContext creates a versioned context.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client struct

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client.

func (*Client) CreateCloudAccount

func (c *Client) CreateCloudAccount(teamID, resourceKey, resourceSecret, resourceName string) (*client.CloudAccount, error)

CreateCloudAccount Create cloud account

func (*Client) CreateComposite

func (c *Client) CreateComposite(teamID, gitRepoURL, name, gitKeyId string) (*client.Composite, error)

CreateComposite Create composite

func (*Client) CreateGitKey

func (c *Client) CreateGitKey(teamID, resourceSecret, resourceName string) (*client.GitKey, error)

CreateGitKey Create git key

func (*Client) CreatePlan added in v0.0.3

func (c *Client) CreatePlan(planConfigContent []byte) (*client.Plan, error)

CreatePlan create a plan

func (*Client) CreateTeam added in v0.0.7

func (c *Client) CreateTeam(teamName, teamDescription string) (*client.Team, error)

CreateTeam Create a new team

func (*Client) DeleteCloudAccountByID

func (c *Client) DeleteCloudAccountByID(teamID, cloudID string) error

DeleteCloudAccountByID Delete cloud by ID

func (*Client) DeleteCompositeByID added in v0.0.7

func (c *Client) DeleteCompositeByID(teamID, compositeID string) error

DeleteCompositeByID delete composite by ID

func (*Client) DeleteGitKeyByID

func (c *Client) DeleteGitKeyByID(teamID, gitKeyID string) error

DeleteGitKeyByID delete git key

func (*Client) DeletePlanByID

func (c *Client) DeletePlanByID(teamID, compositeID, planID string) error

DeletePlanByID Delete by ID

func (*Client) DeleteTokenByID

func (c *Client) DeleteTokenByID(tokenID string) error

DeleteTokenByID Delete token by ID

func (*Client) DisablePlanByID

func (c *Client) DisablePlanByID(teamID, compositeID, planID string) (*client.Plan, error)

DisablePlanByID Disable plan by ID

func (*Client) EnablePlanByID

func (c *Client) EnablePlanByID(teamID, compositeID, planID string) (*client.Plan, error)

EnablePlanByID Enable plan by ID

func (*Client) GetPlanPanel added in v0.0.3

func (c *Client) GetPlanPanel(teamID, compositeID, planID string) (*client.Panel, error)

GetPlanPanel get plan panel

func (*Client) InitPlan added in v0.0.3

func (c *Client) InitPlan(branch, name, region, teamID, cloudID, compositeID, revision string, interval int) (*client.PlanConfig, error)

InitPlan init a plan

func (*Client) ListCloudAccounts

func (c *Client) ListCloudAccounts(teamID string) ([]*client.CloudAccount, error)

ListCloudAccounts Get list of cloud accounts

func (*Client) ListComposites

func (c *Client) ListComposites(teamID string) ([]*client.Composite, error)

ListComposites List composite

func (*Client) ListGitKeys

func (c *Client) ListGitKeys(teamID string) ([]*client.GitKey, error)

ListGitKeys Get list of git keys

func (*Client) ListPlans

func (c *Client) ListPlans(teamID, compositeID string) ([]*client.Plan, error)

ListPlans List plans

func (*Client) ListTeams

func (c *Client) ListTeams() ([]*client.Team, error)

ListTeams get list of teams

func (*Client) ListTokens

func (c *Client) ListTokens() ([]*client.Token, error)

ListTokens get tokens list

func (*Client) MakeClient

func (c *Client) MakeClient() (*client.Client, error)

MakeClient make client method

func (*Client) Option

func (c *Client) Option(opts ...Option) *Client

Option configures the Coreo client with the provided options

func (*Client) RunNowPlanByID added in v0.0.7

func (c *Client) RunNowPlanByID(teamID, compositeID, planID string) (*client.Plan, error)

RunNowPlanByID Run Now plan by ID

func (*Client) ShowCloudAccountByID

func (c *Client) ShowCloudAccountByID(teamID, cloudID string) (*client.CloudAccount, error)

ShowCloudAccountByID show cloud account by ID

func (*Client) ShowCompositeByID

func (c *Client) ShowCompositeByID(teamID, compositeID string) (*client.Composite, error)

ShowCompositeByID show composite by ID

func (*Client) ShowGitKeyByID

func (c *Client) ShowGitKeyByID(teamID, gitKeyID string) (*client.GitKey, error)

ShowGitKeyByID Show gitkey with ID

func (*Client) ShowPlanByID

func (c *Client) ShowPlanByID(teamID, compositeID, planID string) (*client.Plan, error)

ShowPlanByID Show plan by ID

func (*Client) ShowTeamByID

func (c *Client) ShowTeamByID(teamID string) (*client.Team, error)

ShowTeamByID show team with ID

func (*Client) ShowTokenByID

func (c *Client) ShowTokenByID(tokenID string) (*client.Token, error)

ShowTokenByID show token by ID

type Interface

type Interface interface {
	ListTeams() ([]*client.Team, error)
	ShowTeamByID(teamID string) (*client.Team, error)
	CreateTeam(teamName, teamDescripton string) (*client.Team, error)

	ListTokens() ([]*client.Token, error)
	ShowTokenByID(tokenID string) (*client.Token, error)
	DeleteTokenByID(tokenID string) error

	ListCloudAccounts(teamID string) ([]*client.CloudAccount, error)
	ShowCloudAccountByID(teamID, cloudID string) (*client.CloudAccount, error)
	CreateCloudAccount(teamID, resourceKey, resourceSecret, resourceName string) (*client.CloudAccount, error)
	DeleteCloudAccountByID(teamID, cloudID string) error

	ListGitKeys(teamID string) ([]*client.GitKey, error)
	ShowGitKeyByID(teamID, gitKeyID string) (*client.GitKey, error)
	CreateGitKey(teamID, resourceSecret, resourceName string) (*client.GitKey, error)
	DeleteGitKeyByID(teamID, gitKeyID string) error

	ListComposites(teamID string) ([]*client.Composite, error)
	ShowCompositeByID(teamID, compositeID string) (*client.Composite, error)
	CreateComposite(teamID, gitRepoURL, name, gitKeyId string) (*client.Composite, error)
	DeleteCompositeByID(teamID, compositeID string) error

	ListPlans(teamID, compositeID string) ([]*client.Plan, error)
	ShowPlanByID(teamID, compositeID, planID string) (*client.Plan, error)
	EnablePlanByID(teamID, compositeID, planID string) (*client.Plan, error)
	DisablePlanByID(teamID, compositeID, planID string) (*client.Plan, error)
	DeletePlanByID(teamID, compositeID, planID string) error
	InitPlan(branch, name, region, teamID, cloudID, compositeID, revision string, interval int) (*client.PlanConfig, error)
	CreatePlan(planConfigJSON []byte) (*client.Plan, error)
	GetPlanPanel(teamID, compositeID, planID string) (*client.Panel, error)
	RunNowPlanByID(teamID, compositeID, planID string) (*client.Plan, error)
}

Interface for Coreo client for mocking in tests

type Option

type Option func(*options)

Option allows specifying various settings configurable by the coreo client user for overriding the defaults

func APIKey

func APIKey(apiKey string) Option

APIKey specifies the apiKey of the Coreo API server request.

func Host

func Host(host string) Option

Host specifies the host address of the Coreo API server.

func SecretKey

func SecretKey(secretKey string) Option

SecretKey specifies the secretKey of the Coreo API server request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL