Documentation
¶
Index ¶
- Constants
- Variables
- func ByteCountBinary(b int64) string
- func ExitWithError(code int, err error)
- func GetJDEndpoint(internal bool) string
- func NewAccountCommand() *cobra.Command
- func NewBucketAddCommand() *cobra.Command
- func NewBucketListCommand() *cobra.Command
- func NewBucketRemoveCommand() *cobra.Command
- func NewObjectListCommand() *cobra.Command
- func NewObjectPutCommand() *cobra.Command
- func NewSignUrlCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- func SetAccount(accessKey, secretKey string) (err error)
- type Account
Constants ¶
View Source
const ( // http://tldp.org/LDP/abs/html/exitcodes.html ExitSuccess = iota ExitError ExitBadConnection ExitInvalidInput // for txn, watch command ExitBadFeature // provided a valid flag with an unsupported value ExitInterrupted ExitIO ExitBadArgs = 128 )
Variables ¶
View Source
var ( RootCmd = &cobra.Command{ Use: cliName, Short: cliDescription, Version: Version, SuggestFor: []string{"joss-cli"}, } DebugFlag bool AccessKey string SecretKey string Region string OssType string JossType = joss.OssTypeJDCloud Endpoint string Internal bool VersionFlag bool CommandTimeoutFlag string CommandTimeout time.Duration Force bool Recursive bool )
View Source
var ( Version = "1.0.0+git" // We want to replace this variable at build time with "-ldflags -X main.GitSHA=xxx", where const is not supported. GitSHA = "" )
Functions ¶
func ByteCountBinary ¶
func ExitWithError ¶
func GetJDEndpoint ¶
func NewAccountCommand ¶
func NewBucketAddCommand ¶
func NewBucketListCommand ¶
func NewBucketRemoveCommand ¶
func NewObjectPutCommand ¶
func NewSignUrlCommand ¶ added in v1.1.0
func NewVersionCommand ¶
func SetAccount ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.