command

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppCommand added in v1.4.0

func AppCommand(name string) *cli.Command

func Commands added in v1.4.0

func Commands() []*cli.Command

func ListBuckets

func ListBuckets(ctx context.Context, storageOpts storage.Options) error

ListBuckets prints all buckets.

func Main

func Main(ctx context.Context, args []string) error

Main is the entrypoint function to run given commands.

func NewCatCommand added in v1.4.0

func NewCatCommand() *cli.Command

func NewCopyCommand added in v1.4.0

func NewCopyCommand() *cli.Command

func NewCopyCommandFlags added in v1.4.0

func NewCopyCommandFlags() []cli.Flag

func NewDeleteCommand added in v1.4.0

func NewDeleteCommand() *cli.Command

func NewListCommand added in v1.4.0

func NewListCommand() *cli.Command

func NewMakeBucketCommand added in v1.4.0

func NewMakeBucketCommand() *cli.Command

func NewMoveCommand added in v1.4.0

func NewMoveCommand() *cli.Command

func NewRemoveBucketCommand added in v1.4.0

func NewRemoveBucketCommand() *cli.Command

func NewRunCommand added in v1.4.0

func NewRunCommand() *cli.Command

func NewSelectCommand added in v1.4.0

func NewSelectCommand() *cli.Command

func NewSizeCommand added in v1.4.0

func NewSizeCommand() *cli.Command

func NewStorageOpts added in v1.2.0

func NewStorageOpts(c *cli.Context) storage.Options

NewStorageOpts creates storage.Options object from the given context.

func NewVersionCommand added in v1.4.0

func NewVersionCommand() *cli.Command

Types

type Cat

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

Cat holds cat operation flags and states.

func (Cat) Run added in v1.2.0

func (c Cat) Run(ctx context.Context) error

Run prints content of given source to standard output.

type Copy

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

Copy holds copy operation flags and states.

func NewCopy added in v1.4.0

func NewCopy(c *cli.Context, deleteSource bool) Copy

NewCopy creates Copy from cli.Context.

func (Copy) Run

func (c Copy) Run(ctx context.Context) error

Run starts copying given source objects to destination.

type Delete

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

Delete holds delete operation flags and states.

func (Delete) Run added in v1.2.0

func (d Delete) Run(ctx context.Context) error

Run remove given sources.

type List

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

List holds list operation flags and states.

func (List) Run added in v1.2.0

func (l List) Run(ctx context.Context) error

Run prints objects at given source.

type ListMessage

type ListMessage struct {
	Object *storage.Object `json:"object"`
	// contains filtered or unexported fields
}

ListMessage is a structure for logging ls results.

func (ListMessage) JSON

func (l ListMessage) JSON() string

JSON returns the JSON representation of ListMessage.

func (ListMessage) String

func (l ListMessage) String() string

String returns the string representation of ListMessage.

type MakeBucket

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

MakeBucket holds bucket creation operation flags and states.

func (MakeBucket) Run added in v1.2.0

func (b MakeBucket) Run(ctx context.Context) error

Run creates a bucket.

type RemoveBucket added in v1.4.0

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

RemoveBucket holds bucket deletion operation flags and states.

func (RemoveBucket) Run added in v1.4.0

func (b RemoveBucket) Run(ctx context.Context) error

Run removes a bucket.

type Scanner

type Scanner struct {
	*bufio.Scanner
	// contains filtered or unexported fields
}

Scanner is a cancelable scanner.

func NewScanner

func NewScanner(ctx context.Context, r io.Reader) *Scanner

NewScanner creates a new scanner with cancellation.

func (*Scanner) Err

func (s *Scanner) Err() error

Err returns encountered errors, if any.

func (*Scanner) Scan

func (s *Scanner) Scan() <-chan string

Scan returns read-only channel to consume lines.

type Select added in v1.4.0

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

Select holds select operation flags and states.

func (Select) Run added in v1.4.0

func (s Select) Run(ctx context.Context) error

Run starts copying given source objects to destination.

type Size

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

Size holds disk usage (du) operation flags and states.

func (Size) Run added in v1.2.0

func (sz Size) Run(ctx context.Context) error

Run calculates disk usage of given source.

type SizeMessage

type SizeMessage struct {
	Source       string `json:"source"`
	StorageClass string `json:"storage_class,omitempty"`
	Count        int64  `json:"count"`
	Size         int64  `json:"size"`
	// contains filtered or unexported fields
}

SizeMessage is the structure for logging disk usage.

func (SizeMessage) JSON

func (s SizeMessage) JSON() string

JSON returns the JSON representation of SizeMessage.

func (SizeMessage) String

func (s SizeMessage) String() string

String returns the string representation of SizeMessage.

Jump to

Keyboard shortcuts

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