gw

package
v1.90.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrAccessGrant occurs when failing to parse the access grant from the
	// request.
	ErrAccessGrant = errs.Class("access grant")

	// ErrAccessKeyEmpty occurs when no access key could be found in the request.
	ErrAccessKeyEmpty = miniogo.ErrorResponse{
		Code:       "AccessKeyEmpty",
		StatusCode: http.StatusUnauthorized,
		Message:    "Access key is empty.",
	}
)

Functions

This section is empty.

Types

type BucketWithAttributionInfo

type BucketWithAttributionInfo struct {
	Name        string
	Created     time.Time
	Attribution string
}

BucketWithAttributionInfo represents a bucket with attribution metadata.

type MultiTenancyLayer

type MultiTenancyLayer struct {
	minio.GatewayUnsupported
	// contains filtered or unexported fields
}

MultiTenancyLayer implements multi-tenant minio.ObjectLayer that logs responses.

func NewMultiTenantLayer

func NewMultiTenantLayer(gateway minio.Gateway, satelliteConnectionPool *rpcpool.Pool, connectionPool *rpcpool.Pool, config UplinkConfig, insecureLogAll bool) (*MultiTenancyLayer, error)

NewMultiTenantLayer initializes and returns new MultiTenancyLayer. A properly closed object layer will also close connectionPool.

func (*MultiTenancyLayer) AbortMultipartUpload

func (l *MultiTenancyLayer) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string, opts minio.ObjectOptions) error

AbortMultipartUpload is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).AbortMultipartUpload.

func (*MultiTenancyLayer) CompleteMultipartUpload

func (l *MultiTenancyLayer) CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, uploadedParts []minio.CompletePart, opts minio.ObjectOptions) (objInfo minio.ObjectInfo, err error)

CompleteMultipartUpload is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).CompleteMultipartUpload.

func (*MultiTenancyLayer) CopyObject

func (l *MultiTenancyLayer) CopyObject(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, srcInfo minio.ObjectInfo, srcOpts, destOpts minio.ObjectOptions) (objInfo minio.ObjectInfo, err error)

CopyObject is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).CopyObject.

func (*MultiTenancyLayer) DeleteBucket

func (l *MultiTenancyLayer) DeleteBucket(ctx context.Context, bucket string, forceDelete bool) error

DeleteBucket is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).DeleteBucket.

func (*MultiTenancyLayer) DeleteObject

func (l *MultiTenancyLayer) DeleteObject(ctx context.Context, bucket, object string, opts minio.ObjectOptions) (objInfo minio.ObjectInfo, err error)

DeleteObject is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).DeleteObject.

func (*MultiTenancyLayer) DeleteObjectTags

func (l *MultiTenancyLayer) DeleteObjectTags(ctx context.Context, bucketName, objectPath string, opts minio.ObjectOptions) (minio.ObjectInfo, error)

DeleteObjectTags is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).DeleteObjectTags.

func (*MultiTenancyLayer) DeleteObjects

func (l *MultiTenancyLayer) DeleteObjects(ctx context.Context, bucket string, objects []minio.ObjectToDelete, opts minio.ObjectOptions) (deleted []minio.DeletedObject, errors []error)

DeleteObjects is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).DeleteObjects.

func (*MultiTenancyLayer) GetBucketInfo

func (l *MultiTenancyLayer) GetBucketInfo(ctx context.Context, bucket string) (bucketInfo minio.BucketInfo, err error)

GetBucketInfo is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetBucketInfo.

func (*MultiTenancyLayer) GetBucketLocation

func (l *MultiTenancyLayer) GetBucketLocation(ctx context.Context, bucketName string) (location string, err error)

GetBucketLocation is meant to be used for S3's https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html and responds with the location that the bucket's placement is annotated with (if any) on the satellite and any error encountered.

func (*MultiTenancyLayer) GetBucketVersioning added in v1.68.0

func (l *MultiTenancyLayer) GetBucketVersioning(ctx context.Context, bucket string) (versioning *versioning.Versioning, err error)

GetBucketVersioning retrieves versioning configuration of a bucket.

func (*MultiTenancyLayer) GetMultipartInfo

func (l *MultiTenancyLayer) GetMultipartInfo(ctx context.Context, bucket string, object string, uploadID string, opts minio.ObjectOptions) (info minio.MultipartInfo, err error)

GetMultipartInfo is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetMultipartInfo.

func (*MultiTenancyLayer) GetObjectInfo

func (l *MultiTenancyLayer) GetObjectInfo(ctx context.Context, bucket, object string, opts minio.ObjectOptions) (objInfo minio.ObjectInfo, err error)

GetObjectInfo is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetObjectInfo.

func (*MultiTenancyLayer) GetObjectLegalHold added in v1.87.0

func (l *MultiTenancyLayer) GetObjectLegalHold(ctx context.Context, bucket, object, version string) (_ *objectlock.ObjectLegalHold, err error)

GetObjectLegalHold is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetObjectLegalHold.

func (*MultiTenancyLayer) GetObjectLockConfig added in v1.85.0

func (l *MultiTenancyLayer) GetObjectLockConfig(ctx context.Context, bucket string) (objectLockConfig *objectlock.Config, err error)

GetObjectLockConfig is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetObjectLockConfig.

func (*MultiTenancyLayer) GetObjectNInfo

func (l *MultiTenancyLayer) GetObjectNInfo(ctx context.Context, bucket, object string, rs *minio.HTTPRangeSpec, h http.Header, lockType minio.LockType, opts minio.ObjectOptions) (reader *minio.GetObjectReader, err error)

GetObjectNInfo is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetObjectNInfo.

func (*MultiTenancyLayer) GetObjectRetention added in v1.85.1

