Documentation ¶
Index ¶
- Variables
- func CloseProject(uplink *uplink.Uplink, proj *uplink.Project, bucket *uplink.Bucket)
- func ConnectStorjReadDownloadData(downloadConfigStorj DownloadConfigStorj, readFile *bytes.Reader, ...) error
- func ConnectUpload(ctx context.Context, bucket *uplink.Bucket, data []byte, databaseName string, ...) ([]string, bool)
- func Debug(bucket *uplink.Bucket, metaFileName string, configStorj ConfigStorj, ...)
- type ConfigStorj
- type DownloadConfigStorj
Constants ¶
This section is empty.
Variables ¶
var DEBUG = false
DEBUG allows more detailed working to be exposed through the terminal.
Functions ¶
func CloseProject ¶
CloseProject closes bucket, project and uplink.
func ConnectStorjReadDownloadData ¶
func ConnectStorjReadDownloadData(downloadConfigStorj DownloadConfigStorj, readFile *bytes.Reader, keyValue string) error
ConnectStorjReadDownloadData function downloads data from Storj
Types ¶
type ConfigStorj ¶
type ConfigStorj struct { APIKey string `json:"apiKey"` Satellite string `json:"satelliteURL"` Bucket string `json:"bucketName"` UploadPath string `json:"uploadPath"` EncryptionPassphrase string `json:"encryptionPassphrase"` SerializedScope string `json:"serializedScope"` Key string `json:"key"` DisallowReads string `json:"disallowReads"` DisallowWrites string `json:"disallowWrites"` DisallowDeletes string `json:"disallowDeletes"` }
ConfigStorj depicts keys to search for within the stroj_config.json file.
func ConnectStorjReadUploadData ¶
func ConnectStorjReadUploadData(fullFileName string, keyValue string, restrict string) (context.Context, *uplink.Uplink, *uplink.Project, *uplink.Bucket, ConfigStorj, string, error)
ConnectStorjReadUploadData reads Storj configuration from given file, connects to the desired Storj network. It then reads data property from an external file.
func LoadStorjConfiguration ¶
func LoadStorjConfiguration(fullFileName string) (ConfigStorj, error)
LoadStorjConfiguration reads and parses the JSON file that contain Storj configuration information.
type DownloadConfigStorj ¶
type DownloadConfigStorj struct { HostName string `json:"hostName"` Port string `json:"port"` FileHash string `json:"shareableHash"` DownloadPath string `json:"downloadPath"` APIKey string `json:"apiKey"` SatelliteURL string `json:"satelliteURL"` EncryptionPassphrase string `json:"encryptionPassphrase"` SerializedScope string `json:"serializedScope"` Key string `json:"key"` }
DownloadConfigStorj structure to store data from json file
func DownloadStorjConfiguration ¶
func DownloadStorjConfiguration(fullFileName string) (DownloadConfigStorj, error)
DownloadStorjConfiguration reads and parses the JSON file that contain Storj configuration information.