command

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cat

func Cat(ctx context.Context, src *url.URL) error

Cat prints content of given source to standard output.

func Delete

func Delete(
	ctx context.Context,
	op string,
	fullCommand string,
	src ...string,
) error

Delete remove given sources.

func List

func List(
	ctx context.Context,
	src string,

	showEtag bool,
	humanize bool,
	showStorageClass bool,
) error

List prints objects at given source.

func ListBuckets

func ListBuckets(ctx context.Context) 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 MakeBucket

func MakeBucket(
	ctx context.Context,
	op string,
	src string,
) error

MakeBucket creates bucket.

func Size

func Size(
	ctx context.Context,
	src string,
	groupByClass bool,
	humanize bool,
) error

Size calculates disk usage of given source.

Types

type Copy

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

Copy holds copy operation flags and states.

func (Copy) Run

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

Run starts copying given source objects to destination.

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 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 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