Documentation
¶
Index ¶
- func BuildData(a *Data1) string
- func BuildData2(a *Data1) ([]byte, error)
- func DataFile2(file string, dat *Data1)
- func DownloadKV(cf *Account, dataKey string, filepath string) string
- func GetKVkeys(cf *Account)
- func GetMetadata(d Metadata) string
- func Md5file(in string) string
- func UploadKV(cf *Account, dat *Data1, filename string) bool
- func ValidateCF(cloud *Account) bool
- func ZipFile(filename string, zipname string)
- func ZipPipe(pr *io.PipeReader, pw *io.PipeWriter, filename string)
- type Account
- type ByHash
- type Data1
- type Metadata
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadKV ¶
implementation of the workers kv download
func GetMetadata ¶
func UploadKV ¶
implementation of the workers kv upload filename is a string with the drive location of a file to be uploaded
func ValidateCF ¶
validate that the preferences file has all the correct fields
func ZipPipe ¶
func ZipPipe(pr *io.PipeReader, pw *io.PipeWriter, filename string)
zips a file named filename to the provided pipes pr and pw
Types ¶
type Account ¶
type Account struct {
Account, Data, Email, Namespace, Key, Token, Location, Zip, Backup string
}
******* This struct contains the data needed to access the cloudflare infrastructure. It is stored on drive in the file preferences.toml *****
type ByHash ¶
type ByHash []Metadata
ByHash Implements sort.Interface for []Metadata based on the Hash field.
type Data1 ¶
type Data1 struct {
DataSize int64 //keeps track of the byte size of the uploads
Count int //keeps track of the number of uploads
CF_MAX_UPLOAD int //max number of files for upload
CF_MAX_DATA_UPLOAD int64 //max data uploaded at a time
CF_MAX_DATA_FILE int64 //max data per file
TheMetadata []Metadata
}
******* This struct contains the data tracking uploads***** Redo: Datasize will be size of files
remove hash, use only Metadata => add hash to Metadata
type Metadata ¶
type Metadata struct {
//f1o1 = file 1 of 1
//note: = notes
//modified timestamp
//permissions
//folder structure
//Metadata filename:
//
//Metadata example test.txt:f2o4:ph#:fh#:
FileNum, Notes, Permissions, Filepath, Hash string
FileName Stream
Atime time.Time
Size int64
}
this struct stores the Metadata that will be uploaded with each file