Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CTimeGetter ¶
CTimeGetter defines the interface required to get the change time from a FileInfo object.
type Checksum ¶
type Checksum uint32
Checksum defines a CRC32 checksum as an unsigned 32-bit integer.
type File ¶
type File struct { Key string LocalPath string Checksum Checksum CTime time.Time Bucket string ETag string Version string }
File encapsulates all information associated with a file.
type KeyGenerator ¶
type KeyGenerator interface {
GenerateKey() string
}
KeyGenerator defines the interface required to generate a random key.
type Option ¶
type Option func(*Processor)
Option is the type used to implement the functional options pattern for the Processor type.
func WithCTimeGetter ¶
func WithCTimeGetter(ctg CTimeGetter) Option
WithCTimeGetter returns an option for setting the way in which a Processor gets the ctime from a FileInfo object.
func WithKeyGenerator ¶
func WithKeyGenerator(kg KeyGenerator) Option
WithKeyGenerator returns an option for setting the way in which a Processor generates a key for a new file.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor encapsulates the logic required to create a file and store it in the file store.