Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ADD - addition detected ADD = 1 // REMOVE - removal detected REMOVE = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Profile string
Region string
Bucket string
BucketRootPath string
FileRootPath string
}
Config - sync configuration
type FileRef ¶
type FileRef struct {
// contains filtered or unexported fields
}
FileRef - reference to a file could be local or remote
type FileRefCollection ¶
type FileRefCollection []FileRef
FileRefCollection - a list of file refs
func (*FileRefCollection) GetReader ¶
func (c *FileRefCollection) GetReader() *bytes.Reader
GetReader -
type LocalStore ¶
type LocalStore struct {
// contains filtered or unexported fields
}
LocalStore -
func NewLocalStore ¶
func NewLocalStore(config Config) (*LocalStore, error)
NewLocalStore - create a new store
func (*LocalStore) List ¶
func (store *LocalStore) List() (FileRefCollection, error)
List - list the local files and their hashes
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store - s3 store
func (*S3Store) List ¶
func (store *S3Store) List() (FileRefCollection, error)
List - list all files
func (*S3Store) UploadFileIndex ¶
func (store *S3Store) UploadFileIndex(f FileRefCollection) error
UploadFileIndex - the file index
type Store ¶
type Store interface {
List() (FileRefCollection, error)
Upload(wg *sync.WaitGroup, file FileRef) error
Delete(wg *sync.WaitGroup, file FileRef) error
UploadFileIndex(FileRefCollection) error
}
Store - a place to store the site files
type Summary ¶
type Summary struct {
FilesRemoved int `json:"filesRemoved"`
FilesAdded int `json:"filesAdded"`
FilesTotal int `json:"filesTotal"`
RenderDuration time.Duration `json:"renderDuration"`
ChangesDetectedDuration time.Duration `json:"changesDetectedDuration"`
UploadDuration time.Duration `json:"uploadDuration"`
ErrorCount int `json:"errorCount"`
Logs []string `json:"logs"`
}
Summary of the sync process
Click to show internal directories.
Click to hide internal directories.