cmd

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppNameFromFlagOrConfig

func AppNameFromFlagOrConfig() (string, error)

func ErrorAPINotFound added in v0.4.0

func ErrorAPINotFound(apiName string) error

func ErrorAPINotReady added in v0.4.0

func ErrorAPINotReady(apiName string, status string) error

func ErrorCliAlreadyInAppDir added in v0.4.0

func ErrorCliAlreadyInAppDir(dirPath string) error

func ErrorCliNotInAppDir added in v0.4.0

func ErrorCliNotInAppDir() error

func ErrorFailedToConnect added in v0.4.0

func ErrorFailedToConnect(urlStr string) error

func Execute

func Execute()

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 HTTPPostJSONData

func HTTPPostJSONData(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 IsAppNameSpecified added in v0.7.0

func IsAppNameSpecified() bool

func StatusStr

func StatusStr(statuses []resource.Status) string

func StreamLogs

func StreamLogs(appName string, resourceName string, resourceType string, verbose bool) error

Types

type CliConfig

type CliConfig struct {
	CortexURL          string `json:"cortex_url"`
	AWSAccessKeyID     string `json:"aws_access_key_id"`
	AWSSecretAccessKey string `json:"aws_secret_access_key"`
}

type DetailedPrediction added in v0.6.0

type DetailedPrediction struct {
	Prediction         interface{} `json:"prediction"`
	PredictionReversed interface{} `json:"prediction_reversed"`
	TransformedSample  interface{} `json:"transformed_sample"`
	Response           interface{} `json:"response"`
}

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
	ErrCliAlreadyInAppDir
	ErrAPINotReady
	ErrAPINotFound
	ErrFailedToConnect
	ErrCliNotInAppDir
)

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 HTTPUploadInput

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

type PredictResponse

type PredictResponse struct {
	ResourceID  string        `json:"resource_id"`
	Predictions []interface{} `json:"predictions"`
}

Jump to

Keyboard shortcuts

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