Documentation ¶
Index ¶
- Variables
- func LoadEncryptionKey(filepath string) (key *storj.Key, error error)
- func SaveEncryptionKey(inputKey string, filepath string) error
- type ClientConfig
- type Config
- func (c Config) GetEncryptionScheme() storj.EncryptionScheme
- func (c Config) GetMetainfo(ctx context.Context, identity *identity.FullIdentity) (db storj.Metainfo, ss streams.Store, err error)
- func (c Config) GetPathCipherSuite() storj.CipherSuite
- func (c Config) GetRedundancyScheme() storj.RedundancyScheme
- func (c Config) GetSegmentSize() memory.Size
- type EncryptionConfig
- type RSConfig
Constants ¶
This section is empty.
Variables ¶
var ( // Error is the errs class of standard End User Client errors Error = errs.Class("Uplink configuration error") )
Functions ¶
func LoadEncryptionKey ¶ added in v0.12.0
LoadEncryptionKey loads the encryption key stored in the file pointed by filepath.
An error is file is not found or there is an I/O error.
func SaveEncryptionKey ¶ added in v0.13.0
SaveEncryptionKey generates a Storj key from the inputKey and save it into a new file created in filepath.
Types ¶
type ClientConfig ¶
type ClientConfig struct { APIKey string `default:"" help:"the api key to use for the satellite" noprefix:"true"` SatelliteAddr string `releaseDefault:"127.0.0.1:7777" devDefault:"127.0.0.1:10000" help:"the address to use for the satellite" noprefix:"true"` MaxInlineSize memory.Size `help:"max inline segment size in bytes" default:"4KiB"` SegmentSize memory.Size `help:"the size of a segment in bytes" default:"64MiB"` RequestTimeout time.Duration `help:"timeout for request" default:"0h0m20s"` DialTimeout time.Duration `help:"timeout for dials" default:"0h0m20s"` }
ClientConfig is a configuration struct for the uplink that controls how to talk to the rest of the network.
type Config ¶
type Config struct { Client ClientConfig RS RSConfig Enc EncryptionConfig TLS tlsopts.Config }
Config uplink configuration
func (Config) GetEncryptionScheme ¶
func (c Config) GetEncryptionScheme() storj.EncryptionScheme
GetEncryptionScheme returns the configured encryption scheme for new uploads
func (Config) GetMetainfo ¶
func (c Config) GetMetainfo(ctx context.Context, identity *identity.FullIdentity) (db storj.Metainfo, ss streams.Store, err error)
GetMetainfo returns an implementation of storj.Metainfo
func (Config) GetPathCipherSuite ¶ added in v0.13.0
func (c Config) GetPathCipherSuite() storj.CipherSuite
GetPathCipherSuite returns the cipher suite used for path encryption for bucket objects
func (Config) GetRedundancyScheme ¶
func (c Config) GetRedundancyScheme() storj.RedundancyScheme
GetRedundancyScheme returns the configured redundancy scheme for new uploads
func (Config) GetSegmentSize ¶ added in v0.13.0
GetSegmentSize returns the segment size set in uplink config
type EncryptionConfig ¶
type EncryptionConfig struct { EncryptionKey string `help:"the root key for encrypting the data which will be stored in KeyFilePath" setup:"true"` KeyFilepath string `help:"the path to the file which contains the root key for encrypting the data"` DataType int `help:"Type of encryption to use for content and metadata (1=AES-GCM, 2=SecretBox)" default:"1"` PathType int `help:"Type of encryption to use for paths (0=Unencrypted, 1=AES-GCM, 2=SecretBox)" default:"1"` }
EncryptionConfig is a configuration struct that keeps details about encrypting segments
type RSConfig ¶
type RSConfig struct { MaxBufferMem memory.Size `help:"maximum buffer memory (in bytes) to be allocated for read buffers" default:"4MiB"` MinThreshold int `help:"the minimum pieces required to recover a segment. k." releaseDefault:"29" devDefault:"4"` RepairThreshold int `help:"the minimum safe pieces before a repair is triggered. m." releaseDefault:"35" devDefault:"6"` SuccessThreshold int `help:"the desired total pieces for a segment. o." releaseDefault:"80" devDefault:"8"` MaxThreshold int `help:"the largest amount of pieces to encode to. n." releaseDefault:"130" devDefault:"10"` }
RSConfig is a configuration struct that keeps details about default redundancy strategy information