cmd

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCLINotConfigured              = "cli.cli_not_configured"
	ErrCortexYAMLNotFound            = "cli.cortex_yaml_not_found"
	ErrConnectToDockerDaemon         = "cli.connect_to_docker_daemon"
	ErrDockerPermissions             = "cli.docker_permissions"
	ErrDockerCtrlC                   = "cli.docker_ctrl_c"
	ErrAPINotReady                   = "cli.api_not_ready"
	ErrFailedToConnectOperator       = "cli.failed_to_connect_operator"
	ErrOperatorSocketRead            = "cli.operator_socket_read"
	ErrResponseUnknown               = "cli.response_unknown"
	ErrOperatorResponseUnknown       = "cli.operator_response_unknown"
	ErrOperatorStreamResponseUnknown = "cli.operator_stream_response_unknown"
	ErrOneAWSEnvVarSet               = "cli.one_aws_env_var_set"
	ErrOneAWSConfigFieldSet          = "cli.one_aws_config_field_set"
	ErrClusterUp                     = "cli.cluster_up"
	ErrClusterUpdate                 = "cli.cluster_update"
	ErrClusterInfo                   = "cli.cluster_info"
	ErrClusterDebug                  = "cli.cluster_debug"
	ErrClusterRefresh                = "cli.cluster_refresh"
	ErrClusterDown                   = "cli.cluster_down"
	ErrDuplicateCLIEnvNames          = "cli.duplicate_cli_env_names"
	ErrInvalidOperatorEndpoint       = "cli.invalid_operator_endpoint"
	ErrClusterUpInProgress           = "cli.cluster_up_in_progress"
	ErrClusterAlreadyCreated         = "cli.cluster_already_created"
	ErrClusterDownInProgress         = "cli.cluster_down_in_progress"
	ErrClusterAlreadyDeleted         = "cli.cluster_already_deleted"
	ErrFailedClusterStatus           = "cli.failed_cluster_status"
	ErrClusterDoesNotExist           = "cli.cluster_does_not_exist"
)

Variables

This section is empty.

Functions

func CreateBucketIfNotFound added in v0.15.0

func CreateBucketIfNotFound(awsClient *aws.Client, bucket string) error

func CreateLogGroupIfNotFound added in v0.15.0

func CreateLogGroupIfNotFound(awsClient *aws.Client, logGroup string) error

func ErrorAPINotReady added in v0.4.0

func ErrorAPINotReady(apiName string, status string) error

func ErrorCLINotConfigured added in v0.15.0

func ErrorCLINotConfigured(env string) error

func ErrorClusterAlreadyCreated added in v0.15.0

func ErrorClusterAlreadyCreated(clusterName string, region string) error

func ErrorClusterAlreadyDeleted added in v0.15.0

func ErrorClusterAlreadyDeleted(clusterName string, region string) error

func ErrorClusterDebug added in v0.15.0

func ErrorClusterDebug(out string) error

func ErrorClusterDoesNotExist added in v0.15.0

func ErrorClusterDoesNotExist(clusterName string, region string) error

func ErrorClusterDown added in v0.15.0

func ErrorClusterDown(out string) error

func ErrorClusterDownInProgress added in v0.15.0

func ErrorClusterDownInProgress(clusterName string, region string) error

func ErrorClusterInfo added in v0.15.0

func ErrorClusterInfo(out string) error

func ErrorClusterRefresh added in v0.15.0

func ErrorClusterRefresh(out string) error

func ErrorClusterUp added in v0.15.0

func ErrorClusterUp(out string) error

func ErrorClusterUpInProgress added in v0.15.0

func ErrorClusterUpInProgress(clusterName string, region string) error

func ErrorClusterUpdate added in v0.15.0

func ErrorClusterUpdate(out string) error

func ErrorConnectToDockerDaemon added in v0.15.0

func ErrorConnectToDockerDaemon() error

func ErrorCortexYAMLNotFound added in v0.15.0

func ErrorCortexYAMLNotFound() error

func ErrorDockerCtrlC added in v0.15.0

func ErrorDockerCtrlC() error

func ErrorDockerPermissions added in v0.15.0

func ErrorDockerPermissions(err error) error

