cmd

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorAPINotReady added in v0.4.0

func ErrorAPINotReady(apiName string, status string) error

func ErrorConfigCannotBeChangedOnUpdate added in v0.11.0

func ErrorConfigCannotBeChangedOnUpdate(configKey string, prevVal interface{}) error

func ErrorDuplicateCLIEnvNames added in v0.12.0

func ErrorDuplicateCLIEnvNames(environment string) error

func ErrorFailedToConnectOperator added in v0.9.0

func ErrorFailedToConnectOperator(originalError error, operatorURL string) 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 Error added in v0.4.0

type Error struct {
	Kind ErrorKind
	// contains filtered or unexported fields
}

func (Error) Error added in v0.4.0

func (e Error) Error() string

type ErrorKind added in v0.4.0

type ErrorKind int
const (
	ErrUnknown ErrorKind = iota
	ErrAPINotReady
	ErrFailedToConnectOperator
	ErrConfigCannotBeChangedOnUpdate
	ErrDuplicateCLIEnvNames
)

func (ErrorKind) MarshalBinary added in v0.4.0

func (t ErrorKind) MarshalBinary() ([]byte, error)

MarshalBinary satisfies BinaryMarshaler

func (ErrorKind) MarshalText added in v0.4.0

func (t ErrorKind) MarshalText() ([]byte, error)

MarshalText satisfies TextMarshaler

func (ErrorKind) String added in v0.4.0

func (t ErrorKind) String() string

func (*ErrorKind) UnmarshalBinary added in v0.4.0

func (t *ErrorKind) UnmarshalBinary(data []byte) error

UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack

func (*ErrorKind) UnmarshalText added in v0.4.0

func (t *ErrorKind) UnmarshalText(text []byte) error

UnmarshalText satisfies TextUnmarshaler

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