Documentation ¶
Index ¶
- func ConnectToLocalDisk(configLocalFile ConfigLocalFile) *os.File
- func ConnectToStorj(configStorj ConfigStorj, accesskey bool) (*uplink.Access, *uplink.Project)
- func Execute()
- func ShareAccess(access *uplink.Access, configStorj ConfigStorj)
- func UploadData(project *uplink.Project, configStorj ConfigStorj, uploadFileName string, ...)
- type ConfigLocalFile
- type ConfigStorj
- type Metric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToLocalDisk ¶
func ConnectToLocalDisk(configLocalFile ConfigLocalFile) *os.File
ConnectToLocalDisk takes the configuration object as argument and returns the reader of the source file to be uploaded. ****Modify the Function to connect to the required source instance
and return the file(s) or reader of the file****
func ConnectToStorj ¶
ConnectToStorj reads Storj configuration from given file and connects to the desired Storj network. It then reads data property from an external file.
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ShareAccess ¶
func ShareAccess(access *uplink.Access, configStorj ConfigStorj)
ShareAccess generates and prints the shareable serialized access as per the restrictions provided by the user.
func UploadData ¶
func UploadData(project *uplink.Project, configStorj ConfigStorj, uploadFileName string, fileReader *os.File)
UploadData uploads the backup file to storj network.
Types ¶
type ConfigLocalFile ¶
type ConfigLocalFile struct {
Path string `json:"path"`
}
ConfigLocalFile stores the local file path. ****Change this strcuture to store the configurations and credentials
of whatever the source being used****
func LoadLocalProperty ¶
func LoadLocalProperty(fullFileName string) ConfigLocalFile
LoadLocalProperty reads and parses the configuration JSON file that contains a local file path and returns it embedded in a configuration object. ****Change the Function name and add print statements as per the required configurations****
type ConfigStorj ¶
type ConfigStorj struct { APIKey string `json:"apikey"` Satellite string `json:"satellite"` Bucket string `json:"bucket"` UploadPath string `json:"uploadPath"` EncryptionPassphrase string `json:"encryptionpassphrase"` SerializedAccess string `json:"serializedAccess"` AllowDownload string `json:"allowDownload"` AllowUpload string `json:"allowUpload"` AllowList string `json:"allowList"` AllowDelete string `json:"allowDelete"` NotBefore string `json:"notBefore"` NotAfter string `json:"notAfter"` }
ConfigStorj depicts keys to search for within the stroj_config.json file.
func LoadStorjConfiguration ¶
func LoadStorjConfiguration(fullFileName string) ConfigStorj
LoadStorjConfiguration reads and parses the JSON file that contain Storj configuration information.
type Metric ¶ added in v1.4.5
type Metric struct { Function string `json:"Function"` StartHeap uint64 `json:"StartHeap"` StartStack uint64 `json:"StartStack"` EndHeap uint64 `json:"EndHeap"` EndStack uint64 `json:"EndStack"` StartTime int64 `json:"StartTime"` EndTime int64 `json:"EndTime"` }
Metric represents basic execution metric