Documentation ¶
Index ¶
- type Auth
- type Config
- type ProgressReader
- type ResponseInit
- type Updater
- func (up *Updater) EqualHash(name string) bool
- func (up *Updater) EqualHashes(files map[string]*file.File) bool
- func (up *Updater) Get() error
- func (up *Updater) Init() error
- func (up *Updater) Updatable(files map[string]*file.File) (bool, error)
- func (up *Updater) UpdateFiles(files map[string]*file.File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type ProgressReader ¶
ProgressReader implements a io.Reader with a Read function that lets a callback report how much of the file was read
type ResponseInit ¶
ResponseInit holds a list of hashes from the server to be sent to the client so it can check if there is a new file or a changed file
type Updater ¶
type Updater struct { Server string Auth Auth RemoteHashes map[string]string LocalHashes map[string]string ToUpdate []string Workers int }
Updater sends files that should be update to the b0x server
func (*Updater) EqualHash ¶
EqualHash checks if a local file hash equals a remote file hash it returns false when a remote file hash isn't found (new files)
func (*Updater) EqualHashes ¶
EqualHashes builds the list of local hashes before checking if there is any that should be updated
Click to show internal directories.
Click to hide internal directories.