src

package
v0.0.0-...-8083537 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: ISC Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckS3Unlocked

func CheckS3Unlocked(config *Config, lockPath string, sess *session.Session) (bool, error)

func NewDirectoryIterator

func NewDirectoryIterator(bucket, dir string) s3manager.BatchUploadIterator

NewDirectoryIterator builds a new DirectoryIterator

Types

type Command

type Command interface {
	Help() string
	Run(config *Config, args []string) error
}

type CommandCommit

type CommandCommit struct{}

func (*CommandCommit) Help

func (this *CommandCommit) Help() string

func (*CommandCommit) Run

func (this *CommandCommit) Run(config *Config, args []string) error

type CommandHelp

type CommandHelp struct {
	Commands map[string]Command
}

func (*CommandHelp) Help

func (this *CommandHelp) Help() string

func (*CommandHelp) Run

func (this *CommandHelp) Run(config *Config, args []string) error

type CommandLock

type CommandLock struct{}

func (*CommandLock) Help

func (this *CommandLock) Help() string

func (*CommandLock) Run

func (this *CommandLock) Run(config *Config, args []string) error

type CommandUnlock

type CommandUnlock struct{}

func (*CommandUnlock) Help

func (this *CommandUnlock) Help() string

func (*CommandUnlock) Run

func (this *CommandUnlock) Run(config *Config, args []string) error

type Config

type Config struct {
	Directory   string
	Expires     uint64
	RetriesWait uint64
	S3AccessKey string
	S3Bucket    string
	S3Region    string
	S3SecretKey string
	Timeout     uint64
}

func (*Config) SetExpires

func (this *Config) SetExpires(value uint64) error

func (*Config) SetRetriesWait

func (this *Config) SetRetriesWait(value uint64) error

func (*Config) SetS3AccessKey

func (this *Config) SetS3AccessKey(value string) error

func (*Config) SetS3Bucket

func (this *Config) SetS3Bucket(value string) error

func (*Config) SetS3Region

func (this *Config) SetS3Region(value string) error

func (*Config) SetS3SecretKey

func (this *Config) SetS3SecretKey(value string) error

func (*Config) SetTimeout

func (this *Config) SetTimeout(value uint64) error

type DirectoryIterator

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

DirectoryIterator represents an iterator of a specified directory

func (*DirectoryIterator) Err

func (di *DirectoryIterator) Err() error

Err returns error of DirectoryIterator

func (*DirectoryIterator) Next

func (di *DirectoryIterator) Next() bool

Next returns whether next file exists or not

func (*DirectoryIterator) UploadObject

func (di *DirectoryIterator) UploadObject() s3manager.BatchUploadObject

UploadObject uploads a file

Jump to

Keyboard shortcuts

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