Documentation ¶
Index ¶
- Variables
- type BeginDeleteObjectParams
- type BeginDeleteSegmentParams
- type BeginObjectParams
- type BeginSegmentParams
- type Client
- func (client *Client) BeginDeleteObject(ctx context.Context, params BeginDeleteObjectParams) (_ storj.StreamID, err error)
- func (client *Client) BeginDeleteSegment(ctx context.Context, params BeginDeleteSegmentParams) (_ storj.SegmentID, limits []*pb.AddressedOrderLimit, err error)
- func (client *Client) BeginObject(ctx context.Context, params BeginObjectParams) (_ storj.StreamID, err error)
- func (client *Client) BeginSegment(ctx context.Context, params BeginSegmentParams) (_ storj.SegmentID, limits []*pb.AddressedOrderLimit, ...)
- func (client *Client) Close() error
- func (client *Client) CommitObject(ctx context.Context, streamID storj.StreamID) (err error)
- func (client *Client) CommitSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, ...) (savedPointer *pb.Pointer, err error)
- func (client *Client) CommitSegment2(ctx context.Context, params CommitSegmentParams) (err error)
- func (client *Client) CreateBucket(ctx context.Context, bucket storj.Bucket) (respBucket storj.Bucket, err error)
- func (client *Client) CreateSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, ...) (limits []*pb.AddressedOrderLimit, rootPieceID storj.PieceID, ...)
- func (client *Client) DeleteBucket(ctx context.Context, bucketName string) (err error)
- func (client *Client) DeleteSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (limits []*pb.AddressedOrderLimit, piecePrivateKey storj.PiecePrivateKey, ...)
- func (client *Client) DownloadSegment(ctx context.Context, params DownloadSegmentParams) (_ storj.SegmentDownloadInfo, _ []*pb.AddressedOrderLimit, err error)
- func (client *Client) FinishDeleteObject(ctx context.Context, streamID storj.StreamID) (err error)
- func (client *Client) FinishDeleteSegment(ctx context.Context, params FinishDeleteSegmentParams) (err error)
- func (client *Client) GetBucket(ctx context.Context, bucketName string) (respBucket storj.Bucket, err error)
- func (client *Client) GetObject(ctx context.Context, params GetObjectParams) (_ storj.Object, _ storj.StreamID, err error)
- func (client *Client) GetProjectInfo(ctx context.Context) (resp *pb.ProjectInfoResponse, err error)
- func (client *Client) ListBuckets(ctx context.Context, listOpts storj.BucketListOptions) (_ storj.BucketList, err error)
- func (client *Client) ListObjects(ctx context.Context, params ListObjectsParams) (_ []storj.ObjectListItem, more bool, err error)
- func (client *Client) ListSegments(ctx context.Context, bucket string, prefix, startAfter, endBefore storj.Path, ...) (items []ListItem, more bool, err error)
- func (client *Client) ListSegments2(ctx context.Context, params ListSegmentsParams) (_ []storj.SegmentListItem, more bool, err error)
- func (client *Client) MakeInlineSegment(ctx context.Context, params MakeInlineSegmentParams) (err error)
- func (client *Client) ReadSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (pointer *pb.Pointer, limits []*pb.AddressedOrderLimit, ...)
- func (client *Client) SegmentInfo(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (pointer *pb.Pointer, err error)
- func (client *Client) SetAttribution(ctx context.Context, bucket string, partnerID uuid.UUID) (err error)
- type CommitSegmentParams
- type DownloadSegmentParams
- type FinishDeleteSegmentParams
- type GetObjectParams
- type ListItem
- type ListObjectsParams
- type ListSegmentsParams
- type MakeInlineSegmentParams
Constants ¶
This section is empty.
Variables ¶
var ( // Error is the errs class of standard metainfo errors Error = errs.Class("metainfo error") )
Functions ¶
This section is empty.
Types ¶
type BeginDeleteObjectParams ¶ added in v0.16.0
BeginDeleteObjectParams parameters for BeginDeleteObject method
type BeginDeleteSegmentParams ¶ added in v0.16.0
type BeginDeleteSegmentParams struct { StreamID storj.StreamID Position storj.SegmentPosition }
BeginDeleteSegmentParams parameters for BeginDeleteSegment method
type BeginObjectParams ¶ added in v0.16.0
type BeginObjectParams struct { Bucket []byte EncryptedPath []byte Version int32 Redundancy storj.RedundancyScheme EncryptionParameters storj.EncryptionParameters ExpiresAt time.Time EncryptedMetadataNonce storj.Nonce EncryptedMetadata []byte }
BeginObjectParams parmaters for BeginObject method
type BeginSegmentParams ¶ added in v0.16.0
type BeginSegmentParams struct { StreamID storj.StreamID Position storj.SegmentPosition MaxOderLimit int64 }
BeginSegmentParams parameters for BeginSegment method
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client creates a grpcClient
func (*Client) BeginDeleteObject ¶ added in v0.16.0
func (client *Client) BeginDeleteObject(ctx context.Context, params BeginDeleteObjectParams) (_ storj.StreamID, err error)
BeginDeleteObject begins object deletion process
func (*Client) BeginDeleteSegment ¶ added in v0.16.0
func (client *Client) BeginDeleteSegment(ctx context.Context, params BeginDeleteSegmentParams) (_ storj.SegmentID, limits []*pb.AddressedOrderLimit, err error)
BeginDeleteSegment begins segment upload process
func (*Client) BeginObject ¶ added in v0.16.0
func (client *Client) BeginObject(ctx context.Context, params BeginObjectParams) (_ storj.StreamID, err error)
BeginObject begins object creation
func (*Client) BeginSegment ¶ added in v0.16.0
func (client *Client) BeginSegment(ctx context.Context, params BeginSegmentParams) (_ storj.SegmentID, limits []*pb.AddressedOrderLimit, piecePrivateKey storj.PiecePrivateKey, err error)
BeginSegment begins segment upload
func (*Client) CommitObject ¶ added in v0.16.0
CommitObject commits created object
func (*Client) CommitSegment ¶
func (client *Client) CommitSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, pointer *pb.Pointer, originalLimits []*pb.OrderLimit) (savedPointer *pb.Pointer, err error)
CommitSegment requests to store the pointer for the segment
func (*Client) CommitSegment2 ¶ added in v0.16.0
func (client *Client) CommitSegment2(ctx context.Context, params CommitSegmentParams) (err error)
CommitSegment2 commits segment after upload
func (*Client) CreateBucket ¶ added in v0.15.0
func (client *Client) CreateBucket(ctx context.Context, bucket storj.Bucket) (respBucket storj.Bucket, err error)
CreateBucket creates a new bucket
func (*Client) CreateSegment ¶
func (client *Client) CreateSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, redundancy *pb.RedundancyScheme, maxEncryptedSegmentSize int64, expiration time.Time) (limits []*pb.AddressedOrderLimit, rootPieceID storj.PieceID, piecePrivateKey storj.PiecePrivateKey, err error)
CreateSegment requests the order limits for creating a new segment
func (*Client) DeleteBucket ¶ added in v0.15.0
DeleteBucket deletes a bucket
func (*Client) DeleteSegment ¶
func (client *Client) DeleteSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (limits []*pb.AddressedOrderLimit, piecePrivateKey storj.PiecePrivateKey, err error)
DeleteSegment requests the order limits for deleting a segment
func (*Client) DownloadSegment ¶ added in v0.16.0
func (client *Client) DownloadSegment(ctx context.Context, params DownloadSegmentParams) (_ storj.SegmentDownloadInfo, _ []*pb.AddressedOrderLimit, err error)
DownloadSegment gets info for downloading remote segment or data from inline segment
func (*Client) FinishDeleteObject ¶ added in v0.16.0
FinishDeleteObject finishes object deletion process
func (*Client) FinishDeleteSegment ¶ added in v0.16.0
func (client *Client) FinishDeleteSegment(ctx context.Context, params FinishDeleteSegmentParams) (err error)
FinishDeleteSegment finishes segment upload process
func (*Client) GetBucket ¶ added in v0.15.0
func (client *Client) GetBucket(ctx context.Context, bucketName string) (respBucket storj.Bucket, err error)
GetBucket returns a bucket
func (*Client) GetObject ¶ added in v0.16.0
func (client *Client) GetObject(ctx context.Context, params GetObjectParams) (_ storj.Object, _ storj.StreamID, err error)
GetObject gets single object
func (*Client) GetProjectInfo ¶ added in v0.14.4
GetProjectInfo gets the ProjectInfo for the api key associated with the metainfo client.
func (*Client) ListBuckets ¶ added in v0.15.0
func (client *Client) ListBuckets(ctx context.Context, listOpts storj.BucketListOptions) (_ storj.BucketList, err error)
ListBuckets lists buckets
func (*Client) ListObjects ¶ added in v0.16.0
func (client *Client) ListObjects(ctx context.Context, params ListObjectsParams) (_ []storj.ObjectListItem, more bool, err error)
ListObjects lists objects according to specific parameters
func (*Client) ListSegments ¶
func (client *Client) ListSegments(ctx context.Context, bucket string, prefix, startAfter, endBefore storj.Path, recursive bool, limit int32, metaFlags uint32) (items []ListItem, more bool, err error)
ListSegments lists the available segments
func (*Client) ListSegments2 ¶ added in v0.16.0
func (client *Client) ListSegments2(ctx context.Context, params ListSegmentsParams) (_ []storj.SegmentListItem, more bool, err error)
ListSegments2 lists object segments
func (*Client) MakeInlineSegment ¶ added in v0.16.0
func (client *Client) MakeInlineSegment(ctx context.Context, params MakeInlineSegmentParams) (err error)
MakeInlineSegment commits segment after upload
func (*Client) ReadSegment ¶
func (client *Client) ReadSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (pointer *pb.Pointer, limits []*pb.AddressedOrderLimit, piecePrivateKey storj.PiecePrivateKey, err error)
ReadSegment requests the order limits for reading a segment
type CommitSegmentParams ¶ added in v0.16.0
type CommitSegmentParams struct { SegmentID storj.SegmentID EncryptedKeyNonce storj.Nonce EncryptedKey []byte SizeEncryptedData int64 // TODO find better way for this UploadResult []*pb.SegmentPieceUploadResult }
CommitSegmentParams parameters for CommitSegment method
type DownloadSegmentParams ¶ added in v0.16.0
type DownloadSegmentParams struct { StreamID storj.StreamID Position storj.SegmentPosition }
DownloadSegmentParams parameters for DownloadSegment method
type FinishDeleteSegmentParams ¶ added in v0.16.0
type FinishDeleteSegmentParams struct { SegmentID storj.SegmentID // TODO find better way to pass this DeleteResults []*pb.SegmentPieceDeleteResult }
FinishDeleteSegmentParams parameters for FinishDeleteSegment method
type GetObjectParams ¶ added in v0.16.0
GetObjectParams parameters for GetObject method
type ListObjectsParams ¶ added in v0.16.0
type ListObjectsParams struct { Bucket []byte EncryptedPrefix []byte EncryptedCursor []byte Limit int32 IncludeMetadata bool }
ListObjectsParams parameters for ListObjects method
type ListSegmentsParams ¶ added in v0.16.0
type ListSegmentsParams struct { StreamID storj.StreamID CursorPosition storj.SegmentPosition Limit int32 }
ListSegmentsParams parameters for ListSegment method
type MakeInlineSegmentParams ¶ added in v0.16.0
type MakeInlineSegmentParams struct { StreamID storj.StreamID Position storj.SegmentPosition EncryptedKeyNonce storj.Nonce EncryptedKey []byte EncryptedInlineData []byte }
MakeInlineSegmentParams parameters for MakeInlineSegment method