func ErrorDuplicateCLIEnvNames added in v0.12.0

func ErrorDuplicateCLIEnvNames(environment string) error

func ErrorFailedClusterStatus added in v0.15.0

func ErrorFailedClusterStatus(status clusterstate.Status, clusterName string, region string) error

func ErrorFailedToConnectOperator added in v0.9.0

func ErrorFailedToConnectOperator(originalError error, operatorURL string) error

func ErrorInvalidOperatorEndpoint added in v0.15.0

func ErrorInvalidOperatorEndpoint(endpoint string) error

func ErrorOneAWSConfigFieldSet added in v0.15.0

func ErrorOneAWSConfigFieldSet(setConfigField string, missingConfigField string, configPath string) error

func ErrorOneAWSEnvVarSet added in v0.15.0

func ErrorOneAWSEnvVarSet(setEnvVar string, missingEnvVar string) error

func ErrorOperatorResponseUnknown added in v0.15.0

func ErrorOperatorResponseUnknown(body string, statusCode int) error

func ErrorOperatorSocketRead added in v0.15.0

func ErrorOperatorSocketRead(err error) error

func ErrorOperatorStreamResponseUnknown added in v0.15.0

func ErrorOperatorStreamResponseUnknown(body string, statusCode int) error

func ErrorResponseUnknown added in v0.15.0

func ErrorResponseUnknown(body string, statusCode int) error

func Execute

func Execute()

func HTTPDelete added in v0.13.0

func HTTPDelete(endpoint string, qParams ...map[string]string) ([]byte, error)

func HTTPGet

func HTTPGet(endpoint string, qParams ...map[string]string) ([]byte, error)

func HTTPPostJSON

func HTTPPostJSON(endpoint string, jsonRequestData []byte, qParams ...map[string]string) ([]byte, error)

func HTTPPostNoBody added in v0.13.0

func HTTPPostNoBody(endpoint string, qParams ...map[string]string) ([]byte, error)

func HTTPPostObjAsJSON added in v0.13.0

func HTTPPostObjAsJSON(endpoint string, requestData interface{}, qParams ...map[string]string) ([]byte, error)

func HTTPUpload

func HTTPUpload(endpoint string, input *HTTPUploadInput, qParams ...map[string]string) ([]byte, error)

func HTTPUploadZip

func HTTPUploadZip(endpoint string, zipInput *zip.Input, fileName string, qParams ...map[string]string) ([]byte, error)

func StreamLogs

func StreamLogs(apiName string) error

Types

type AWSCredentials added in v0.10.0

type AWSCredentials struct {
	AWSAccessKeyID           string `json:"aws_access_key_id"`
	AWSSecretAccessKey       string `json:"aws_secret_access_key"`
	CortexAWSAccessKeyID     string `json:"cortex_aws_access_key_id"`
	CortexAWSSecretAccessKey string `json:"cortex_aws_secret_access_key"`
}

type CLIConfig added in v0.8.0

type CLIConfig struct {
	Telemetry    bool            `json:"telemetry" yaml:"telemetry"`
	Environments []*CLIEnvConfig `json:"environments" yaml:"environments"`
}

type CLIEnvConfig added in v0.12.0

type CLIEnvConfig struct {
	Name               string `json:"name" yaml:"name"`
	OperatorEndpoint   string `json:"operator_endpoint" yaml:"operator_endpoint"`
	AWSAccessKeyID     string `json:"aws_access_key_id" yaml:"aws_access_key_id"`
	AWSSecretAccessKey string `json:"aws_secret_access_key" yaml:"aws_secret_access_key"`
}

type GenericClient added in v0.12.0

type GenericClient struct {
	*http.Client
}

func (*GenericClient) MakeRequest added in v0.12.0

func (client *GenericClient) MakeRequest(request *http.Request) ([]byte, error)

type HTTPUploadInput

type HTTPUploadInput struct {
	FilePaths map[string]string
	Bytes     map[string][]byte
}

type OperatorClient added in v0.12.0

type OperatorClient struct {
	*http.Client
}

func (*OperatorClient) MakeRequest added in v0.12.0

func (client *OperatorClient) MakeRequest(request *http.Request) ([]byte, error)

Jump to

Keyboard shortcuts

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