Documentation
¶
Index ¶
- Constants
- Variables
- func AssignListInfo(actionName string, verb string, apiName string, basePath string, ...) whisk.ApiFilteredList
- func AssignRowInfo(actionName string, verb string, apiName string, basePath string, ...) whisk.ApiFilteredRow
- func CheckArgs(args []string, minimumArgNumber int, maximumArgNumber int, commandName string, ...) *whisk.WskError
- func Execute() error
- func GetPropertiesFilePath() (propsFilePath string, werr error)
- func IsDebug() bool
- func IsValidApiVerb(verb string) (error, bool)
- func IsVerbose() bool
- func NewQualifiedNameError(entityName string, err error) error
- func ReadProps(path string) (map[string]string, error)
- func SetDefaultProperties()
- func SetupClientConfig(cmd *cobra.Command, args []string) error
- func Swap(sortables Sortables, i, j int)
- func WriteProps(path string, props map[string]string) error
- type ActionFlags
- type Flags
- type QualifiedName
- type Sortables
- type WebActionAnnotationMethod
Constants ¶
const ( PollInterval = time.Second * 2 Delay = time.Second * 5 MAX_ACTIVATION_LIMIT = 200 DEFAULT_ACTIVATION_LIMIT = 30 )
const ACTIVATION_ID = "activationId"
const BASH_AUTOCOMPLETE_FILENAME string = "wsk_cli_bash_completion.sh"
const DefaultAPIBuild string = ""
const DefaultAPIBuildNo string = ""
const DefaultAPIHost string = ""
const DefaultAPIVersion string = "v1"
const DefaultAuth string = ""
const DefaultCert string = ""
const DefaultKey string = ""
const DefaultNamespace string = "_"
const DefaultOpenWhiskApiPath string = "/api"
const DefaultPropsFile string = "~/.wskprops"
const FEED_AUTH_KEY = "authKey"
const FEED_CREATE = "CREATE"
const FEED_DELETE = "DELETE"
const FEED_LIFECYCLE_EVENT = "lifecycleEvent"
const FEED_TRIGGER_NAME = "triggerName"
const FINAL_ANNOT = "final"
const LOGSIZE_LIMIT = 10
const LOG_SIZE_FLAG = "logsize"
const MEMORY_FLAG = "memory"
const MEMORY_LIMIT = 256
const RAW_HTTP_ANNOT = "raw-http"
const SDK_DOCKER_COMPONENT_NAME string = "docker"
const SDK_IOS_COMPONENT_NAME string = "ios"
const TIMEOUT_FLAG = "timeout"
const TIMEOUT_LIMIT = 60000
const WEB_EXPORT_ANNOT = "web-export"
const WEB_FLAG = "web"
Variables ¶
var Client *whisk.Client
var Properties struct { Cert string Key string Auth string APIHost string APIVersion string APIBuild string APIBuildNo string CLIVersion string Namespace string PropsFile string }
var UserAgent string = "OpenWhisk-CLI"
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 GetPropertiesFilePath ¶
func IsValidApiVerb ¶
func NewQualifiedNameError ¶
NewQualifiedNameError(entityName, err) returns specific whisk error
for invalid qualified names.
func SetDefaultProperties ¶
func SetDefaultProperties()
Types ¶
type ActionFlags ¶
type ActionFlags 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 WebActionAnnotationMethod ¶
type WebActionAnnotationMethod func(annotations whisk.KeyValueArr) whisk.KeyValueArr