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 CreateExtendedVersion(Client *whisk.Client, args []string) error
- func Execute() error
- func ExitOnError(err error)
- func FileExists(file string) (bool, 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 ReadFile(filename string) (string, 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 UpdateExtendedVersion(Client *whisk.Client, args []string, retTrigger *whisk.Trigger) error
- func WriteProps(path string, props map[string]string) error
- type ActionFlags
- type FlagsStruct
- type QualifiedName
- type Sortables
- type Trigger
- type WebActionAnnotationMethod
Constants ¶
const ( MEMORY_LIMIT = 256 TIMEOUT_LIMIT = 60000 LOGSIZE_LIMIT = 10 CONCURRENCY_LIMIT = 1 ACTIVATION_ID = "activationId" WEB_EXPORT_ANNOT = "web-export" RAW_HTTP_ANNOT = "raw-http" FINAL_ANNOT = "final" WEB_SECURE_ANNOT = "require-whisk-auth" NODE_JS_EXT = ".js" PYTHON_EXT = ".py" JAVA_EXT = ".jar" SWIFT_EXT = ".swift" ZIP_EXT = ".zip" PHP_EXT = ".php" BAL_BIN_EXT = ".balx" RUBY_EXT = ".rb" GO_EXT = ".go" NODE_JS = "nodejs" PYTHON = "python" JAVA = "java" SWIFT = "swift" PHP = "php" RUBY = "ruby" GO = "go" BAL = "ballerina" DEFAULT = "default" BLACKBOX = "blackbox" SEQUENCE = "sequence" FETCH_CODE = true DO_NOT_FETCH_CODE = false ACTION_UPDATE = true ACTION_CREATE = false MAX_JS_INT = 1<<53 - 1 )
const ( PollInterval = time.Second * 2 Delay = time.Second * 5 MAX_ACTIVATION_LIMIT = 200 DEFAULT_ACTIVATION_LIMIT = 30 )
const ( MEMORY_FLAG = "memory" LOG_SIZE_FLAG = "logsize" CONCURRENCY_FLAG = "concurrency" TIMEOUT_FLAG = "timeout" WEB_FLAG = "web" WEB_SECURE_FLAG = "web-secure" SAVE_FLAG = "save" SAVE_AS_FLAG = "save-as" )
const ( FEED_CONFIGURATION_FAILURE = "FEED_CONFIGURATION_FAILURE" CMD_DESC_LONG_DEPLOY = "CMD_DESC_LONG_DEPLOY" CMD_DESC_LONG_SYNC = "CMD_DESC_LONG_SYNC" CMD_DESC_LONG_UNDEPLOY = "CMD_DESC_LONG_UNDEPLOY" CMD_DESC_LONG_EXPORT = "CMD_DESC_LONG_EXPORT" )
*
- Mapping from identifiers to message ids in wski18n resources. *
- NOTE: this list is not complete as message will be moved incrementally.
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_READ = "READ"
const FEED_TRIGGER_NAME = "triggerName"
const FEED_UPDATE = "UPDATE"
const SDK_DOCKER_COMPONENT_NAME string = "docker"
const SDK_IOS_COMPONENT_NAME string = "ios"
Variables ¶
var AdditionalHeaders http.Header
var ApiGwAccessToken string
When set, this overrides the default access token used to authenticate with the api gw
var Client *whisk.Client
var ContextId string
When set, this overrides the default authkey based api context id
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 CreateExtendedVersion ¶
CreateExtendedVersion only executes when users indicate to create triggers with --feed-param or --trigger-param flags.
func ExitOnError ¶
func ExitOnError(err error)
func FileExists ¶
func GetPropertiesFilePath ¶
func IsValidApiVerb ¶
func NewQualifiedNameError ¶
NewQualifiedNameError(entityName, err) returns specific whisk error
for invalid qualified names.
func SetDefaultProperties ¶
func SetDefaultProperties()
func Swap ¶
Uses quickSort to sort commands based on their compare methods Param: Takes in a array of Sortable interfaces which contains a specific command
func UpdateExtendedVersion ¶
UpdateExtendedVersion only executes when users indicate to update triggers with --feed-param or --trigger-param flags.
Types ¶
type ActionFlags ¶
type ActionFlags struct {
// contains filtered or unexported fields
}
type FlagsStruct ¶
type FlagsStruct struct { Global struct { Verbose bool Debug bool Cert string Key string Auth string Apihost string Apiversion string Insecure bool } // contains filtered or unexported fields }
var Flags FlagsStruct
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