commands

package
v0.0.0-...-d131ca7 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PollInterval             = time.Second * 2
	Delay                    = time.Second * 5
	MAX_ACTIVATION_LIMIT     = 200
	DEFAULT_ACTIVATION_LIMIT = 30
)
View Source
const ACTIVATION_ID = "activationId"
View Source
const BASH_AUTOCOMPLETE_FILENAME string = "wsk_cli_bash_completion.sh"
View Source
const DefaultAPIBuild string = ""
View Source
const DefaultAPIBuildNo string = ""
View Source
const DefaultAPIHost string = ""
View Source
const DefaultAPIVersion string = "v1"
View Source
const DefaultAuth string = ""
View Source
const DefaultCert string = ""
View Source
const DefaultKey string = ""
View Source
const DefaultNamespace string = "_"
View Source
const DefaultOpenWhiskApiPath string = "/api"
View Source
const DefaultPropsFile string = "~/.wskprops"
View Source
const FEED_AUTH_KEY = "authKey"
View Source
const FEED_CREATE = "CREATE"
View Source
const FEED_DELETE = "DELETE"
View Source
const FEED_LIFECYCLE_EVENT = "lifecycleEvent"
View Source
const FEED_TRIGGER_NAME = "triggerName"
View Source
const FINAL_ANNOT = "final"
View Source
const LOGSIZE_LIMIT = 10
View Source
const LOG_SIZE_FLAG = "logsize"
View Source
const MEMORY_FLAG = "memory"
View Source
const MEMORY_LIMIT = 256
View Source
const RAW_HTTP_ANNOT = "raw-http"
View Source
const SDK_DOCKER_COMPONENT_NAME string = "docker"
View Source
const SDK_IOS_COMPONENT_NAME string = "ios"
View Source
const TIMEOUT_FLAG = "timeout"
View Source
const TIMEOUT_LIMIT = 60000
View Source
const WEB_EXPORT_ANNOT = "web-export"
View Source
const WEB_FLAG = "web"

Variables

View Source
var Client *whisk.Client
View Source
var Properties struct {
	Cert       string
	Key        string
	Auth       string
	APIHost    string
	APIVersion string
	APIBuild   string
	APIBuildNo string
	CLIVersion string
	Namespace  string
	PropsFile  string
}
View Source
var UserAgent string = "OpenWhisk-CLI"
View Source
var WskCmd = &cobra.Command{
	Use:               "wsk",
	Short:             wski18n.T("OpenWhisk cloud computing command line interface."),
	Long:              logoText(),
	SilenceUsage:      true,
	PersistentPreRunE: parseConfigFlags,
}

WskCmd defines the entry point for the cli.

Functions

func AssignListInfo

func AssignListInfo(actionName string, verb string, apiName string, basePath string, relPath string, url string) whisk.ApiFilteredList

AssignListInfo(actionName, verb, apiName, basePath, relPath, url) assigns

the given vaules to and initializes an ApiFilteredList struct, then returns it.

func AssignRowInfo

func AssignRowInfo(actionName string, verb string, apiName string, basePath string, relPath string, url string) whisk.ApiFilteredRow

AssignRowInfo(actionName, verb, apiName, basePath, relPath, url) assigns

the given vaules to and initializes an ApiFilteredRow struct, then returns it.

func CheckArgs

func CheckArgs(args []string, minimumArgNumber int, maximumArgNumber int, commandName string,
	requiredArgMsg string) *whisk.WskError

func Execute

func Execute() error

func GetPropertiesFilePath

func GetPropertiesFilePath() (propsFilePath string, werr error)

func IsDebug

func IsDebug() bool

func IsValidApiVerb

func IsValidApiVerb(verb string) (error, bool)

func IsVerbose

func IsVerbose() bool

func NewQualifiedNameError

func NewQualifiedNameError(entityName string, err error) error

NewQualifiedNameError(entityName, err) returns specific whisk error

for invalid qualified names.

func ReadProps

func ReadProps(path string) (map[string]string, error)

func SetDefaultProperties

func SetDefaultProperties()

func SetupClientConfig

func SetupClientConfig(cmd *cobra.Command, args []string) error

func Swap

func Swap(sortables Sortables, i, j int)

Uses quickSort to sort commands based on their compare methods Param: Takes in a array of Sortable interfaces which contains a specific command

func WriteProps

func WriteProps(path string, props map[string]string) error

Types

type ActionFlags

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

type Flags

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

type QualifiedName

type QualifiedName struct {
	EntityName string // pkg+entity
	// contains filtered or unexported fields
}

func NewQualifiedName

func NewQualifiedName(name string) (*QualifiedName, error)

NewQualifiedName(name) initializes and constructs a (possibly fully qualified)

QualifiedName struct.

NOTE: If the given qualified name is None, then this is a default qualified
    name and it is resolved from properties.
NOTE: If the namespace is missing from the qualified name, the namespace
    is also resolved from the property file.

Examples:

foo => qualifiedName {namespace: "_", entityName: foo}
pkg/foo => qualifiedName {namespace: "_", entityName: pkg/foo}
/ns/foo => qualifiedName {namespace: ns, entityName: foo}
/ns/pkg/foo => qualifiedName {namespace: ns, entityName: pkg/foo}

func (*QualifiedName) GetEntity

func (qualifiedName *QualifiedName) GetEntity() string

GetEntity() returns the name of entity in qualifiedName without a leading '/'

func (*QualifiedName) GetEntityName

func (qualifiedName *QualifiedName) GetEntityName() string

GetEntityName() returns the entity name ([package/]entity) of qualifiedName

without a leading '/'

func (*QualifiedName) GetFullQualifiedName

func (qualifiedName *QualifiedName) GetFullQualifiedName() string

GetFullQualifiedName() returns a full qualified name in proper string format

from qualifiedName with proper syntax.

Example: /namespace/[package/]entity

func (*QualifiedName) GetNamespace

func (qualifiedName *QualifiedName) GetNamespace() string

GetNamespace() returns the name of the namespace in qualifiedName without

a leading '/'

func (*QualifiedName) GetPackageName

func (qualifiedName *QualifiedName) GetPackageName() string

GetPackageName() returns the package name from qualifiedName without a

leading '/'

type Sortables

type Sortables []whisk.Sortable

type WebActionAnnotationMethod

type WebActionAnnotationMethod func(annotations whisk.KeyValueArr) whisk.KeyValueArr

Jump to

Keyboard shortcuts

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