client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInitRequest

type AppInitRequest struct {
	AppName string
	Domain  string
	Tags    map[string]string
}

AppInitRequest contains the parameters for calling copilot app init

type AppShowOutput

type AppShowOutput struct {
	Name string `json:"name"`
	URI  string `json:"uri"`
}

type CLI

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

CLI is a wrapper around os.execs

func NewCLI

func NewCLI() (*CLI, error)

NewCLI returns a wrapper around CLI

func (*CLI) AppDelete

func (cli *CLI) AppDelete(profiles map[string]string) (string, error)

AppDelete runs: copilot app delete

--env-profiles $e1=$p1,$e2=$p2
--yes

func (*CLI) AppInit

func (cli *CLI) AppInit(opts *AppInitRequest) (string, error)

AppInit runs: copilot app init $a

--domain $d (optionally)
--resource-tags $k1=$v1,$k2=$k2 (optionally)

func (*CLI) AppList

func (cli *CLI) AppList() (string, error)

AppList runs: copilot app ls

func (*CLI) AppShow

func (cli *CLI) AppShow(appName string) (*AppShowOutput, error)

AppShow runs: copilot app show

--name $n
--json

func (*CLI) EnvDelete

func (cli *CLI) EnvDelete(envName, profile string) (string, error)

EnvDelete runs: copilot env delete

--name $n
--profile $p
--yes

func (*CLI) EnvInit

func (cli *CLI) EnvInit(opts *EnvInitRequest) (string, error)

EnvInit runs: copilot env init

--name $n
--app $a
--profile $pr
--prod (optional)
--default-config (optional)

func (*CLI) EnvList

func (cli *CLI) EnvList(appName string) (*EnvListOutput, error)

EnvList runs: copilot env ls

--app $a
--json

func (*CLI) EnvShow

func (cli *CLI) EnvShow(opts *EnvShowRequest) (*EnvShowOutput, error)

EnvShow runs: copilot env show

--app $a
--name $n
--json

func (*CLI) Help

func (cli *CLI) Help() (string, error)

Help runs copilot --help

func (*CLI) Init

func (cli *CLI) Init(opts *InitRequest) (string, error)

Init runs: copilot init

--app $p
--svc $s
--svc-type $type
--tag $t
--dockerfile $d
--port $port
--deploy (optionally)

func (*CLI) SvcDelete

func (cli *CLI) SvcDelete(serviceName string) (string, error)

SvcDelete runs: copilot svc delete

--name $n
--yes

func (*CLI) SvcDeploy

func (cli *CLI) SvcDeploy(opts *SvcDeployInput) (string, error)

SvcDeploy runs: copilot svc deploy

--name $n
--env $e
--tag $t

func (*CLI) SvcInit

func (cli *CLI) SvcInit(opts *SvcInitRequest) (string, error)

SvcInit runs: copilot svc init

--name $n
--svc-type $t
--dockerfile $d
--port $port

func (*CLI) SvcList

func (cli *CLI) SvcList(appName string) (*SvcListOutput, error)

SvcList runs: copilot svc ls

--app $p
--json

func (*CLI) SvcLogs

func (cli *CLI) SvcLogs(opts *SvcLogsRequest) ([]SvcLogsOutput, error)

SvcLogs runs: copilot svc logs

--app $p
--name $n
--since $s
--env $e
--json

func (*CLI) SvcShow

func (cli *CLI) SvcShow(opts *SvcShowRequest) (*SvcShowOutput, error)

SvcShow runs: copilot svc show

--app $p
--name $n
--json

func (*CLI) TaskRun added in v0.3.0

func (cli *CLI) TaskRun(input *TaskRunInput) (string, error)

TaskRun runs: copilot task run

-n $t
--dockerfile $d
--app $a (optionally)
--env $e (optionally)
--command $c (optionally)
--env-vars $e1=$v1,$e2=$v2 (optionally)
--default (optionally)
--follow (optionally)

func (*CLI) Version

func (cli *CLI) Version() (string, error)

Version runs: copilot --version

type EnvDescription

