Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct { SatelliteAddress string APIKey *macaroon.APIKey EncAccess *EncryptionAccess }
An Access Grant contains everything to access a project and specific buckets. It includes a potentially-restricted API Key, a potentially-restricted set of encryption information, and information about the Satellite responsible for the project's metadata.
func ParseAccess ¶
ParseAccess parses a serialized access grant string.
This should be the main way to instantiate an access grant for opening a project. See the note on RequestAccessWithPassphrase.
type EncryptionAccess ¶
type EncryptionAccess struct {
Store *encryption.Store
}
EncryptionAccess represents an encryption access context. It holds information about how various buckets and objects should be encrypted and decrypted.
func NewEncryptionAccess ¶
func NewEncryptionAccess() *EncryptionAccess
NewEncryptionAccess creates an encryption access context.
func NewEncryptionAccessWithDefaultKey ¶
func NewEncryptionAccessWithDefaultKey(defaultKey *storj.Key) *EncryptionAccess
NewEncryptionAccessWithDefaultKey creates an encryption access context with a default key set. Use (*Project).SaltedKeyFromPassphrase to generate a default key.
func (*EncryptionAccess) LimitTo ¶ added in v1.4.6
func (s *EncryptionAccess) LimitTo(apiKey *macaroon.APIKey)
LimitTo limits the data in the encryption access only to the paths that would be allowed by the api key. Any errors that happen due to the consistency of the api key cause no keys to be stored.
func (*EncryptionAccess) SetDefaultKey ¶
func (s *EncryptionAccess) SetDefaultKey(defaultKey *storj.Key)
SetDefaultKey sets the default key for the encryption access context. Use (*Project).SaltedKeyFromPassphrase to generate a default key.
func (*EncryptionAccess) SetDefaultPathCipher ¶
func (s *EncryptionAccess) SetDefaultPathCipher(defaultPathCipher storj.CipherSuite)
SetDefaultPathCipher sets which cipher suite to use by default.