s3utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SlashSeparator = "/"

SlashSeparator - slash separator.

Variables

This section is empty.

Functions

func CheckAbortMultipartArgs

func CheckAbortMultipartArgs(ctx context.Context, bucket, object string) error

Checks for AbortMultipartUpload arguments validity, also validates if bucket exists.

func CheckCompleteMultipartArgs

func CheckCompleteMultipartArgs(ctx context.Context, bucket, object string) error

Checks for CompleteMultipartUpload arguments validity, also validates if bucket exists.

func CheckDelObjArgs

func CheckDelObjArgs(ctx context.Context, bucket, object string) error

Checks on DeleteObject arguments, bucket and object.

func CheckGetObjArgs

func CheckGetObjArgs(ctx context.Context, bucket, object string) error

Checks on GetObject arguments, bucket and object.

func CheckListMultipartArgs

func CheckListMultipartArgs(ctx context.Context, bucket, prefix, keyMarker, uploadIDMarker, delimiter string) error

Checks for all ListMultipartUploads arguments validity.

func CheckListObjsArgs

func CheckListObjsArgs(ctx context.Context, bucket, prefix, marker string) error

Checks for all ListObjects arguments validity.

func CheckListPartsArgs

func CheckListPartsArgs(ctx context.Context, bucket, object string) error

Checks for ListParts arguments validity, also validates if bucket exists.

func CheckNewMultipartArgs

func CheckNewMultipartArgs(ctx context.Context, bucket, object string) error

Checks for NewMultipartUpload arguments validity, also validates if bucket exists.

func CheckPutObjectArgs

func CheckPutObjectArgs(ctx context.Context, bucket, object string) error

Checks for PutObject arguments validity, also validates if bucket exists.

func CheckPutObjectPartArgs

func CheckPutObjectPartArgs(ctx context.Context, bucket, object string) error

Checks for PutObjectPart arguments validity, also validates if bucket exists.

func CheckValidBucketName

func CheckValidBucketName(bucketName string) (err error)

CheckValidBucketName - checks if we have a valid input bucket name.

func CheckValidBucketNameStrict

func CheckValidBucketNameStrict(bucketName string) (err error)

CheckValidBucketNameStrict - checks if we have a valid input bucket name. This is a stricter version. - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html

func IsValidObjectName

func IsValidObjectName(object string) bool

IsValidObjectName verifies an object name in accordance with Amazon's requirements. It cannot exceed 1024 characters and must be a valid UTF8 string.

See: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html

You should avoid the following characters in a key name because of significant special handling for consistency across all applications.

Rejects strings with following characters.

- Backslash ("\")

additionally minio does not support object names with trailing SlashSeparator.

func IsValidObjectPrefix

func IsValidObjectPrefix(object string) bool

IsValidObjectPrefix verifies whether the prefix is a valid object name. Its valid to have a empty prefix.

Types

type BucketNameInvalid

type BucketNameInvalid GenericError

BucketNameInvalid - bucketname provided is invalid.

func (BucketNameInvalid) Error

func (e BucketNameInvalid) Error() string

Error returns string an error formatted as the given text.

type GenericError

type GenericError struct {
	Bucket    string
	Object    string
	VersionID string
	Err       error
}

GenericError - generic object layer error.

type InvalidMarkerPrefixCombination

type InvalidMarkerPrefixCombination struct {
	Marker, Prefix string
}

InvalidMarkerPrefixCombination - invalid marker and prefix combination.

func (InvalidMarkerPrefixCombination) Error

type InvalidPart

type InvalidPart struct {
	PartNumber int
	ExpETag    string
	GotETag    string
}

InvalidPart One or more of the specified parts could not be found

func (InvalidPart) Error

func (e InvalidPart) Error() string

type InvalidUploadID

type InvalidUploadID struct {
	Bucket   string
	Object   string
	UploadID string
}

InvalidUploadID invalid upload id.

func (InvalidUploadID) Error

func (e InvalidUploadID) Error() string

type InvalidUploadIDKeyCombination

type InvalidUploadIDKeyCombination struct {
	UploadIDMarker, KeyMarker string
}

InvalidUploadIDKeyCombination - invalid upload id and key marker combination.

func (InvalidUploadIDKeyCombination) Error

type MalformedUploadID

type MalformedUploadID struct {
	UploadID string
}

MalformedUploadID malformed upload id.

func (MalformedUploadID) Error

func (e MalformedUploadID) Error() string

type ObjectNameInvalid

type ObjectNameInvalid GenericError

ObjectNameInvalid - object name provided is invalid.

func (ObjectNameInvalid) Error

func (e ObjectNameInvalid) Error() string

Error returns string an error formatted as the given text.

type ObjectNamePrefixAsSlash

type ObjectNamePrefixAsSlash GenericError

ObjectNamePrefixAsSlash - object name has a slash as prefix.

func (ObjectNamePrefixAsSlash) Error

func (e ObjectNamePrefixAsSlash) Error() string

Error returns string an error formatted as the given text.

type ObjectNameTooLong

type ObjectNameTooLong GenericError

ObjectNameTooLong - object name too long.

func (ObjectNameTooLong) Error

func (e ObjectNameTooLong) Error() string

Error returns string an error formatted as the given text.

type PartTooBig

type PartTooBig struct{}

PartTooBig returned if size of part is bigger than the allowed limit.

func (PartTooBig) Error

func (e PartTooBig) Error() string

type PartTooSmall

type PartTooSmall struct {
	PartSize   int64
	PartNumber int
	PartETag   string
}

PartTooSmall - error if part size is less than 5MB.

func (PartTooSmall) Error

func (e PartTooSmall) Error() string

Jump to

Keyboard shortcuts

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