Documentation ¶
Index ¶
- func AppCommand(name string) *cli.Command
- func Commands() []*cli.Command
- func ListBuckets(ctx context.Context, storageOpts storage.Options) error
- func Main(ctx context.Context, args []string) error
- func NewBucketVersionCommand() *cli.Command
- func NewCatCommand() *cli.Command
- func NewCopyCommand() *cli.Command
- func NewCopyCommandFlags() []cli.Flag
- func NewDeleteCommand() *cli.Command
- func NewHeadCommand() *cli.Command
- func NewListCommand() *cli.Command
- func NewMakeBucketCommand() *cli.Command
- func NewMoveCommand() *cli.Command
- func NewPipeCommand() *cli.Command
- func NewPipeCommandFlags() []cli.Flag
- func NewPresignCommand() *cli.Command
- func NewRemoveBucketCommand() *cli.Command
- func NewRunCommand() *cli.Command
- func NewSelectCommand() *cli.Command
- func NewSharedFlags() []cli.Flag
- func NewSizeCommand() *cli.Command
- func NewStorageOpts(c *cli.Context) storage.Options
- func NewSyncCommand() *cli.Command
- func NewSyncCommandFlags() []cli.Flag
- func NewVersionCommand() *cli.Command
- type BucketVersion
- type BucketVersionMessage
- type Cat
- type Copy
- type Delete
- type EnumValue
- type Head
- type HeadBucketMessage
- type HeadObjectMessage
- type List
- type ListMessage
- type MakeBucket
- type MapFlag
- func (f *MapFlag) Apply(set *flag.FlagSet) error
- func (f *MapFlag) GetDefaultText() string
- func (f *MapFlag) GetEnvVars() []string
- func (f *MapFlag) GetUsage() string
- func (f *MapFlag) GetValue() string
- func (f *MapFlag) IsRequired() bool
- func (f *MapFlag) IsSet() bool
- func (f *MapFlag) IsVisible() bool
- func (f *MapFlag) Names() []string
- func (f *MapFlag) String() string
- func (f *MapFlag) TakesValue() bool
- type MapValue
- type ObjectPair
- type Pipe
- type Presign
- type Reader
- type RemoveBucket
- type Run
- type Select
- type Size
- type SizeAndModificationStrategy
- type SizeMessage
- type SizeOnlyStrategy
- type Sync
- type SyncStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppCommand ¶
func AppCommand(name string) *cli.Command
func ListBuckets ¶
ListBuckets prints all buckets.
func NewBucketVersionCommand ¶
func NewBucketVersionCommand() *cli.Command
func NewCatCommand ¶
func NewCatCommand() *cli.Command
func NewCopyCommand ¶
func NewCopyCommand() *cli.Command
func NewCopyCommandFlags ¶
func NewCopyCommandFlags() []cli.Flag
func NewDeleteCommand ¶
func NewDeleteCommand() *cli.Command
func NewHeadCommand ¶
func NewHeadCommand() *cli.Command
func NewListCommand ¶
func NewListCommand() *cli.Command
func NewMakeBucketCommand ¶
func NewMakeBucketCommand() *cli.Command
func NewMoveCommand ¶
func NewMoveCommand() *cli.Command
func NewPipeCommand ¶
func NewPipeCommand() *cli.Command
func NewPipeCommandFlags ¶
func NewPipeCommandFlags() []cli.Flag
func NewPresignCommand ¶
func NewPresignCommand() *cli.Command
func NewRemoveBucketCommand ¶
func NewRemoveBucketCommand() *cli.Command
func NewRunCommand ¶
func NewRunCommand() *cli.Command
func NewSelectCommand ¶
func NewSelectCommand() *cli.Command
func NewSharedFlags ¶
func NewSharedFlags() []cli.Flag
func NewSizeCommand ¶
func NewSizeCommand() *cli.Command
func NewStorageOpts ¶
NewStorageOpts creates storage.Options object from the given context.
func NewSyncCommand ¶
func NewSyncCommand() *cli.Command
func NewSyncCommandFlags ¶
func NewSyncCommandFlags() []cli.Flag
func NewVersionCommand ¶
func NewVersionCommand() *cli.Command
Types ¶
type BucketVersion ¶
type BucketVersion struct {
// contains filtered or unexported fields
}
type BucketVersionMessage ¶
type BucketVersionMessage struct { Bucket string `json:"bucket"` Status string `json:"status"` // contains filtered or unexported fields }
func (BucketVersionMessage) JSON ¶
func (v BucketVersionMessage) JSON() string
func (BucketVersionMessage) String ¶
func (v BucketVersionMessage) String() string
type Cat ¶
type Cat struct {
// contains filtered or unexported fields
}
Cat holds cat operation flags and states.
type Copy ¶
type Copy struct {
// contains filtered or unexported fields
}
Copy holds copy operation flags and states.
type Delete ¶
type Delete struct {
// contains filtered or unexported fields
}
Delete holds delete operation flags and states.
type EnumValue ¶
type EnumValue struct { Enum []string Default string // ConditionFunction is used to check if the value passed to Set method is valid // or not. // If ConditionFunction is not set, it defaults to string '==' comparison. ConditionFunction func(str, target string) bool // contains filtered or unexported fields }
type HeadBucketMessage ¶
type HeadBucketMessage struct {
Bucket string `json:"bucket"`
}
func (HeadBucketMessage) JSON ¶
func (m HeadBucketMessage) JSON() string
func (HeadBucketMessage) String ¶
func (m HeadBucketMessage) String() string
type HeadObjectMessage ¶
type HeadObjectMessage struct { Key string `json:"key,omitempty"` ContentType string `json:"content_type,omitempty"` ServerSideEncryption string `json:"server_side_encryption,omitempty"` LastModified *time.Time `json:"last_modified,omitempty"` ContentLength int64 `json:"size,omitempty"` StorageClass string `json:"storage_class,omitempty"` VersionID string `json:"version_id,omitempty"` ETag string `json:"etag,omitempty"` Metadata map[string]string `json:"metadata"` }
func (HeadObjectMessage) JSON ¶
func (m HeadObjectMessage) JSON() string
func (HeadObjectMessage) String ¶
func (m HeadObjectMessage) String() string
type List ¶
type List struct {
// contains filtered or unexported fields
}
List holds list operation flags and states.
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.
type MapFlag ¶
type MapFlag struct { Name string Category string DefaultText string FilePath string Usage string HasBeenSet bool Required bool Hidden bool Value MapValue }
func (*MapFlag) GetDefaultText ¶
func (*MapFlag) GetEnvVars ¶
func (*MapFlag) IsRequired ¶
func (*MapFlag) TakesValue ¶
type ObjectPair ¶
type ObjectPair struct {
// contains filtered or unexported fields
}
type Pipe ¶
type Pipe struct {
// contains filtered or unexported fields
}
Pipe holds pipe operation flags and states.
type Presign ¶
type Presign struct {
// contains filtered or unexported fields
}
Presign holds presign operation flags and states.
type Reader ¶
Reader is a cancelable reader.
type RemoveBucket ¶
type RemoveBucket struct {
// contains filtered or unexported fields
}
RemoveBucket holds bucket deletion operation flags and states.
type Select ¶
type Select struct {
// contains filtered or unexported fields
}
Select holds select operation flags and states.
type Size ¶
type Size struct {
// contains filtered or unexported fields
}
Size holds disk usage (du) operation flags and states.
type SizeAndModificationStrategy ¶
type SizeAndModificationStrategy struct{}
SizeAndModificationStrategy determines to sync based on objects' both sizes and modification times. It treats source object as the source-of-truth;
time: src > dst size: src != dst should sync: yes time: src > dst size: src == dst should sync: yes time: src <= dst size: src != dst should sync: yes time: src <= dst size: src == dst should sync: no
func (*SizeAndModificationStrategy) ShouldSync ¶
func (sm *SizeAndModificationStrategy) ShouldSync(srcObj, dstObj *storage.Object) error
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.
type SizeOnlyStrategy ¶
type SizeOnlyStrategy struct{}
SizeOnlyStrategy determines to sync based on objects' file sizes.
func (*SizeOnlyStrategy) ShouldSync ¶
func (s *SizeOnlyStrategy) ShouldSync(srcObj, dstObj *storage.Object) error
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync holds sync operation flags and states.
type SyncStrategy ¶
SyncStrategy is the interface to make decision whether given source object should be synced to destination object
func NewStrategy ¶
func NewStrategy(sizeOnly bool) SyncStrategy