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 NewCatCommand() *cli.Command
- func NewCopyCommand() *cli.Command
- func NewCopyCommandFlags() []cli.Flag
- func NewDeleteCommand() *cli.Command
- func NewListCommand() *cli.Command
- func NewMakeBucketCommand() *cli.Command
- func NewMoveCommand() *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 Cat
- type Copy
- type Delete
- type EnumValue
- type List
- type ListMessage
- type MakeBucket
- type ObjectPair
- 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 NewCatCommand ¶
func NewCatCommand() *cli.Command
func NewCopyCommand ¶
func NewCopyCommand() *cli.Command
func NewCopyCommandFlags ¶
func NewCopyCommandFlags() []cli.Flag
func NewDeleteCommand ¶
func NewDeleteCommand() *cli.Command
func NewListCommand ¶
func NewListCommand() *cli.Command
func NewMakeBucketCommand ¶
func NewMakeBucketCommand() *cli.Command
func NewMoveCommand ¶
func NewMoveCommand() *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 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 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 ObjectPair ¶
type ObjectPair struct {
// contains filtered or unexported fields
}
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