Documentation ¶
Index ¶
- func BashExec(command string, opts ...cmd.Option) error
- type AWS
- func (a *AWS) CreateECRRepo(name string) (string, error)
- func (a *AWS) CreateStack(name, templatePath string) error
- func (a *AWS) DeleteECRRepo(name string) error
- func (a *AWS) DeleteStack(name string) error
- func (a *AWS) ECRLoginPassword() (string, error)
- func (a *AWS) VPCStackOutput(name string) ([]VPCStackOutput, error)
- func (a *AWS) WaitStackCreateComplete(name string) error
- func (a *AWS) WaitStackDeleteComplete(name string) error
- type AppInitRequest
- type AppShowOutput
- type CLI
- func (cli *CLI) AppDelete() (string, error)
- func (cli *CLI) AppInit(opts *AppInitRequest) (string, error)
- func (cli *CLI) AppList() (string, error)
- func (cli *CLI) AppShow(appName string) (*AppShowOutput, error)
- func (cli *CLI) EnvDelete(envName string) (string, error)
- func (cli *CLI) EnvInit(opts *EnvInitRequest) (string, error)
- func (cli *CLI) EnvList(appName string) (*EnvListOutput, error)
- func (cli *CLI) EnvShow(opts *EnvShowRequest) (*EnvShowOutput, error)
- func (cli *CLI) Help() (string, error)
- func (cli *CLI) Init(opts *InitRequest) (string, error)
- func (cli *CLI) JobDelete(jobName string) (string, error)
- func (cli *CLI) JobDeploy(opts *JobDeployInput) (string, error)
- func (cli *CLI) JobInit(opts *JobInitInput) (string, error)
- func (cli *CLI) JobList(appName string) (*JobListOutput, error)
- func (cli *CLI) JobPackage(opts *PackageInput) error
- func (cli *CLI) SvcDelete(serviceName string) (string, error)
- func (cli *CLI) SvcDeploy(opts *SvcDeployInput) (string, error)
- func (cli *CLI) SvcInit(opts *SvcInitRequest) (string, error)
- func (cli *CLI) SvcList(appName string) (*SvcListOutput, error)
- func (cli *CLI) SvcLogs(opts *SvcLogsRequest) ([]SvcLogsOutput, error)
- func (cli *CLI) SvcPackage(opts *PackageInput) error
- func (cli *CLI) SvcShow(opts *SvcShowRequest) (*SvcShowOutput, error)
- func (cli *CLI) SvcStatus(opts *SvcStatusRequest) (*SvcStatusOutput, error)
- func (cli *CLI) TaskRun(input *TaskRunInput) (string, error)
- func (cli *CLI) Version() (string, error)
- type Docker
- type EnvDescription
- type EnvInitRequest
- type EnvInitRequestVPCConfig
- type EnvInitRequestVPCImport
- type EnvListOutput
- type EnvShowOutput
- type EnvShowRequest
- type EnvShowServices
- type Image
- type InitRequest
- type JobDeployInput
- type JobInitInput
- type JobListOutput
- type PackageInput
- type SvcDeployInput
- type SvcInitRequest
- type SvcListOutput
- type SvcLogsOutput
- type SvcLogsRequest
- type SvcShowConfigurations
- type SvcShowOutput
- type SvcShowRequest
- type SvcShowRoutes
- type SvcShowServiceDiscoveries
- type SvcShowVariables
- type SvcStatusAlarmInfo
- type SvcStatusOutput
- type SvcStatusRequest
- type SvcStatusServiceInfo
- type SvcStatusTaskInfo
- type TaskRunInput
- type VPCStackOutput
- type WkldDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AWS ¶ added in v0.4.0
type AWS struct{}
AWS is a wrapper around aws commands.
func (*AWS) CreateECRRepo ¶ added in v0.4.0
CreateECRRepo runs: aws ecr create-repository --repository-name $name |
jq -r .repository.repositoryUri
func (*AWS) CreateStack ¶ added in v0.4.0
CreateStack runs: aws cloudformation create-stack
--stack-name $name --template-body $templatePath
func (*AWS) DeleteECRRepo ¶ added in v0.4.0
DeleteECRRepo runs: aws ecr delete-repository
--repository-name $name --force
func (*AWS) DeleteStack ¶ added in v0.4.0
DeleteStack runs: aws cloudformation delete-stack --stack-name $name
func (*AWS) ECRLoginPassword ¶ added in v0.4.0
ECRLoginPassword runs: aws ecr get-login-password
func (*AWS) VPCStackOutput ¶ added in v0.4.0
func (a *AWS) VPCStackOutput(name string) ([]VPCStackOutput, error)
VPCStackOutput runs: aws cloudformation describe-stacks --stack-name $name |
jq -r .Stacks[0].Outputs
func (*AWS) WaitStackCreateComplete ¶ added in v0.4.0
WaitStackCreateComplete runs: aws cloudformation wait stack-create-complete
--stack-name $name
func (*AWS) WaitStackDeleteComplete ¶ added in v0.4.0
WaitStackDeleteComplete runs: aws cloudformation wait stack-delete-complete
--stack-name $name
type AppInitRequest ¶
AppInitRequest contains the parameters for calling copilot app init.
type AppShowOutput ¶
AppShowOutput is the JSON output of app show.
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI is a wrapper around os.execs.
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) AppShow ¶
func (cli *CLI) AppShow(appName string) (*AppShowOutput, error)
AppShow runs: copilot app show
--name $n --json
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) --import-private-subnets (optional) --import-public-subnets (optional) --import-vpc-id (optional) --override-private-cidrs (optional) --override-public-cidrs (optional) --override-vpc-cidr (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) Init ¶
func (cli *CLI) Init(opts *InitRequest) (string, error)
Init runs: copilot init
--app $p --svc $s --svc-type $type --tag $t --dockerfile $d --deploy (optionally) --schedule $schedule (optionally) --port $port (optionally)
func (*CLI) JobDeploy ¶ added in v0.7.0
func (cli *CLI) JobDeploy(opts *JobDeployInput) (string, error)
JobDeploy runs: copilot job deploy
--name $n --env $e --tag $t
func (*CLI) JobInit ¶ added in v0.7.0
func (cli *CLI) JobInit(opts *JobInitInput) (string, error)
JobInit runs: copilot job init
--name $n --dockerfile $d --schedule $sched --retries $r --timeout $o
func (*CLI) JobList ¶ added in v0.7.0
func (cli *CLI) JobList(appName string) (*JobListOutput, error)
JobList runs: copilot job ls
--json? --local?
func (*CLI) JobPackage ¶ added in v0.7.0
func (cli *CLI) JobPackage(opts *PackageInput) error
JobPackage runs: copilot job package
--output-dir $dir --name $name --env $env --app $appname --tag $tag
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 --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) SvcPackage ¶ added in v0.7.0
func (cli *CLI) SvcPackage(opts *PackageInput) error
SvcPackage runs: copilot svc package
--output-dir $dir --name $name --env $env --app $appname
func (*CLI) SvcShow ¶
func (cli *CLI) SvcShow(opts *SvcShowRequest) (*SvcShowOutput, error)
SvcShow runs: copilot svc show
--app $p --name $n --json
func (*CLI) SvcStatus ¶ added in v0.4.0
func (cli *CLI) SvcStatus(opts *SvcStatusRequest) (*SvcStatusOutput, error)
SvcStatus runs: copilot svc status
--app $p --env $e --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)
type Docker ¶ added in v0.4.0
type Docker struct{}
Docker is a wrapper around Docker commands.
func NewDocker ¶ added in v0.4.0
func NewDocker() *Docker
NewDocker returns a wrapper around Docker commands.
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"` }
EnvDescription contains descriptive info about an environment.
type EnvInitRequest ¶
type EnvInitRequest struct { AppName string EnvName string Profile string Prod bool CustomizedEnv bool VPCImport EnvInitRequestVPCImport VPCConfig EnvInitRequestVPCConfig }
EnvInitRequest contains the parameters for calling copilot env init.
type EnvInitRequestVPCConfig ¶ added in v0.4.0
type EnvInitRequestVPCConfig struct { CIDR string PublicSubnetCIDRs string PrivateSubnetCIDRs string }
EnvInitRequestVPCConfig contains the parameters for configuring VPC config when calling copilot env init.
type EnvInitRequestVPCImport ¶ added in v0.4.0
EnvInitRequestVPCImport contains the parameters for configuring VPC import when calling copilot env init.
func (EnvInitRequestVPCImport) IsSet ¶ added in v0.4.0
func (e EnvInitRequestVPCImport) IsSet() bool
IsSet returns true if all fields are set.
type EnvListOutput ¶
type EnvListOutput struct {
Envs []EnvDescription `json:"environments"`
}
EnvListOutput is the JSON output of env list.
type EnvShowOutput ¶
type EnvShowOutput struct { Environment EnvDescription `json:"environment"` Services []EnvShowServices `json:"services"` Tags map[string]string `json:"tags"` }
EnvShowOutput is the JSON output of env show.
type EnvShowRequest ¶
EnvShowRequest contains the parameters for calling copilot env show.
type EnvShowServices ¶
EnvShowServices contains brief info about a service.
type InitRequest ¶
type InitRequest struct { AppName string WorkloadName string Deploy bool ImageTag string Dockerfile string WorkloadType string SvcPort string Schedule string }
InitRequest contains the parameters for calling copilot init.
type JobDeployInput ¶ added in v0.7.0
JobDeployInput contains the parameters for calling copilot job deploy.
type JobInitInput ¶ added in v0.7.0
type JobInitInput struct { Name string Dockerfile string Schedule string Retries string Timeout string }
JobInitInput contains the parameters for calling copilot job init.
type JobListOutput ¶ added in v0.7.0
type JobListOutput struct {
Jobs []WkldDescription `json:"jobs"`
}
JobListOutput is the JSON output for job list.
type PackageInput ¶ added in v0.7.0
PackageInput contains the parameters for calling copilot job package.
type SvcDeployInput ¶
SvcDeployInput contains the parameters for calling copilot svc deploy.
type SvcInitRequest ¶
type SvcInitRequest struct { Name string SvcType string Dockerfile string Image string SvcPort string }
SvcInitRequest contains the parameters for calling copilot svc init.
type SvcListOutput ¶
type SvcListOutput struct {
Services []WkldDescription `json:"services"`
}
SvcListOutput is the JSON output for svc list.
type SvcLogsOutput ¶
type SvcLogsOutput struct { LogStreamName string `json:"logStreamName"` IngestionTime int64 `json:"ingestionTime"` Timestamp int64 `json:"timestamp"` Message string `json:"message"` }
SvcLogsOutput is the JSON output of svc logs.
type SvcLogsRequest ¶
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"` }
SvcShowConfigurations contains serialized configuration parameters for a service.
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"` }
SvcShowOutput is the JSON output of the svc show.
type SvcShowRequest ¶
SvcShowRequest contains the parameters for calling copilot svc show.
type SvcShowRoutes ¶
SvcShowRoutes contains serialized route parameters for a web service.
type SvcShowServiceDiscoveries ¶
type SvcShowServiceDiscoveries struct { Environment []string `json:"environment"` Namespace string `json:"namespace"` }
SvcShowServiceDiscoveries contains serialized service discovery info for an service.
type SvcShowVariables ¶
type SvcShowVariables struct { Environment string `json:"environment"` Name string `json:"name"` Value string `json:"value"` }
SvcShowVariables contains serialized environment variables for a service.
type SvcStatusAlarmInfo ¶ added in v0.4.0
type SvcStatusAlarmInfo struct { Arn string `json:"arn"` Name string `json:"name"` Reason string `json:"reason"` Status string `json:"status"` Type string `json:"type"` UpdatedTimes time.Time `json:"updatedTimes"` }
SvcStatusAlarmInfo contains CloudWatch alarm status info.
type SvcStatusOutput ¶ added in v0.4.0
type SvcStatusOutput struct { Service SvcStatusServiceInfo Tasks []SvcStatusTaskInfo `json:"tasks"` Alarms []SvcStatusAlarmInfo `json:"alarms"` }
SvcStatusOutput is the JSON output of the svc status.
type SvcStatusRequest ¶ added in v0.4.0
SvcStatusRequest contains the parameters for calling copilot svc status.
type SvcStatusServiceInfo ¶ added in v0.4.0
type SvcStatusServiceInfo struct { DesiredCount int64 `json:"desiredCount"` RunningCount int64 `json:"runningCount"` Status string `json:"status"` LastDeploymentAt time.Time `json:"lastDeploymentAt"` TaskDefinition string `json:"taskDefinition"` }
SvcStatusServiceInfo contains the status info of a service.
type SvcStatusTaskInfo ¶ added in v0.4.0
type SvcStatusTaskInfo struct { Health string `json:"health"` ID string `json:"id"` Images []Image `json:"images"` LastStatus string `json:"lastStatus"` StartedAt time.Time `json:"startedAt"` StoppedAt time.Time `json:"stoppedAt"` StoppedReason string `json:"stoppedReason"` }
SvcStatusTaskInfo contains the status info of a task.
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.
type VPCStackOutput ¶ added in v0.4.0
VPCStackOutput is the output for VPC stack.
type WkldDescription ¶ added in v0.7.0
type WkldDescription struct { Name string `json:"name"` Type string `json:"type"` AppName string `json:"app"` }
WkldDescription contains the brief description of the workload.