func (l *MultiTenancyLayer) GetObjectRetention(ctx context.Context, bucket, object, version string) (_ *objectlock.ObjectRetention, err error)

GetObjectRetention is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetObjectRetention.

func (*MultiTenancyLayer) GetObjectTags

func (l *MultiTenancyLayer) GetObjectTags(ctx context.Context, bucketName, objectPath string, opts minio.ObjectOptions) (t *tags.Tags, err error)

GetObjectTags is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).GetObjectTags.

func (*MultiTenancyLayer) IsTaggingSupported

func (l *MultiTenancyLayer) IsTaggingSupported() bool

IsTaggingSupported is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).IsTaggingSupported.

func (*MultiTenancyLayer) ListBuckets

func (l *MultiTenancyLayer) ListBuckets(ctx context.Context) (buckets []minio.BucketInfo, err error)

ListBuckets is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).ListBuckets.

func (*MultiTenancyLayer) ListBucketsWithAttribution

func (l *MultiTenancyLayer) ListBucketsWithAttribution(ctx context.Context) (buckets []BucketWithAttributionInfo, err error)

ListBucketsWithAttribution is like ListBuckets, but it associates information about attribution (if any) with each bucket.

func (*MultiTenancyLayer) ListMultipartUploads

func (l *MultiTenancyLayer) ListMultipartUploads(ctx context.Context, bucket, prefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (result minio.ListMultipartsInfo, err error)

ListMultipartUploads is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).ListMultipartUploads.

func (*MultiTenancyLayer) ListObjectParts

func (l *MultiTenancyLayer) ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker int, maxParts int, opts minio.ObjectOptions) (result minio.ListPartsInfo, err error)

ListObjectParts is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).ListObjectParts.

func (*MultiTenancyLayer) ListObjectVersions added in v1.68.0

func (l *MultiTenancyLayer) ListObjectVersions(ctx context.Context, bucket, prefix, marker, versionMarker, delimiter string, maxKeys int) (result minio.ListObjectVersionsInfo, err error)

ListObjectVersions returns information about all versions of the objects in a bucket.

func (*MultiTenancyLayer) ListObjects

func (l *MultiTenancyLayer) ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (result minio.ListObjectsInfo, err error)

ListObjects is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).ListObjects.

func (*MultiTenancyLayer) ListObjectsV2

func (l *MultiTenancyLayer) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result minio.ListObjectsV2Info, err error)

ListObjectsV2 is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).ListObjectsV2.

func (*MultiTenancyLayer) MakeBucketWithLocation

func (l *MultiTenancyLayer) MakeBucketWithLocation(ctx context.Context, bucket string, opts minio.BucketOptions) error

MakeBucketWithLocation is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).MakeBucketWithLocation.

func (*MultiTenancyLayer) NewMultipartUpload

func (l *MultiTenancyLayer) NewMultipartUpload(ctx context.Context, bucket, object string, opts minio.ObjectOptions) (uploadID string, err error)

NewMultipartUpload is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).NewMultipartUpload.

func (*MultiTenancyLayer) PutObject

func (l *MultiTenancyLayer) PutObject(ctx context.Context, bucket, object string, data *minio.PutObjReader, opts minio.ObjectOptions) (objInfo minio.ObjectInfo, err error)

PutObject is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).PutObject.

func (*MultiTenancyLayer) PutObjectPart

func (l *MultiTenancyLayer) PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *minio.PutObjReader, opts minio.ObjectOptions) (info minio.PartInfo, err error)

PutObjectPart is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).PutObjectPart.

func (*MultiTenancyLayer) PutObjectTags

func (l *MultiTenancyLayer) PutObjectTags(ctx context.Context, bucketName, objectPath string, tags string, opts minio.ObjectOptions) (minio.ObjectInfo, error)

PutObjectTags is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).PutObjectTags.

func (*MultiTenancyLayer) SetBucketVersioning added in v1.68.0

func (l *MultiTenancyLayer) SetBucketVersioning(ctx context.Context, bucket string, v *versioning.Versioning) error

SetBucketVersioning enables versioning on a bucket.

func (*MultiTenancyLayer) SetObjectLegalHold added in v1.87.0

func (l *MultiTenancyLayer) SetObjectLegalHold(ctx context.Context, bucket, object, version string, lh *objectlock.ObjectLegalHold) (err error)

SetObjectLegalHold is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).SetObjectLegalHold.

func (*MultiTenancyLayer) SetObjectLockConfig added in v1.88.1

func (l *MultiTenancyLayer) SetObjectLockConfig(ctx context.Context, bucket string, config *objectlock.Config) (err error)

SetObjectLockConfig is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).SetObjectLockConfig.

func (*MultiTenancyLayer) SetObjectRetention added in v1.85.1

func (l *MultiTenancyLayer) SetObjectRetention(ctx context.Context, bucket, object, version string, r minio.ObjectOptions) (err error)

SetObjectRetention is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).SetObjectRetention.

func (*MultiTenancyLayer) Shutdown

func (l *MultiTenancyLayer) Shutdown(ctx context.Context) error

Shutdown is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).Shutdown.

func (*MultiTenancyLayer) StorageInfo

func (l *MultiTenancyLayer) StorageInfo(ctx context.Context) (minio.StorageInfo, []error)

StorageInfo is a multi-tenant wrapping of storj.io/gateway.(*gatewayLayer).StorageInfo.

type UplinkConfig

type UplinkConfig struct {
	Base    uplink.Config
	Uploads UploadConfig
}

UplinkConfig holds a configuration for libuplink that controls how to talk to the rest of the network and adjacent settings.

type UploadConfig

type UploadConfig struct {
	PieceHashAlgorithmBlake3 bool
	RefactoredCodePath       bool
}

UploadConfig holds the configuration for libuplink specific to uploads.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL