Documentation ¶
Index ¶
- func DecryptStreamInfo(ctx context.Context, streamMetaBytes []byte, path storj.Path, ...) (streamInfo []byte, streamMeta pb.StreamMeta, err error)
- func EncryptAfterBucket(ctx context.Context, path storj.Path, cipher storj.Cipher, key *storj.Key) (encrypted storj.Path, err error)
- func TypedDecryptStreamInfo(ctx context.Context, streamMetaBytes []byte, path Path, ...) (streamInfo []byte, streamMeta pb.StreamMeta, err error)
- type EOFReader
- type ListItem
- type Meta
- type Path
- type SizeReader
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptStreamInfo ¶
func DecryptStreamInfo(ctx context.Context, streamMetaBytes []byte, path storj.Path, rootKey *storj.Key) ( streamInfo []byte, streamMeta pb.StreamMeta, err error)
DecryptStreamInfo decrypts stream info. This is a legacy function that should no longer be needed after the typed path refactoring.
func EncryptAfterBucket ¶
func EncryptAfterBucket(ctx context.Context, path storj.Path, cipher storj.Cipher, key *storj.Key) (encrypted storj.Path, err error)
EncryptAfterBucket encrypts a path without encrypting its first element. This is a legacy function that should no longer be needed after the typed path refactoring.
func TypedDecryptStreamInfo ¶ added in v0.14.2
func TypedDecryptStreamInfo(ctx context.Context, streamMetaBytes []byte, path Path, encStore *encryption.Store) ( streamInfo []byte, streamMeta pb.StreamMeta, err error)
TypedDecryptStreamInfo decrypts stream info
Types ¶
type EOFReader ¶
type EOFReader struct {
// contains filtered or unexported fields
}
EOFReader holds reader and status of EOF
func NewEOFReader ¶
NewEOFReader keeps track of the state, has the internal reader reached EOF
type Path ¶ added in v0.14.2
type Path struct {
// contains filtered or unexported fields
}
Path is a representation of an object path within a bucket
func CreatePath ¶ added in v0.14.2
func CreatePath(bucket string, unencPath paths.Unencrypted) (path Path)
CreatePath will create a Path for the provided information.
func (Path) UnencryptedPath ¶ added in v0.14.2
func (p Path) UnencryptedPath() paths.Unencrypted
UnencryptedPath returns the unencrypted path part of the path.
type SizeReader ¶
type SizeReader struct {
// contains filtered or unexported fields
}
SizeReader holds reader and size read so far
func NewSizeReader ¶
func NewSizeReader(r io.Reader) *SizeReader
NewSizeReader keeps track of how much bytes are read from the reader
func (*SizeReader) Size ¶
func (r *SizeReader) Size() int64
Size returns the number of bytes read so far
type Store ¶
type Store interface { Meta(ctx context.Context, path storj.Path, pathCipher storj.Cipher) (Meta, error) Get(ctx context.Context, path storj.Path, pathCipher storj.Cipher) (ranger.Ranger, Meta, error) Put(ctx context.Context, path storj.Path, pathCipher storj.Cipher, data io.Reader, metadata []byte, expiration time.Time) (Meta, error) Delete(ctx context.Context, path storj.Path, pathCipher storj.Cipher) error List(ctx context.Context, prefix, startAfter, endBefore storj.Path, pathCipher storj.Cipher, recursive bool, limit int, metaFlags uint32) (items []ListItem, more bool, err error) }
Store interface methods for streams to satisfy to be a store