type EnvDescription struct {
	Name          string `json:"name"`
	App           string `json:"app"`
	Region        string `json:"region"`
	Account       string `json:"accountID"`
	Prod          bool   `json:"prod"`
	RegistryURL   string `json:"registryURL"`
	ExecutionRole string `json:"executionRoleARN"`
	ManagerRole   string `json:"managerRoleARN"`
}

type EnvInitRequest

type EnvInitRequest struct {
	AppName       string
	EnvName       string
	Profile       string
	Prod          bool
	CustomizedEnv bool
}

EnvInitRequest contains the parameters for calling copilot env init

type EnvListOutput

type EnvListOutput struct {
	Envs []EnvDescription `json:"environments"`
}

type EnvShowOutput

type EnvShowOutput struct {
	Environment EnvDescription    `json:"environment"`
	Services    []EnvShowServices `json:"services"`
	Tags        map[string]string `json:"tags"`
}

type EnvShowRequest

type EnvShowRequest struct {
	AppName string
	EnvName string
}

EnvShowRequest contains the parameters for calling copilot env show

type EnvShowServices

type EnvShowServices struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type InitRequest

type InitRequest struct {
	AppName    string
	SvcName    string
	Deploy     bool
	ImageTag   string
	Dockerfile string
	SvcType    string
	SvcPort    string
}

InitRequest contains the parameters for calling copilot init

type SvcDeployInput

type SvcDeployInput struct {
	Name     string
	EnvName  string
	ImageTag string
}

SvcDeployInput contains the parameters for calling copilot svc deploy

type SvcDescription

type SvcDescription struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	AppName string `json:"app"`
}

type SvcInitRequest

type SvcInitRequest struct {
	Name       string
	SvcType    string
	Dockerfile string
	SvcPort    string
}

SvcInitRequest contains the parameters for calling copilot svc init

type SvcListOutput

type SvcListOutput struct {
	Services []SvcDescription `json:"services"`
}

type SvcLogsOutput

type SvcLogsOutput struct {
	LogStreamName string `json:"logStreamName"`
	IngestionTime int64  `json:"ingestionTime"`
	Timestamp     int64  `json:"timestamp"`
	Message       string `json:"message"`
}

type SvcLogsRequest

type SvcLogsRequest struct {
	AppName string
	EnvName string
	Name    string
	Since   string
}

SvcLogsRequest contains the parameters for calling copilot svc logs

type SvcShowConfigurations

type SvcShowConfigurations struct {
	Environment string `json:"environment"`
	Port        string `json:"port"`
	Tasks       string `json:"tasks"`
	CPU         string `json:"cpu"`
	Memory      string `json:"memory"`
}

type SvcShowOutput

type SvcShowOutput struct {
	SvcName            string                      `json:"service"`
	Type               string                      `json:"type"`
	AppName            string                      `json:"application"`
	Configs            []SvcShowConfigurations     `json:"configurations"`
	ServiceDiscoveries []SvcShowServiceDiscoveries `json:"serviceDiscovery"`
	Routes             []SvcShowRoutes             `json:"routes"`
	Variables          []SvcShowVariables          `json:"variables"`
}

type SvcShowRequest

type SvcShowRequest struct {
	Name    string
	AppName string
}

SvcShowRequest contains the parameters for calling copilot svc show

type SvcShowRoutes

type SvcShowRoutes struct {
	Environment string `json:"environment"`
	URL         string `json:"url"`
}

type SvcShowServiceDiscoveries

type SvcShowServiceDiscoveries struct {
	Environment []string `json:"environment"`
	Namespace   string   `json:"namespace"`
}

type SvcShowVariables

type SvcShowVariables struct {
	Environment string `json:"environment"`
	Name        string `json:"name"`
	Value       string `json:"value"`
}

type TaskRunInput added in v0.3.0

type TaskRunInput struct {
	AppName string

	GroupName string

	Image      string
	Dockerfile string

	Subnets        []string
	SecurityGroups []string
	Env            string

	Command string
	EnvVars string

	Default bool
	Follow  bool
}

TaskRunInput contains the parameters for calling copilot task run.

Jump to

Keyboard shortcuts

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