minio-srv: github.com/pydio/minio-srv/cmd Index | Files | Directories

package cmd

import "github.com/pydio/minio-srv/cmd"

Package cmd This file implements helper functions to validate AWS Signature Version '4' authorization header.

This package provides comprehensive helpers for following signature types. - Based on Authorization header. - Based on Query parameters. - Based on Form POST policy.

Package cmd This file implements helper functions to validate Streaming AWS Signature Version '4' authorization header.

Index

Package Files

acl-handlers.go admin-handlers.go admin-heal-ops.go admin-router.go admin-rpc-client.go admin-rpc-server.go api-datatypes.go api-errors.go api-headers.go api-resources.go api-response-multipart.go api-response.go api-router.go auth-handler.go bitrot.go bool-flag.go bucket-handlers-listobjects.go bucket-handlers.go bucket-notification-handlers.go bucket-policy-handlers.go build-constants.go certs.go common-main.go config-common.go config-current.go config-dir.go config-migrate.go config-public.go config-versions.go config.go copy-part-range.go crossdomain-xml-handler.go disk-cache-config.go disk-cache-fs.go disk-cache.go disk-usage.go dynamic-timeouts.go encryption-v1.go endpoint-ellipses.go endpoint.go erasure-decode.go erasure-encode.go erasure-heal.go erasure-utils.go erasure.go fallocate_linux.go format-disk-cache.go format-fs.go format-meta.go format-xl.go fs-v1-helpers.go fs-v1-metadata.go fs-v1-multipart.go fs-v1-rwpool.go fs-v1.go gateway-common.go gateway-main.go gateway-new-pydio.go gateway-pydio-auth-handler.go gateway-pydio-iamsys.go gateway-pydio-policy.go gateway-router.go gateway-startup-msg.go gateway-unsupported.go generic-handlers.go globals.go handler-utils.go hasher.go healthcheck-handler.go healthcheck-router.go http-stats.go httprange.go iam.go jwt.go local-admin-client.go local-locker.go lock-rpc-client.go lock-rpc-server-common.go lock-rpc-server.go lock-stat.go main.go metrics-router.go metrics.go namespace-lock.go net.go notification.go object-api-common.go object-api-datatypes.go object-api-errors.go object-api-input-checks.go object-api-interface.go object-api-utils.go object-handlers-common.go object-handlers.go os-reliable.go peer-rpc-client-target.go peer-rpc-client.go peer-rpc-server.go policy.go posix-dirent-ino.go posix-errors.go posix-list-dir_unix.go posix.go postpolicyform.go prepare-storage.go retry.go routers.go rpc.go server-main.go server-rlimit.go server-startup-msg.go service.go setup-type.go signals.go signature-v2.go signature-v4-parser.go signature-v4-utils.go signature-v4.go storage-class.go storage-datatypes.go storage-errors.go storage-interface.go storage-rest-client.go storage-rest-common.go storage-rest-server.go streaming-signature-v4.go sts-errors.go sts-handlers.go tree-walk-pool.go tree-walk.go typed-errors.go ui-errors-utils.go ui-errors.go update-main.go update-notifier.go utils.go version-main.go web-handlers.go web-router.go xl-sets.go xl-v1-bucket.go xl-v1-common.go xl-v1-errors.go xl-v1-healing-common.go xl-v1-healing.go xl-v1-list-objects-heal.go xl-v1-list-objects.go xl-v1-metadata.go xl-v1-multipart.go xl-v1-object.go xl-v1-utils.go xl-v1.go

Constants

const (
    // SSECustomerKeySize is the size of valid client provided encryption keys in bytes.
    // Currently AWS supports only AES256. So the SSE-C key size is fixed to 32 bytes.
    SSECustomerKeySize = 32

    // SSEIVSize is the size of the IV data
    SSEIVSize = 32 // 32 bytes

)
const (
    // SSESealAlgorithmDareSha256 specifies DARE as authenticated en/decryption scheme and SHA256 as cryptographic
    // hash function. The key derivation of DARE-SHA256 is not optimal and does not include the object path.
    // It is considered legacy and should not be used anymore.
    SSESealAlgorithmDareSha256 = "DARE-SHA256"

    // SSESealAlgorithmDareV2HmacSha256 specifies DAREv2 as authenticated en/decryption scheme and SHA256 as cryptographic
    // hash function for the HMAC PRF.
    SSESealAlgorithmDareV2HmacSha256 = "DAREv2-HMAC-SHA256"
)
const (
    DefaultBitrotAlgorithm = HighwayHash256
)

DefaultBitrotAlgorithm is the default algorithm used for bitrot protection.

const DefaultSkewTime = 15 * time.Minute

DefaultSkewTime - skew time is 15 minutes between minio peers.

const GatewayMinioSysTmp = "minio.sys.tmp/"

GatewayMinioSysTmp prefix is used in Azure/GCS gateway for save metadata sent by Initialize Multipart Upload API.

const MaxJitter = 1.0

MaxJitter will randomize over the full exponential backoff time

const NoJitter = 0.0

NoJitter disables the use of jitter for randomizing the exponential backoff time

const ReservedMetadataPrefix = "X-Minio-Internal-"

ReservedMetadataPrefix is the prefix of a metadata key which is reserved and for internal use only.

const TLSPrivateKeyPassword = "MINIO_CERT_PASSWD"

TLSPrivateKeyPassword is the environment variable which contains the password used to decrypt the TLS private key. It must be set if the TLS private key is password protected.

Variables

var (
    // GOPATH - GOPATH value at the time of build.
    GOPATH = ""

    // GOROOT - GOROOT value at the time of build.
    GOROOT = ""

    // Version - version time.RFC3339.
    Version = goGetTag
    // ReleaseTag - release tag in TAG.%Y-%m-%dT%H-%M-%SZ.
    ReleaseTag = goGetTag
    // CommitID - latest commit id.
    CommitID = goGetTag
    // ShortCommitID - first 12 characters from CommitID.
    ShortCommitID = CommitID[:12]
)

DO NOT EDIT THIS FILE DIRECTLY. These are build-time constants set through ‘buildscripts/gen-ldflags.go’.

var (
    // CanonicalizeETag provides canonicalizeETag function alias.
    CanonicalizeETag = canonicalizeETag

    // MustGetUUID function alias.
    MustGetUUID = mustGetUUID
)

func AnonErrToObjectErr Uses

func AnonErrToObjectErr(statusCode int, params ...string) error

AnonErrToObjectErr - converts standard http codes into meaningful object layer errors.

func BucketAccessPolicyToPolicy Uses

func BucketAccessPolicyToPolicy(policyInfo *miniogopolicy.BucketAccessPolicy) (*policy.Policy, error)

BucketAccessPolicyToPolicy - converts minio-go/policy.BucketAccessPolicy to policy.Policy.

func CheckLocalServerAddr Uses

func CheckLocalServerAddr(serverAddr string) error

CheckLocalServerAddr - checks if serverAddr is valid and local host.

func CloseResponse Uses

func CloseResponse(respBody io.ReadCloser)

CloseResponse close non nil response with any response Body. convenient wrapper to drain any remaining data on response body.

Subsequently this allows golang http RoundTripper to re-use the same connection for future requests.

func CreateEmptyMinioConfig Uses

func CreateEmptyMinioConfig() *serverConfigV19

func CreateEndpoints Uses

func CreateEndpoints(serverAddr string, args ...[]string) (string, EndpointList, SetupType, error)

CreateEndpoints - validates and creates new endpoints for given args.

func DecryptAllBlocksCopyRequest Uses

func DecryptAllBlocksCopyRequest(client io.Writer, r *http.Request, bucket, object string, objInfo ObjectInfo) (io.WriteCloser, int64, error)

DecryptAllBlocksCopyRequest - setup a struct which can decrypt many concatenated encrypted data parts information helps to know the boundaries of each encrypted data block, this function decrypts all parts starting from part-1.

func DecryptBlocksRequest Uses

func DecryptBlocksRequest(client io.Writer, r *http.Request, bucket, object string, startOffset, length int64, objInfo ObjectInfo, copySource bool) (io.WriteCloser, int64, int64, error)

DecryptBlocksRequest - setup a struct which can decrypt many concatenated encrypted data parts information helps to know the boundaries of each encrypted data block.

func DecryptBlocksRequestR Uses

func DecryptBlocksRequestR(inputReader io.Reader, h http.Header, offset,
    length int64, seqNumber uint32, partStart int, oi ObjectInfo, copySource bool) (
    io.Reader, error)

DecryptBlocksRequestR - same as DecryptBlocksRequest but with a reader

func DecryptCopyRequest Uses

func DecryptCopyRequest(client io.Writer, r *http.Request, bucket, object string, metadata map[string]string) (io.WriteCloser, error)

DecryptCopyRequest decrypts the object with the client provided key. It also removes the client-side-encryption metadata from the object and sets the correct headers.

func DecryptCopyRequestR Uses

func DecryptCopyRequestR(client io.Reader, h http.Header, bucket, object string, seqNumber uint32, metadata map[string]string) (io.Reader, error)

DecryptCopyRequestR - same as DecryptCopyRequest, but with a Reader

func DecryptObjectInfo Uses

func DecryptObjectInfo(info ObjectInfo, headers http.Header) (encrypted bool, err error)

DecryptObjectInfo tries to decrypt the provided object if it is encrypted. It fails if the object is encrypted and the HTTP headers don't contain SSE-C headers or the object is not encrypted but SSE-C headers are provided. (AWS behavior) DecryptObjectInfo returns 'ErrNone' if the object is not encrypted or the decryption succeeded.

DecryptObjectInfo also returns whether the object is encrypted or not.

func DecryptRequest Uses

func DecryptRequest(client io.Writer, r *http.Request, bucket, object string, metadata map[string]string) (io.WriteCloser, error)

DecryptRequest decrypts the object with client provided key for SSE-C and SSE-S3. It also removes the encryption metadata from the object and sets the correct headers.

func DecryptRequestWithSequenceNumber Uses

func DecryptRequestWithSequenceNumber(client io.Writer, r *http.Request, bucket, object string, seqNumber uint32, metadata map[string]string) (io.WriteCloser, error)

DecryptRequestWithSequenceNumber decrypts the object with the client provided key. It also removes the client-side-encryption metadata from the object and sets the correct headers.

func DecryptRequestWithSequenceNumberR Uses

func DecryptRequestWithSequenceNumberR(client io.Reader, h http.Header, bucket, object string, seqNumber uint32, metadata map[string]string) (io.Reader, error)

DecryptRequestWithSequenceNumberR - same as DecryptRequestWithSequenceNumber but with a reader

func DownloadReleaseData Uses

func DownloadReleaseData(timeout time.Duration, mode string) (data string, err error)

DownloadReleaseData - downloads release data from minio official server.

func EncryptRequest Uses

func EncryptRequest(content io.Reader, r *http.Request, bucket, object string, metadata map[string]string) (io.Reader, error)

EncryptRequest takes the client provided content and encrypts the data with the client provided key. It also marks the object as client-side-encrypted and sets the correct headers.

func ErrorRespToObjectError Uses

func ErrorRespToObjectError(err error, params ...string) error

ErrorRespToObjectError converts Minio errors to minio object layer errors.

func Fallocate Uses

func Fallocate(fd int, offset int64, len int64) error

Fallocate uses the linux Fallocate syscall, which helps us to be sure that subsequent writes on a file just created will not fail, in addition, file allocation will be contigous on the disk

func FromMinioClientMetadata Uses

func FromMinioClientMetadata(metadata map[string][]string) map[string]string

FromMinioClientMetadata converts minio metadata to map[string]string

func GenETag Uses

func GenETag() string

GenETag - generate UUID based ETag

func GetCurrentReleaseTime Uses

func GetCurrentReleaseTime() (releaseTime time.Time, err error)

GetCurrentReleaseTime - returns this process's release time. If it is official minio version, parsed version is returned else minio binary's mod time is returned.

func GetLocalPeer Uses

func GetLocalPeer(endpoints EndpointList) (localPeer string)

GetLocalPeer - returns local peer value, returns globalMinioAddr for FS and Erasure mode. In case of distributed server return the first element from the set of peers which indicate that they are local. There is always one entry that is local even with repeated server endpoints.

func GetRemotePeers Uses

func GetRemotePeers(endpoints EndpointList) []string

GetRemotePeers - get hosts information other than this minio service.

func GetVersion Uses

func GetVersion(configFile string) (string, error)

GetVersion gets config version from backend

func IsBOSH Uses

func IsBOSH() bool

IsBOSH returns true if minio is deployed from a bosh package

func IsDCOS Uses

func IsDCOS() bool

IsDCOS returns true if minio is running in DCOS.

func IsDocker Uses

func IsDocker() bool

IsDocker - returns if the environment minio is running in docker or not. The check is a simple file existence check.

https://github.com/moby/moby/blob/master/daemon/initlayer/setup_unix.go#L25

"/.dockerenv":      "file",

func IsErr Uses

func IsErr(err error, errs ...error) bool

IsErr returns whether given error is exact error.

func IsErrIgnored Uses

func IsErrIgnored(err error, ignoredErrs ...error) bool

IsErrIgnored returns whether given error is ignored or not.

func IsKubernetes Uses

func IsKubernetes() bool

IsKubernetes returns true if minio is running in kubernetes.

func IsSourceBuild Uses

func IsSourceBuild() bool

IsSourceBuild - returns if this binary is a non-official build from source code.

func IsValidBucketName Uses

func IsValidBucketName(bucket string) bool

IsValidBucketName verifies that a bucket name is in accordance with Amazon's requirements (i.e. DNS naming conventions). It must be 3-63 characters long, and it must be a sequence of one or more labels separated by periods. Each label can contain lowercase ascii letters, decimal digits and hyphens, but must not begin or end with a hyphen. See: http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

func IsValidObjectName Uses

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 "/".

func IsValidObjectPrefix Uses

func IsValidObjectPrefix(object string) bool

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

func LivenessCheckHandler Uses

func LivenessCheckHandler(w http.ResponseWriter, r *http.Request)

LivenessCheckHandler -- checks if server can reach its disks internally. If not, server is considered to have failed and needs to be restarted. Liveness probes are used to detect situations where application (minio) has gone into a state where it can not recover except by being restarted.

func Load Uses

func Load(configFile string, data interface{}) (quick.Config, error)

Load config from backend

func Main Uses

func Main(args []string)

Main main for minio server.

func NewAdminRPCServer Uses

func NewAdminRPCServer() (*xrpc.Server, error)

NewAdminRPCServer - returns new admin RPC server.

func NewCustomHTTPTransport Uses

func NewCustomHTTPTransport() *http.Transport

NewCustomHTTPTransport returns a new http configuration used while communicating with the cloud backends. This sets the value for MaxIdleConnsPerHost from 2 (go default) to 100.

func NewLockRPCServer Uses

func NewLockRPCServer() (*xrpc.Server, error)

NewLockRPCServer - returns new lock RPC server.

func NewPeerRPCServer Uses

func NewPeerRPCServer() (*xrpc.Server, error)

NewPeerRPCServer - returns new peer RPC server.

func ParseGatewayEndpoint Uses

func ParseGatewayEndpoint(arg string) (endPoint string, secure bool, err error)

ParseGatewayEndpoint - Return endpoint.

func ParseSSECopyCustomerRequest Uses

func ParseSSECopyCustomerRequest(h http.Header, metadata map[string]string) (key []byte, err error)

ParseSSECopyCustomerRequest parses the SSE-C header fields of the provided request. It returns the client provided key on success.

func ParseSSECustomerHeader Uses

func ParseSSECustomerHeader(header http.Header) (key []byte, err error)

ParseSSECustomerHeader parses the SSE-C header fields and returns the client provided key on success.

func ParseSSECustomerRequest Uses

func ParseSSECustomerRequest(r *http.Request) (key []byte, err error)

ParseSSECustomerRequest parses the SSE-C header fields of the provided request. It returns the client provided key on success.

func PolicyToBucketAccessPolicy Uses

func PolicyToBucketAccessPolicy(bucketPolicy *policy.Policy) (*miniogopolicy.BucketAccessPolicy, error)

PolicyToBucketAccessPolicy - converts policy.Policy to minio-go/policy.BucketAccessPolicy.

func ReadinessCheckHandler Uses

func ReadinessCheckHandler(w http.ResponseWriter, r *http.Request)

ReadinessCheckHandler -- checks if there are more than threshold number of goroutines running, returns service unavailable. Readiness probes are used to detect situations where application is under heavy load and temporarily unable to serve. In a orchestrated setup like Kubernetes, containers reporting that they are not ready do not receive traffic through Kubernetes Services.

func RegisterGatewayCommand Uses

func RegisterGatewayCommand(cmd cli.Command) error

RegisterGatewayCommand registers a new command for gateway.

func RemoveListener Uses

func RemoveListener(objAPI ObjectLayer, bucketName string, targetID event.TargetID, addr xnet.Host) error

RemoveListener - removes HTTP client currently listening for events from listener.json.

func Save Uses

func Save(configFile string, data interface{}) error

Save config file to corresponding backend

func SaveListener Uses

func SaveListener(objAPI ObjectLayer, bucketName string, eventNames []event.Name, pattern string, targetID event.TargetID, addr xnet.Host) error

SaveListener - saves HTTP client currently listening for events to listener.json.

func StartGateway Uses

func StartGateway(ctx *cli.Context, gw Gateway, masterPydioGateway ...bool)

StartGateway - handler for 'minio gateway <name>'.

func StartPydioGateway Uses

func StartPydioGateway(ctx context.Context, gw Gateway, gatewayAddr string, accessKey string, secretKey string, log logger.PydioLogger, certFile string, certKey string)

func StorageReader Uses

func StorageReader(storage StorageAPI, volume, path string, offset int64) io.Reader

StorageReader returns a new io.Reader which reads data to the file at the given disk, volume, path and offset.

func StorageWriter Uses

func StorageWriter(storage StorageAPI, volume, path string) io.Writer

StorageWriter returns a new io.Writer which appends data to the file at the given disk, volume and path.

func ToMinioClientCompletePart Uses

func ToMinioClientCompletePart(part CompletePart) minio.CompletePart

ToMinioClientCompletePart converts CompletePart to minio CompletePart

func ToMinioClientCompleteParts Uses

func ToMinioClientCompleteParts(parts []CompletePart) []minio.CompletePart

ToMinioClientCompleteParts converts []CompletePart to minio []CompletePart

func ToMinioClientMetadata Uses

func ToMinioClientMetadata(metadata map[string]string) map[string]string

ToMinioClientMetadata converts metadata to map[string]string

func ToMinioClientObjectInfoMetadata Uses

func ToMinioClientObjectInfoMetadata(metadata map[string]string) map[string][]string

ToMinioClientObjectInfoMetadata convertes metadata to map[string][]string

func ToS3ETag Uses

func ToS3ETag(etag string) string

ToS3ETag - return checksum to ETag

func UTCNow Uses

func UTCNow() time.Time

UTCNow - returns current UTC time.

func ValidateGatewayArguments Uses

func ValidateGatewayArguments(serverAddr, endpointAddr string) error

ValidateGatewayArguments - Validate gateway arguments.

type APIError Uses

type APIError struct {
    Code           string
    Description    string
    HTTPStatusCode int
}

APIError structure

type APIErrorCode Uses

type APIErrorCode int

APIErrorCode type of error status.

const (
    ErrNone APIErrorCode = iota
    ErrAccessDenied
    ErrBadDigest
    ErrEntityTooSmall
    ErrEntityTooLarge
    ErrIncompleteBody
    ErrInternalError
    ErrInvalidAccessKeyID
    ErrInvalidBucketName
    ErrInvalidDigest
    ErrInvalidRange
    ErrInvalidCopyPartRange
    ErrInvalidCopyPartRangeSource
    ErrInvalidMaxKeys
    ErrInvalidMaxUploads
    ErrInvalidMaxParts
    ErrInvalidPartNumberMarker
    ErrInvalidRequestBody
    ErrInvalidCopySource
    ErrInvalidMetadataDirective
    ErrInvalidCopyDest
    ErrInvalidPolicyDocument
    ErrInvalidObjectState
    ErrMalformedXML
    ErrMissingContentLength
    ErrMissingContentMD5
    ErrMissingRequestBodyError
    ErrNoSuchBucket
    ErrNoSuchBucketPolicy
    ErrNoSuchKey
    ErrNoSuchUpload
    ErrNotImplemented
    ErrPreconditionFailed
    ErrRequestTimeTooSkewed
    ErrSignatureDoesNotMatch
    ErrMethodNotAllowed
    ErrInvalidPart
    ErrInvalidPartOrder
    ErrAuthorizationHeaderMalformed
    ErrMalformedPOSTRequest
    ErrPOSTFileRequired
    ErrSignatureVersionNotSupported
    ErrBucketNotEmpty
    ErrAllAccessDisabled
    ErrMalformedPolicy
    ErrMissingFields
    ErrMissingCredTag
    ErrCredMalformed
    ErrInvalidRegion
    ErrInvalidService
    ErrInvalidRequestVersion
    ErrMissingSignTag
    ErrMissingSignHeadersTag
    ErrPolicyAlreadyExpired
    ErrMalformedDate
    ErrMalformedPresignedDate
    ErrMalformedCredentialDate
    ErrMalformedCredentialRegion
    ErrMalformedExpires
    ErrNegativeExpires
    ErrAuthHeaderEmpty
    ErrExpiredPresignRequest
    ErrRequestNotReadyYet
    ErrUnsignedHeaders
    ErrMissingDateHeader
    ErrInvalidQuerySignatureAlgo
    ErrInvalidQueryParams
    ErrBucketAlreadyOwnedByYou
    ErrInvalidDuration
    ErrBucketAlreadyExists
    ErrMetadataTooLarge
    ErrUnsupportedMetadata
    ErrMaximumExpires
    ErrSlowDown
    ErrInvalidPrefixMarker
    ErrBadRequest

    // SSE-S3 related API errors
    ErrInvalidEncryptionMethod

    // Server-Side-Encryption (with Customer provided key) related API errors.
    ErrInsecureSSECustomerRequest
    ErrSSEMultipartEncrypted
    ErrSSEEncryptedObject
    ErrInvalidEncryptionParameters
    ErrInvalidSSECustomerAlgorithm
    ErrInvalidSSECustomerKey
    ErrMissingSSECustomerKey
    ErrMissingSSECustomerKeyMD5
    ErrSSECustomerKeyMD5Mismatch
    ErrInvalidSSECustomerParameters
    ErrIncompatibleEncryptionMethod
    ErrKMSNotConfigured
    ErrKMSAuthFailure

    ErrNoAccessKey
    ErrInvalidToken

    // Bucket notification related errors.
    ErrEventNotification
    ErrARNNotification
    ErrRegionNotification
    ErrOverlappingFilterNotification
    ErrFilterNameInvalid
    ErrFilterNamePrefix
    ErrFilterNameSuffix
    ErrFilterValueInvalid
    ErrOverlappingConfigs
    ErrUnsupportedNotification

    // S3 extended errors.
    ErrContentSHA256Mismatch

    // Minio extended errors.
    ErrReadQuorum
    ErrWriteQuorum
    ErrStorageFull
    ErrRequestBodyParse
    ErrObjectExistsAsDirectory
    ErrPolicyNesting
    ErrInvalidObjectName
    ErrInvalidResourceName
    ErrServerNotInitialized
    ErrOperationTimedOut
    ErrInvalidRequest
    // Minio storage class error codes
    ErrInvalidStorageClass
    ErrBackendDown

    ErrMalformedJSON
    ErrAdminNoSuchUser
    ErrAdminNoSuchPolicy
    ErrAdminInvalidArgument
    ErrAdminInvalidAccessKey
    ErrAdminInvalidSecretKey
    ErrAdminConfigNoQuorum
    ErrAdminConfigTooLarge
    ErrAdminConfigBadJSON
    ErrAdminConfigDuplicateKeys
    ErrAdminCredentialsMismatch
    ErrInsecureClientRequest
    ErrObjectTampered

    ErrHealNotImplemented
    ErrHealNoSuchProcess
    ErrHealInvalidClientToken
    ErrHealMissingBucket
    ErrHealAlreadyRunning
    ErrHealOverlappingPaths
    ErrIncorrectContinuationToken

    //S3 Select Errors
    ErrEmptyRequestBody
    ErrUnsupportedFunction
    ErrInvalidExpressionType
    ErrBusy
    ErrUnauthorizedAccess
    ErrExpressionTooLong
    ErrIllegalSQLFunctionArgument
    ErrInvalidKeyPath
    ErrInvalidCompressionFormat
    ErrInvalidFileHeaderInfo
    ErrInvalidJSONType
    ErrInvalidQuoteFields
    ErrInvalidRequestParameter
    ErrInvalidDataType
    ErrInvalidTextEncoding
    ErrInvalidDataSource
    ErrInvalidTableAlias
    ErrMissingRequiredParameter
    ErrObjectSerializationConflict
    ErrUnsupportedSQLOperation
    ErrUnsupportedSQLStructure
    ErrUnsupportedSyntax
    ErrUnsupportedRangeHeader
    ErrLexerInvalidChar
    ErrLexerInvalidOperator
    ErrLexerInvalidLiteral
    ErrLexerInvalidIONLiteral
    ErrParseExpectedDatePart
    ErrParseExpectedKeyword
    ErrParseExpectedTokenType
    ErrParseExpected2TokenTypes
    ErrParseExpectedNumber
    ErrParseExpectedRightParenBuiltinFunctionCall
    ErrParseExpectedTypeName
    ErrParseExpectedWhenClause
    ErrParseUnsupportedToken
    ErrParseUnsupportedLiteralsGroupBy
    ErrParseExpectedMember
    ErrParseUnsupportedSelect
    ErrParseUnsupportedCase
    ErrParseUnsupportedCaseClause
    ErrParseUnsupportedAlias
    ErrParseUnsupportedSyntax
    ErrParseUnknownOperator
    ErrParseMissingIdentAfterAt
    ErrParseUnexpectedOperator
    ErrParseUnexpectedTerm
    ErrParseUnexpectedToken
    ErrParseUnexpectedKeyword
    ErrParseExpectedExpression
    ErrParseExpectedLeftParenAfterCast
    ErrParseExpectedLeftParenValueConstructor
    ErrParseExpectedLeftParenBuiltinFunctionCall
    ErrParseExpectedArgumentDelimiter
    ErrParseCastArity
    ErrParseInvalidTypeParam
    ErrParseEmptySelect
    ErrParseSelectMissingFrom
    ErrParseExpectedIdentForGroupName
    ErrParseExpectedIdentForAlias
    ErrParseUnsupportedCallWithStar
    ErrParseNonUnaryAgregateFunctionCall
    ErrParseMalformedJoin
    ErrParseExpectedIdentForAt
    ErrParseAsteriskIsNotAloneInSelectList
    ErrParseCannotMixSqbAndWildcardInSelectList
    ErrParseInvalidContextForWildcardInSelectList
    ErrIncorrectSQLFunctionArgumentType
    ErrValueParseFailure
    ErrEvaluatorInvalidArguments
    ErrIntegerOverflow
    ErrLikeInvalidInputs
    ErrCastFailed
    ErrInvalidCast
    ErrEvaluatorInvalidTimestampFormatPattern
    ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing
    ErrEvaluatorTimestampFormatPatternDuplicateFields
    ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch
    ErrEvaluatorUnterminatedTimestampFormatPatternToken
    ErrEvaluatorInvalidTimestampFormatPatternToken
    ErrEvaluatorInvalidTimestampFormatPatternSymbol
    ErrEvaluatorBindingDoesNotExist
    ErrMissingHeaders
    ErrAdminConfigNotificationTargetsFailed
    ErrAdminProfilerNotEnabled
    ErrInvalidDecompressedSize
)

Error codes, non exhaustive list - http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

func DecryptCopyObjectInfo Uses

func DecryptCopyObjectInfo(info *ObjectInfo, headers http.Header) (apiErr APIErrorCode, encrypted bool)

DecryptCopyObjectInfo tries to decrypt the provided object if it is encrypted. It fails if the object is encrypted and the HTTP headers don't contain SSE-C headers or the object is not encrypted but SSE-C headers are provided. (AWS behavior) DecryptObjectInfo returns 'ErrNone' if the object is not encrypted or the decryption succeeded.

DecryptCopyObjectInfo also returns whether the object is encrypted or not.

type APIErrorResponse Uses

type APIErrorResponse struct {
    XMLName    xml.Name `xml:"Error" json:"-"`
    Code       string
    Message    string
    Key        string `xml:"Key,omitempty" json:"Key,omitempty"`
    BucketName string `xml:"BucketName,omitempty" json:"BucketName,omitempty"`
    Resource   string
    RequestID  string `xml:"RequestId" json:"RequestId"`
    HostID     string `xml:"HostId" json:"HostId"`
}

APIErrorResponse - error response format

type AdminRPCClient Uses

type AdminRPCClient struct {
    *RPCClient
}

AdminRPCClient - admin RPC client talks to admin RPC server.

func NewAdminRPCClient Uses

func NewAdminRPCClient(host *xnet.Host) (*AdminRPCClient, error)

NewAdminRPCClient - returns new admin RPC client.

func (*AdminRPCClient) DownloadProfilingData Uses

func (rpcClient *AdminRPCClient) DownloadProfilingData() ([]byte, error)

DownloadProfilingData - returns profiling data of the remote server.

func (*AdminRPCClient) GetConfig Uses

func (rpcClient *AdminRPCClient) GetConfig() ([]byte, error)

GetConfig - returns config.json of the remote server.

func (*AdminRPCClient) ReInitFormat Uses

func (rpcClient *AdminRPCClient) ReInitFormat(dryRun bool) error

ReInitFormat - re-initialize disk format, remotely.

func (*AdminRPCClient) ServerInfo Uses

func (rpcClient *AdminRPCClient) ServerInfo() (sid ServerInfoData, err error)

ServerInfo - returns the server info of the server to which the RPC call is made.

func (*AdminRPCClient) SignalService Uses

func (rpcClient *AdminRPCClient) SignalService(signal serviceSignal) (err error)

SignalService - calls SignalService RPC.

func (*AdminRPCClient) StartProfiling Uses

func (rpcClient *AdminRPCClient) StartProfiling(profiler string) error

StartProfiling - starts profiling in the remote server.

type AllAccessDisabled Uses

type AllAccessDisabled GenericError

AllAccessDisabled All access to this object has been disabled

func (AllAccessDisabled) Error Uses

func (e AllAccessDisabled) Error() string

Return string an error formatted as the given text.

type AssumeRoleWithClientGrantsResponse Uses

type AssumeRoleWithClientGrantsResponse struct {
    XMLName          xml.Name           `xml:"https://sts.amazonaws.com/doc/2011-06-15/ AssumeRoleWithClientGrantsResponse" json:"-"`
    Result           ClientGrantsResult `xml:"AssumeRoleWithClientGrantsResult"`
    ResponseMetadata struct {
        RequestID string `xml:"RequestId,omitempty"`
    }   `xml:"ResponseMetadata,omitempty"`
}

AssumeRoleWithClientGrantsResponse contains the result of successful AssumeRoleWithClientGrants request.

type AssumedRoleUser Uses

type AssumedRoleUser struct {
    // The ARN of the temporary security credentials that are returned from the
    // AssumeRole action. For more information about ARNs and how to use them in
    // policies, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
    // in Using IAM.
    //
    // Arn is a required field
    Arn string

    // A unique identifier that contains the role ID and the role session name of
    // the role that is being assumed. The role ID is generated by AWS when the
    // role is created.
    //
    // AssumedRoleId is a required field
    AssumedRoleID string `xml:"AssumeRoleId"`
}

AssumedRoleUser - The identifiers for the temporary security credentials that the operation returns. Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumedRoleUser

type AuthArgs Uses

type AuthArgs struct {
    Token       string
    RPCVersion  RPCVersion
    RequestTime time.Time
}

AuthArgs - base argument for any RPC call for authentication.

func (AuthArgs) Authenticate Uses

func (args AuthArgs) Authenticate() error

Authenticate - checks if given arguments are valid to allow RPC call. This is xrpc.Authenticator and is called in RPC server.

func (*AuthArgs) SetAuthArgs Uses

func (args *AuthArgs) SetAuthArgs(authArgs AuthArgs)

SetAuthArgs - sets given authentication arguments to this args. This is called in RPC client.

type BackendDown Uses

type BackendDown struct{}

BackendDown is returned for network errors or if the gateway's backend is down.

func (BackendDown) Error Uses

func (e BackendDown) Error() string

type BackendType Uses

type BackendType int

BackendType - represents different backend types.

const (
    Unknown BackendType = iota
    // Filesystem backend.
    BackendFS
    // Multi disk BackendErasure (single, distributed) backend.
    BackendErasure
)

Enum for different backend types.

type BitrotAlgorithm Uses

type BitrotAlgorithm uint

BitrotAlgorithm specifies a algorithm used for bitrot protection.

const (
    // SHA256 represents the SHA-256 hash function
    SHA256 BitrotAlgorithm = 1 + iota
    // HighwayHash256 represents the HighwayHash-256 hash function
    HighwayHash256
    // BLAKE2b512 represents the BLAKE2b-512 hash function
    BLAKE2b512
)

func BitrotAlgorithmFromString Uses

func BitrotAlgorithmFromString(s string) (a BitrotAlgorithm)

BitrotAlgorithmFromString returns a bitrot algorithm from the given string representation. It returns 0 if the string representation does not match any supported algorithm. The zero value of a bitrot algorithm is never supported.

func (BitrotAlgorithm) Available Uses

func (a BitrotAlgorithm) Available() bool

Available reports whether the given algorithm is available.

func (BitrotAlgorithm) New Uses

func (a BitrotAlgorithm) New() hash.Hash

New returns a new hash.Hash calculating the given bitrot algorithm.

func (BitrotAlgorithm) String Uses

func (a BitrotAlgorithm) String() string

String returns the string identifier for a given bitrot algorithm. If the algorithm is not supported String panics.

type BitrotVerifier Uses

type BitrotVerifier struct {
    // contains filtered or unexported fields
}

BitrotVerifier can be used to verify protected data.

func NewBitrotVerifier Uses

func NewBitrotVerifier(algorithm BitrotAlgorithm, checksum []byte) *BitrotVerifier

NewBitrotVerifier returns a new BitrotVerifier implementing the given algorithm.

type BoolFlag Uses

type BoolFlag bool

BoolFlag - wrapper bool type.

func ParseBoolFlag Uses

func ParseBoolFlag(s string) (bf BoolFlag, err error)

ParseBoolFlag - parses string into BoolFlag.

func (BoolFlag) MarshalJSON Uses

func (bf BoolFlag) MarshalJSON() ([]byte, error)

MarshalJSON - converts BoolFlag into JSON data.

func (BoolFlag) String Uses

func (bf BoolFlag) String() string

String - returns string of BoolFlag.

func (*BoolFlag) UnmarshalJSON Uses

func (bf *BoolFlag) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON - parses given data into BoolFlag.

type Bucket Uses

type Bucket struct {
    Name         string
    CreationDate string // time string of format "2006-01-02T15:04:05.000Z"
}

Bucket container for bucket metadata

type BucketAccessPolicy Uses

type BucketAccessPolicy struct {
    Bucket string                     `json:"bucket"`
    Prefix string                     `json:"prefix"`
    Policy miniogopolicy.BucketPolicy `json:"policy"`
}

BucketAccessPolicy - Collection of canned bucket policy at a given prefix.

type BucketAlreadyExists Uses

type BucketAlreadyExists GenericError

BucketAlreadyExists the requested bucket name is not available.

func (BucketAlreadyExists) Error Uses

func (e BucketAlreadyExists) Error() string

type BucketAlreadyOwnedByYou Uses

type BucketAlreadyOwnedByYou GenericError

BucketAlreadyOwnedByYou already owned by you.

func (BucketAlreadyOwnedByYou) Error Uses

func (e BucketAlreadyOwnedByYou) Error() string

type BucketExists Uses

type BucketExists GenericError

BucketExists bucket exists.

func (BucketExists) Error Uses

func (e BucketExists) Error() string

type BucketInfo Uses

type BucketInfo struct {
    // Name of the bucket.
    Name string

    // Date and time when the bucket was created.
    Created time.Time
}

BucketInfo - represents bucket metadata.

type BucketNameInvalid Uses

type BucketNameInvalid GenericError

BucketNameInvalid - bucketname provided is invalid.

func (BucketNameInvalid) Error Uses

func (e BucketNameInvalid) Error() string

Return string an error formatted as the given text.

type BucketNotEmpty Uses

type BucketNotEmpty GenericError

BucketNotEmpty bucket is not empty.

func (BucketNotEmpty) Error Uses

func (e BucketNotEmpty) Error() string

type BucketNotFound Uses

type BucketNotFound GenericError

BucketNotFound bucket does not exist.

func (BucketNotFound) Error Uses

func (e BucketNotFound) Error() string

type BucketPolicyNotFound Uses

type BucketPolicyNotFound GenericError

BucketPolicyNotFound - no bucket policy found.

func (BucketPolicyNotFound) Error Uses

func (e BucketPolicyNotFound) Error() string

type CacheConfig Uses

type CacheConfig struct {
    Drives  []string `json:"drives"`
    Expiry  int      `json:"expiry"`
    MaxUse  int      `json:"maxuse"`
    Exclude []string `json:"exclude"`
}

CacheConfig represents cache config settings

func (*CacheConfig) UnmarshalJSON Uses

func (cfg *CacheConfig) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON - implements JSON unmarshal interface for unmarshalling json entries for CacheConfig.

type CacheObjectLayer Uses

type CacheObjectLayer interface {
    // Bucket operations.
    ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (result ListObjectsInfo, err error)
    ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error)
    GetBucketInfo(ctx context.Context, bucket string) (bucketInfo BucketInfo, err error)
    ListBuckets(ctx context.Context) (buckets []BucketInfo, err error)
    DeleteBucket(ctx context.Context, bucket string) error
    // Object operations.
    GetObjectNInfo(ctx context.Context, bucket, object string, rs *HTTPRangeSpec, h http.Header, lockType LockType, opts ObjectOptions) (gr *GetObjectReader, err error)
    GetObject(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions) (err error)
    GetObjectInfo(ctx context.Context, bucket, object string, opts ObjectOptions) (objInfo ObjectInfo, err error)
    PutObject(ctx context.Context, bucket, object string, data *hash.Reader, metadata map[string]string, opts ObjectOptions) (objInfo ObjectInfo, err error)
    DeleteObject(ctx context.Context, bucket, object string) error

    // Multipart operations.
    NewMultipartUpload(ctx context.Context, bucket, object string, metadata map[string]string, opts ObjectOptions) (uploadID string, err error)
    PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *hash.Reader, opts ObjectOptions) (info PartInfo, err error)
    AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error
    CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, uploadedParts []CompletePart) (objInfo ObjectInfo, err error)

    // Storage operations.
    StorageInfo(ctx context.Context) CacheStorageInfo
}

CacheObjectLayer implements primitives for cache object API layer.

type CacheStorageInfo Uses

type CacheStorageInfo struct {
    Total uint64 // Total cache disk space.
    Free  uint64 // Free cache available space.
}

CacheStorageInfo - represents total, free capacity of underlying cache storage.

type ChecksumInfo Uses

type ChecksumInfo struct {
    Name      string
    Algorithm BitrotAlgorithm
    Hash      []byte
}

ChecksumInfo - carries checksums of individual scattered parts per disk.

func (ChecksumInfo) MarshalJSON Uses

func (c ChecksumInfo) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ChecksumInfo struct

func (*ChecksumInfo) UnmarshalJSON Uses

func (c *ChecksumInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON - should never be called, instead xlMetaV1UnmarshalJSON() should be used.

type ClientGrantsResult Uses

type ClientGrantsResult struct {
    // The identifiers for the temporary security credentials that the operation
    // returns.
    AssumedRoleUser AssumedRoleUser `xml:",omitempty"`

    // The intended audience (also known as client ID) of the web identity token.
    // This is traditionally the client identifier issued to the application that
    // requested the client grants.
    Audience string `xml:",omitempty"`

    // The temporary security credentials, which include an access key ID, a secret
    // access key, and a security (or session) token.
    //
    // Note: The size of the security token that STS APIs return is not fixed. We
    // strongly recommend that you make no assumptions about the maximum size. As
    // of this writing, the typical size is less than 4096 bytes, but that can vary.
    // Also, future updates to AWS might require larger sizes.
    Credentials auth.Credentials `xml:",omitempty"`

    // A percentage value that indicates the size of the policy in packed form.
    // The service rejects any policy with a packed size greater than 100 percent,
    // which means the policy exceeded the allowed space.
    PackedPolicySize int `xml:",omitempty"`

    // The issuing authority of the web identity token presented. For OpenID Connect
    // ID tokens, this contains the value of the iss field. For OAuth 2.0 access tokens,
    // this contains the value of the ProviderId parameter that was passed in the
    // AssumeRoleWithClientGrants request.
    Provider string `xml:",omitempty"`

    // The unique user identifier that is returned by the identity provider.
    // This identifier is associated with the Token that was submitted
    // with the AssumeRoleWithClientGrants call. The identifier is typically unique to
    // the user and the application that acquired the ClientGrantsToken (pairwise identifier).
    // For OpenID Connect ID tokens, this field contains the value returned by the identity
    // provider as the token's sub (Subject) claim.
    SubjectFromToken string `xml:",omitempty"`
}

ClientGrantsResult - Contains the response to a successful AssumeRoleWithClientGrants request, including temporary credentials that can be used to make Minio API requests.

type CommonPrefix Uses

type CommonPrefix struct {
    Prefix string
}

CommonPrefix container for prefix response in ListObjectsResponse

type CompleteMultipartUpload Uses

type CompleteMultipartUpload struct {
    Parts []CompletePart `xml:"Part"`
}

CompleteMultipartUpload - represents list of parts which are completed, this is sent by the client during CompleteMultipartUpload request.

type CompleteMultipartUploadResponse Uses

type CompleteMultipartUploadResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CompleteMultipartUploadResult" json:"-"`

    Location string
    Bucket   string
    Key      string
    ETag     string
}

CompleteMultipartUploadResponse container for completed multipart upload response

type CompletePart Uses

type CompletePart struct {
    // Part number identifying the part. This is a positive integer between 1 and
    // 10,000
    PartNumber int

    // Entity tag returned when the part was uploaded.
    ETag string
}

CompletePart - represents the part that was completed, this is sent by the client during CompleteMultipartUpload request.

type CompletedParts Uses

type CompletedParts []CompletePart

CompletedParts - is a collection satisfying sort.Interface.

func (CompletedParts) Len Uses

func (a CompletedParts) Len() int

func (CompletedParts) Less Uses

func (a CompletedParts) Less(i, j int) bool

func (CompletedParts) Swap Uses

func (a CompletedParts) Swap(i, j int)

type ConfigDir Uses

type ConfigDir struct {
    sync.Mutex
    // contains filtered or unexported fields
}

ConfigDir - configuration directory with locking.

func (*ConfigDir) Create Uses

func (config *ConfigDir) Create() error

Create - creates configuration directory tree.

func (*ConfigDir) Get Uses

func (config *ConfigDir) Get() string

Get - returns current configuration directory.

func (*ConfigDir) GetCADir Uses

func (config *ConfigDir) GetCADir() string

GetCADir - returns certificate CA directory.

func (*ConfigDir) GetMinioConfigFile Uses

func (config *ConfigDir) GetMinioConfigFile() string

GetMinioConfigFile - returns absolute path of config.json file.

func (*ConfigDir) GetPrivateKeyFile Uses

func (config *ConfigDir) GetPrivateKeyFile() string

GetPrivateKeyFile - returns absolute path of private.key file.

func (*ConfigDir) GetPublicCertFile Uses

func (config *ConfigDir) GetPublicCertFile() string

GetPublicCertFile - returns absolute path of public.crt file.

func (*ConfigDir) Set Uses

func (config *ConfigDir) Set(dir string)

Set - saves given directory as configuration directory.

type ConfigSys Uses

type ConfigSys struct{}

ConfigSys - config system.

func NewConfigSys Uses

func NewConfigSys() *ConfigSys

NewConfigSys - creates new config system object.

func (*ConfigSys) Init Uses

func (sys *ConfigSys) Init(objAPI ObjectLayer) error

Init - initializes config system from config.json.

func (*ConfigSys) Load Uses

func (sys *ConfigSys) Load(objAPI ObjectLayer) error

Load - load config.json.

type ConnStats Uses

type ConnStats struct {
    // contains filtered or unexported fields
}

ConnStats - Network statistics Count total input/output transferred bytes during the server's life.

type ConsoleLogger Uses

type ConsoleLogger struct {
    Enable bool `json:"enable"`
}

ConsoleLogger is introduced to workaround the dependency about logrus

type CopyObjectPartResponse Uses

type CopyObjectPartResponse struct {
    XMLName      xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyPartResult" json:"-"`
    LastModified string   // time string of format "2006-01-02T15:04:05.000Z"
    ETag         string   // md5sum of the copied object part.
}

CopyObjectPartResponse container returns ETag and LastModified of the successfully copied object

type CopyObjectResponse Uses

type CopyObjectResponse struct {
    XMLName      xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyObjectResult" json:"-"`
    LastModified string   // time string of format "2006-01-02T15:04:05.000Z"
    ETag         string   // md5sum of the copied object.
}

CopyObjectResponse container returns ETag and LastModified of the successfully copied object

type DecryptBlocksReader Uses

type DecryptBlocksReader struct {
    // contains filtered or unexported fields
}

DecryptBlocksReader - decrypts multipart parts, while implementing a io.Reader compatible interface.

func (*DecryptBlocksReader) Read Uses

func (d *DecryptBlocksReader) Read(p []byte) (int, error)

type DecryptBlocksWriter Uses

type DecryptBlocksWriter struct {
    // contains filtered or unexported fields
}

DecryptBlocksWriter - decrypts multipart parts, while implementing a io.Writer compatible interface.

func (*DecryptBlocksWriter) Close Uses

func (w *DecryptBlocksWriter) Close() error

Close closes the LimitWriter. It behaves like io.Closer.

func (*DecryptBlocksWriter) Write Uses

func (w *DecryptBlocksWriter) Write(p []byte) (int, error)

type DeleteBucketArgs Uses

type DeleteBucketArgs struct {
    AuthArgs
    BucketName string
}

DeleteBucketArgs - delete bucket RPC arguments.

type DeleteError Uses

type DeleteError struct {
    Code    string
    Message string
    Key     string
}

DeleteError structure.

type DeleteObjectsRequest Uses

type DeleteObjectsRequest struct {
    // Element to enable quiet mode for the request
    Quiet bool
    // List of objects to be deleted
    Objects []ObjectIdentifier `xml:"Object"`
}

DeleteObjectsRequest - xml carrying the object key names which needs to be deleted.

type DeleteObjectsResponse Uses

type DeleteObjectsResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteResult" json:"-"`

    // Collection of all deleted objects
    DeletedObjects []ObjectIdentifier `xml:"Deleted,omitempty"`

    // Collection of errors deleting certain objects.
    Errors []DeleteError `xml:"Error,omitempty"`
}

DeleteObjectsResponse container for multiple object deletes.

type DiskInfo Uses

type DiskInfo struct {
    Total uint64
    Free  uint64
    Used  uint64
}

DiskInfo is an extended type which returns current disk usage per path.

type DownloadZipArgs Uses

type DownloadZipArgs struct {
    Objects    []string `json:"objects"`    // can be files or sub-directories
    Prefix     string   `json:"prefix"`     // current directory in the browser-ui
    BucketName string   `json:"bucketname"` // bucket name.
}

DownloadZipArgs - Argument for downloading a bunch of files as a zip file. JSON will look like: '{"bucketname":"testbucket","prefix":"john/pics/","objects":["hawaii/","maldives/","sanjose.jpg"]}'

type Endpoint Uses

type Endpoint struct {
    *url.URL
    IsLocal  bool
    SetIndex int
}

Endpoint - any type of endpoint.

func NewEndpoint Uses

func NewEndpoint(arg string) (ep Endpoint, e error)

NewEndpoint - returns new endpoint based on given arguments.

func (Endpoint) IsHTTPS Uses

func (endpoint Endpoint) IsHTTPS() bool

IsHTTPS - returns true if secure for URLEndpointType.

func (Endpoint) String Uses

func (endpoint Endpoint) String() string

func (Endpoint) Type Uses

func (endpoint Endpoint) Type() EndpointType

Type - returns type of endpoint.

type EndpointList Uses

type EndpointList []Endpoint

EndpointList - list of same type of endpoint.

func NewEndpointList Uses

func NewEndpointList(args ...string) (endpoints EndpointList, err error)

NewEndpointList - returns new endpoint list based on input args.

func (EndpointList) GetString Uses

func (endpoints EndpointList) GetString(i int) string

GetString - returns endpoint string of i-th endpoint (0-based), and empty string for invalid indexes.

func (EndpointList) IsHTTPS Uses

func (endpoints EndpointList) IsHTTPS() bool

IsHTTPS - returns true if secure for URLEndpointType.

func (EndpointList) Nodes Uses

func (endpoints EndpointList) Nodes() int

Nodes - returns number of unique servers.

type EndpointType Uses

type EndpointType int

EndpointType - enum for endpoint type.

const (
    // PathEndpointType - path style endpoint type enum.
    PathEndpointType EndpointType = iota + 1

    // URLEndpointType - URL style endpoint type enum.
    URLEndpointType
)

type Erasure Uses

type Erasure struct {
    // contains filtered or unexported fields
}

Erasure - erasure encoding details.

func NewErasure Uses

func NewErasure(ctx context.Context, dataBlocks, parityBlocks int, blockSize int64) (e Erasure, err error)

NewErasure creates a new ErasureStorage.

func (Erasure) Decode Uses

func (e Erasure) Decode(ctx context.Context, writer io.Writer, readers []*bitrotReader, offset, length, totalLength int64) error

Decode reads from readers, reconstructs data if needed and writes the data to the writer.

func (*Erasure) DecodeDataAndParityBlocks Uses

func (e *Erasure) DecodeDataAndParityBlocks(ctx context.Context, data [][]byte) error

DecodeDataAndParityBlocks decodes the given erasure-coded data and verifies it. It returns an error if the decoding failed.

func (*Erasure) DecodeDataBlocks Uses

func (e *Erasure) DecodeDataBlocks(data [][]byte) error

DecodeDataBlocks decodes the given erasure-coded data. It only decodes the data blocks but does not verify them. It returns an error if the decoding failed.

func (*Erasure) Encode Uses

func (e *Erasure) Encode(ctx context.Context, src io.Reader, writers []*bitrotWriter, buf []byte, quorum int) (total int64, err error)

Encode reads from the reader, erasure-encodes the data and writes to the writers.

func (*Erasure) EncodeData Uses

func (e *Erasure) EncodeData(ctx context.Context, data []byte) ([][]byte, error)

EncodeData encodes the given data and returns the erasure-coded data. It returns an error if the erasure coding failed.

func (Erasure) Heal Uses

func (e Erasure) Heal(ctx context.Context, readers []*bitrotReader, writers []*bitrotWriter, size int64) error

Heal heals the shard files on non-nil writers. Note that the quorum passed is 1 as healing should continue even if it has been successful healing only one shard file.

type ErasureInfo Uses

type ErasureInfo struct {
    // Algorithm is the string representation of erasure-coding-algorithm
    Algorithm string `json:"algorithm"`
    // DataBlocks is the number of data blocks for erasure-coding
    DataBlocks int `json:"data"`
    // ParityBlocks is the number of parity blocks for erasure-coding
    ParityBlocks int `json:"parity"`
    // BlockSize is the size of one erasure-coded block
    BlockSize int64 `json:"blockSize"`
    // Index is the index of the current disk
    Index int `json:"index"`
    // Distribution is the distribution of the data and parity blocks
    Distribution []int `json:"distribution"`
    // Checksums holds all bitrot checksums of all erasure encoded blocks
    Checksums []ChecksumInfo `json:"checksum,omitempty"`
}

ErasureInfo holds erasure coding and bitrot related information.

func (*ErasureInfo) AddChecksumInfo Uses

func (e *ErasureInfo) AddChecksumInfo(ckSumInfo ChecksumInfo)

AddChecksumInfo adds a checksum of a part.

func (ErasureInfo) GetChecksumInfo Uses

func (e ErasureInfo) GetChecksumInfo(partName string) (ckSum ChecksumInfo)

GetChecksumInfo - get checksum of a part.

type FSChecksumInfoV1 Uses

type FSChecksumInfoV1 struct {
    Algorithm string
    Blocksize int64
    Hashes    [][]byte
}

FSChecksumInfoV1 - carries checksums of individual blocks on disk.

func (FSChecksumInfoV1) MarshalJSON Uses

func (c FSChecksumInfoV1) MarshalJSON() ([]byte, error)

MarshalJSON marshals the FSChecksumInfoV1 struct

func (*FSChecksumInfoV1) UnmarshalJSON Uses

func (c *FSChecksumInfoV1) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the the given data into the FSChecksumInfoV1 struct

type FSObjects Uses

type FSObjects struct {
    // contains filtered or unexported fields
}

FSObjects - Implements fs object layer.

func (*FSObjects) AbortMultipartUpload Uses

func (fs *FSObjects) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error

AbortMultipartUpload - aborts an ongoing multipart operation signified by the input uploadID. This is an atomic operation doesn't require clients to initiate multiple such requests.

All parts are purged from all disks and reference to the uploadID would be removed from the system, rollback is not possible on this operation.

Implements S3 compatible Abort multipart API, slight difference is that this is an atomic idempotent operation. Subsequent calls have no affect and further requests to the same uploadID would not be honored.

func (*FSObjects) CompleteMultipartUpload Uses

func (fs *FSObjects) CompleteMultipartUpload(ctx context.Context, bucket string, object string, uploadID string, parts []CompletePart) (oi ObjectInfo, e error)

CompleteMultipartUpload - completes an ongoing multipart transaction after receiving all the parts indicated by the client. Returns an md5sum calculated by concatenating all the individual md5sums of all the parts.

Implements S3 compatible Complete multipart API.

func (*FSObjects) CopyObject Uses

func (fs *FSObjects) CopyObject(ctx context.Context, srcBucket, srcObject, dstBucket, dstObject string, srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (oi ObjectInfo, e error)

CopyObject - copy object source object to destination object. if source object and destination object are same we only update metadata.

func (*FSObjects) CopyObjectPart Uses

func (fs *FSObjects) CopyObjectPart(ctx context.Context, srcBucket, srcObject, dstBucket, dstObject, uploadID string, partID int,
    startOffset int64, length int64, srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (pi PartInfo, e error)

CopyObjectPart - similar to PutObjectPart but reads data from an existing object. Internally incoming data is written to '.minio.sys/tmp' location and safely renamed to '.minio.sys/multipart' for reach parts.

func (*FSObjects) DeleteBucket Uses

func (fs *FSObjects) DeleteBucket(ctx context.Context, bucket string) error

DeleteBucket - delete a bucket and all the metadata associated with the bucket including pending multipart, object metadata.

func (*FSObjects) DeleteBucketPolicy Uses

func (fs *FSObjects) DeleteBucketPolicy(ctx context.Context, bucket string) error

DeleteBucketPolicy deletes all policies on bucket

func (*FSObjects) DeleteObject Uses

func (fs *FSObjects) DeleteObject(ctx context.Context, bucket, object string) error

DeleteObject - deletes an object from a bucket, this operation is destructive and there are no rollbacks supported.

func (*FSObjects) GetBucketInfo Uses

func (fs *FSObjects) GetBucketInfo(ctx context.Context, bucket string) (bi BucketInfo, e error)

GetBucketInfo - fetch bucket metadata info.

func (*FSObjects) GetBucketPolicy Uses

func (fs *FSObjects) GetBucketPolicy(ctx context.Context, bucket string) (*policy.Policy, error)

GetBucketPolicy will get policy on bucket

func (*FSObjects) GetObject Uses

func (fs *FSObjects) GetObject(ctx context.Context, bucket, object string, offset int64, length int64, writer io.Writer, etag string, opts ObjectOptions) (err error)

GetObject - reads an object from the disk. Supports additional parameters like offset and length which are synonymous with HTTP Range requests.

startOffset indicates the starting read location of the object. length indicates the total length of the object.

func (*FSObjects) GetObjectInfo Uses

func (fs *FSObjects) GetObjectInfo(ctx context.Context, bucket, object string, opts ObjectOptions) (oi ObjectInfo, e error)

GetObjectInfo - reads object metadata and replies back ObjectInfo.

func (*FSObjects) GetObjectNInfo Uses

func (fs *FSObjects) GetObjectNInfo(ctx context.Context, bucket, object string, rs *HTTPRangeSpec, h http.Header, lockType LockType, opts ObjectOptions) (gr *GetObjectReader, err error)

GetObjectNInfo - returns object info and a reader for object content.

func (*FSObjects) HealBucket Uses

func (fs *FSObjects) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem,
    error)

HealBucket - no-op for fs, Valid only for XL.

func (*FSObjects) HealFormat Uses

func (fs *FSObjects) HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)

HealFormat - no-op for fs, Valid only for XL.

func (*FSObjects) HealObject Uses

func (fs *FSObjects) HealObject(ctx context.Context, bucket, object string, dryRun bool) (
    res madmin.HealResultItem, err error)

HealObject - no-op for fs. Valid only for XL.

func (*FSObjects) IsCompressionSupported Uses

func (fs *FSObjects) IsCompressionSupported() bool

IsCompressionSupported returns whether compression is applicable for this layer.

func (*FSObjects) IsEncryptionSupported Uses

func (fs *FSObjects) IsEncryptionSupported() bool

IsEncryptionSupported returns whether server side encryption is applicable for this layer.

func (*FSObjects) IsNotificationSupported Uses

func (fs *FSObjects) IsNotificationSupported() bool

IsNotificationSupported returns whether bucket notification is applicable for this layer.

func (*FSObjects) ListBuckets Uses

func (fs *FSObjects) ListBuckets(ctx context.Context) ([]BucketInfo, error)

ListBuckets - list all s3 compatible buckets (directories) at fsPath.

func (*FSObjects) ListBucketsHeal Uses

func (fs *FSObjects) ListBucketsHeal(ctx context.Context) ([]BucketInfo, error)

ListBucketsHeal - list all buckets to be healed. Valid only for XL

func (*FSObjects) ListMultipartUploads Uses

func (fs *FSObjects) ListMultipartUploads(ctx context.Context, bucket, object, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (result ListMultipartsInfo, e error)

ListMultipartUploads - lists all the uploadIDs for the specified object. We do not support prefix based listing.

func (*FSObjects) ListObjectParts Uses

func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker, maxParts int) (result ListPartsInfo, e error)

ListObjectParts - lists all previously uploaded parts for a given object and uploadID. Takes additional input of part-number-marker to indicate where the listing should begin from.

Implements S3 compatible ListObjectParts API. The resulting ListPartsInfo structure is unmarshalled directly into XML and replied back to the client.

func (*FSObjects) ListObjects Uses

func (fs *FSObjects) ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)

ListObjects - list all objects at prefix upto maxKeys., optionally delimited by '/'. Maintains the list pool state for future re-entrant list requests.

func (*FSObjects) ListObjectsHeal Uses

func (fs *FSObjects) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)

ListObjectsHeal - list all objects to be healed. Valid only for XL

func (*FSObjects) ListObjectsV2 Uses

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

ListObjectsV2 lists all blobs in bucket filtered by prefix

func (*FSObjects) MakeBucketWithLocation Uses

func (fs *FSObjects) MakeBucketWithLocation(ctx context.Context, bucket, location string) error

MakeBucketWithLocation - create a new bucket, returns if it already exists.

func (*FSObjects) NewMultipartUpload Uses

func (fs *FSObjects) NewMultipartUpload(ctx context.Context, bucket, object string, meta map[string]string, opts ObjectOptions) (string, error)

NewMultipartUpload - initialize a new multipart upload, returns a unique id. The unique id returned here is of UUID form, for each subsequent request each UUID is unique.

Implements S3 compatible initiate multipart API.

func (*FSObjects) PutObject Uses

func (fs *FSObjects) PutObject(ctx context.Context, bucket string, object string, data *hash.Reader, metadata map[string]string, opts ObjectOptions) (objInfo ObjectInfo, retErr error)

PutObject - creates an object upon reading from the input stream until EOF, writes data directly to configured filesystem path. Additionally writes `fs.json` which carries the necessary metadata for future object operations.

func (*FSObjects) PutObjectPart Uses

func (fs *FSObjects) PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *hash.Reader, opts ObjectOptions) (pi PartInfo, e error)

PutObjectPart - reads incoming data until EOF for the part file on an ongoing multipart transaction. Internally incoming data is written to '.minio.sys/tmp' location and safely renamed to '.minio.sys/multipart' for reach parts.

func (*FSObjects) ReloadFormat Uses

func (fs *FSObjects) ReloadFormat(ctx context.Context, dryRun bool) error

ReloadFormat - no-op for fs, Valid only for XL.

func (*FSObjects) SetBucketPolicy Uses

func (fs *FSObjects) SetBucketPolicy(ctx context.Context, bucket string, policy *policy.Policy) error

SetBucketPolicy sets policy on bucket

func (*FSObjects) Shutdown Uses

func (fs *FSObjects) Shutdown(ctx context.Context) error

Shutdown - should be called when process shuts down.

func (*FSObjects) StorageInfo Uses

func (fs *FSObjects) StorageInfo(ctx context.Context) StorageInfo

StorageInfo - returns underlying storage statistics.

type FileInfo Uses

type FileInfo struct {
    // Name of the volume.
    Volume string

    // Name of the file.
    Name string

    // Date and time when the file was last modified.
    ModTime time.Time

    // Total file size.
    Size int64

    // File mode bits.
    Mode os.FileMode
}

FileInfo - represents file stat information.

type FileLogger Uses

type FileLogger struct {
    Enable   bool   `json:"enable"`
    Filename string `json:"filename"`
}

FileLogger is introduced to workaround the dependency about logrus

type Gateway Uses

type Gateway interface {
    // Name returns the unique name of the gateway.
    Name() string

    // NewGatewayLayer returns a new  ObjectLayer.
    NewGatewayLayer(creds auth.Credentials) (ObjectLayer, error)

    // Returns true if gateway is ready for production.
    Production() bool
}

Gateway represents a gateway backend.

type GatewayUnsupported Uses

type GatewayUnsupported struct{}

GatewayUnsupported list of unsupported call stubs for gateway.

func (GatewayUnsupported) AbortMultipartUpload Uses

func (a GatewayUnsupported) AbortMultipartUpload(ctx context.Context, bucket string, object string, uploadID string) error

AbortMultipartUpload aborts a ongoing multipart upload

func (GatewayUnsupported) CompleteMultipartUpload Uses

func (a GatewayUnsupported) CompleteMultipartUpload(ctx context.Context, bucket string, object string, uploadID string, uploadedParts []CompletePart) (oi ObjectInfo, err error)

CompleteMultipartUpload completes ongoing multipart upload and finalizes object

func (GatewayUnsupported) CopyObject Uses

func (a GatewayUnsupported) CopyObject(ctx context.Context, srcBucket string, srcObject string, destBucket string, destObject string,
    srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (objInfo ObjectInfo, err error)

CopyObject copies a blob from source container to destination container.

func (GatewayUnsupported) CopyObjectPart Uses

func (a GatewayUnsupported) CopyObjectPart(ctx context.Context, srcBucket, srcObject, destBucket, destObject, uploadID string, partID int, startOffset, length int64, srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (pi PartInfo, err error)

CopyObjectPart copy part of object to uploadID for another object

func (GatewayUnsupported) DeleteBucketPolicy Uses

func (a GatewayUnsupported) DeleteBucketPolicy(ctx context.Context, bucket string) error

DeleteBucketPolicy deletes all policies on bucket

func (GatewayUnsupported) GetBucketPolicy Uses

func (a GatewayUnsupported) GetBucketPolicy(ctx context.Context, bucket string) (bucketPolicy *policy.Policy, err error)

GetBucketPolicy will get policy on bucket

func (GatewayUnsupported) HealBucket Uses

func (a GatewayUnsupported) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error)

HealBucket - Not implemented stub

func (GatewayUnsupported) HealFormat Uses

func (a GatewayUnsupported) HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)

HealFormat - Not implemented stub

func (GatewayUnsupported) HealObject Uses

func (a GatewayUnsupported) HealObject(ctx context.Context, bucket, object string, dryRun bool) (h madmin.HealResultItem, e error)

HealObject - Not implemented stub

func (GatewayUnsupported) IsCompressionSupported Uses

func (a GatewayUnsupported) IsCompressionSupported() bool

IsCompressionSupported returns whether compression is applicable for this layer.

func (GatewayUnsupported) IsEncryptionSupported Uses

func (a GatewayUnsupported) IsEncryptionSupported() bool

IsEncryptionSupported returns whether server side encryption is applicable for this layer.

func (GatewayUnsupported) IsNotificationSupported Uses

func (a GatewayUnsupported) IsNotificationSupported() bool

IsNotificationSupported returns whether bucket notification is applicable for this layer.

func (GatewayUnsupported) ListBucketsHeal Uses

func (a GatewayUnsupported) ListBucketsHeal(ctx context.Context) (buckets []BucketInfo, err error)

ListBucketsHeal - Not implemented stub

func (GatewayUnsupported) ListMultipartUploads Uses

func (a GatewayUnsupported) ListMultipartUploads(ctx context.Context, bucket string, prefix string, keyMarker string, uploadIDMarker string, delimiter string, maxUploads int) (lmi ListMultipartsInfo, err error)

ListMultipartUploads lists all multipart uploads.

func (GatewayUnsupported) ListObjectParts Uses

func (a GatewayUnsupported) ListObjectParts(ctx context.Context, bucket string, object string, uploadID string, partNumberMarker int, maxParts int) (lpi ListPartsInfo, err error)

ListObjectParts returns all object parts for specified object in specified bucket

func (GatewayUnsupported) ListObjectsHeal Uses

func (a GatewayUnsupported) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)

ListObjectsHeal - Not implemented stub

func (GatewayUnsupported) ListObjectsV2 Uses

func (a GatewayUnsupported) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error)

ListObjectsV2 - Not implemented stub

func (GatewayUnsupported) NewMultipartUpload Uses

func (a GatewayUnsupported) NewMultipartUpload(ctx context.Context, bucket string, object string, metadata map[string]string, opts ObjectOptions) (uploadID string, err error)

NewMultipartUpload upload object in multiple parts

func (GatewayUnsupported) PutObjectPart Uses

func (a GatewayUnsupported) PutObjectPart(ctx context.Context, bucket string, object string, uploadID string, partID int, data *hash.Reader, opts ObjectOptions) (pi PartInfo, err error)

PutObjectPart puts a part of object in bucket

func (GatewayUnsupported) RefreshBucketPolicy Uses

func (a GatewayUnsupported) RefreshBucketPolicy(ctx context.Context, bucket string) error

RefreshBucketPolicy refreshes cache policy with what's on disk.

func (GatewayUnsupported) ReloadFormat Uses

func (a GatewayUnsupported) ReloadFormat(ctx context.Context, dryRun bool) error

ReloadFormat - Not implemented stub.

func (GatewayUnsupported) SetBucketPolicy Uses

func (a GatewayUnsupported) SetBucketPolicy(ctx context.Context, bucket string, bucketPolicy *policy.Policy) error

SetBucketPolicy sets policy on bucket

type GenerateAuthReply Uses

type GenerateAuthReply struct {
    AccessKey string `json:"accessKey"`
    SecretKey string `json:"secretKey"`
    UIVersion string `json:"uiVersion"`
}

GenerateAuthReply - reply for GenerateAuth

type GenericError Uses

type GenericError struct {
    Bucket string
    Object string
}

GenericError - generic object layer error.

type GetAuthReply Uses

type GetAuthReply struct {
    AccessKey string `json:"accessKey"`
    SecretKey string `json:"secretKey"`
    UIVersion string `json:"uiVersion"`
}

GetAuthReply - Reply current credentials.

type GetBucketPolicyArgs Uses

type GetBucketPolicyArgs struct {
    BucketName string `json:"bucketName"`
    Prefix     string `json:"prefix"`
}

GetBucketPolicyArgs - get bucket policy args.

type GetBucketPolicyRep Uses

type GetBucketPolicyRep struct {
    UIVersion string                     `json:"uiVersion"`
    Policy    miniogopolicy.BucketPolicy `json:"policy"`
}

GetBucketPolicyRep - get bucket policy reply.

type GetObjectReader Uses

type GetObjectReader struct {
    ObjInfo ObjectInfo
    // contains filtered or unexported fields
}

GetObjectReader is a type that wraps a reader with a lock to provide a ReadCloser interface that unlocks on Close()

func NewGetObjectReaderFromReader Uses

func NewGetObjectReaderFromReader(r io.Reader, oi ObjectInfo, cleanupFns ...func()) *GetObjectReader

NewGetObjectReaderFromReader sets up a GetObjectReader with a given reader. This ignores any object properties.

func (*GetObjectReader) Close Uses

func (g *GetObjectReader) Close() error

Close - calls the cleanup actions in reverse order

func (*GetObjectReader) Read Uses

func (g *GetObjectReader) Read(p []byte) (n int, err error)

Read - to implement Reader interface.

type HTTPMethodStats Uses

type HTTPMethodStats struct {
    Counter  atomic.Uint64
    Duration atomic.Float64
}

HTTPMethodStats holds statistics information about a given HTTP method made by all clients

type HTTPRangeSpec Uses

type HTTPRangeSpec struct {
    // Does the range spec refer to a suffix of the object?
    IsSuffixLength bool

    // Start and end offset specified in range spec
    Start, End int64
}

HTTPRangeSpec represents a range specification as supported by S3 GET object request.

Case 1: Not present -> represented by a nil RangeSpec Case 2: bytes=1-10 (absolute start and end offsets) -> RangeSpec{false, 1, 10} Case 3: bytes=10- (absolute start offset with end offset unspecified) -> RangeSpec{false, 10, -1} Case 4: bytes=-30 (suffix length specification) -> RangeSpec{true, -30, -1}

func (*HTTPRangeSpec) GetLength Uses

func (h *HTTPRangeSpec) GetLength(resourceSize int64) (rangeLength int64, err error)

GetLength - get length of range

func (*HTTPRangeSpec) GetOffsetLength Uses

func (h *HTTPRangeSpec) GetOffsetLength(resourceSize int64) (start, length int64, err error)

GetOffsetLength computes the start offset and length of the range given the size of the resource

type HTTPStats Uses

type HTTPStats struct {
    // contains filtered or unexported fields
}

HTTPStats holds statistics information about HTTP requests made by all clients

type HandlerFunc Uses

type HandlerFunc func(http.Handler) http.Handler

HandlerFunc - useful to chain different middleware http.Handler

type IAMSys Uses

type IAMSys struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

IAMSys - config system.

func NewIAMSys Uses

func NewIAMSys() *IAMSys

NewIAMSys - creates new config system object.

func (*IAMSys) DeleteCannedPolicy Uses

func (sys *IAMSys) DeleteCannedPolicy(policyName string) error

DeleteCannedPolicy - deletes a canned policy.

func (*IAMSys) DeleteUser Uses

func (sys *IAMSys) DeleteUser(accessKey string) error

DeleteUser - set user credentials.

func (*IAMSys) GetUser Uses

func (sys *IAMSys) GetUser(accessKey string) (cred auth.Credentials, ok bool)

GetUser - get user credentials

func (*IAMSys) Init Uses

func (sys *IAMSys) Init(objAPI ObjectLayer) error

Init - initializes config system from iam.json

func (*IAMSys) IsAllowed Uses

func (sys *IAMSys) IsAllowed(args iampolicy.Args) bool

IsAllowed - checks given policy args is allowed to continue the Rest API.

func (*IAMSys) ListCannedPolicies Uses

func (sys *IAMSys) ListCannedPolicies() (map[string][]byte, error)

ListCannedPolicies - lists all canned policies.

func (*IAMSys) ListUsers Uses

func (sys *IAMSys) ListUsers() (map[string]madmin.UserInfo, error)

ListUsers - list all users.

func (*IAMSys) Load Uses

func (sys *IAMSys) Load(objAPI ObjectLayer) error

Load - load iam.json

func (*IAMSys) SetCannedPolicy Uses

func (sys *IAMSys) SetCannedPolicy(policyName string, p iampolicy.Policy) error

SetCannedPolicy - sets a new canned policy.

func (*IAMSys) SetTempUser Uses

func (sys *IAMSys) SetTempUser(accessKey string, cred auth.Credentials, policyName string) error

SetTempUser - set temporary user credentials, these credentials have an expiry.

func (*IAMSys) SetUser Uses

func (sys *IAMSys) SetUser(accessKey string, uinfo madmin.UserInfo) error

SetUser - set user credentials.

func (*IAMSys) SetUserPolicy Uses

func (sys *IAMSys) SetUserPolicy(accessKey, policyName string) error

SetUserPolicy - sets policy to given user name.

func (*IAMSys) SetUserStatus Uses

func (sys *IAMSys) SetUserStatus(accessKey string, status madmin.AccountStatus) error

SetUserStatus - sets current user status, supports disabled or enabled.

type IAMSysProvider Uses

type IAMSysProvider interface {
    Load(objAPI ObjectLayer) error
    Init(objAPI ObjectLayer) error
    DeleteCannedPolicy(policyName string) error
    ListCannedPolicies() (map[string][]byte, error)
    SetCannedPolicy(policyName string, p iampolicy.Policy) error
    SetUserPolicy(accessKey, policyName string) error
    DeleteUser(accessKey string) error
    SetTempUser(accessKey string, cred auth.Credentials, policyName string) error
    ListUsers() (map[string]madmin.UserInfo, error)
    SetUserStatus(accessKey string, status madmin.AccountStatus) error
    SetUser(accessKey string, uinfo madmin.UserInfo) error
    GetUser(accessKey string) (cred auth.Credentials, ok bool)
    IsAllowed(args iampolicy.Args) bool
}

type IncompleteBody Uses

type IncompleteBody GenericError

IncompleteBody You did not provide the number of bytes specified by the Content-Length HTTP header.

func (IncompleteBody) Error Uses

func (e IncompleteBody) Error() string

Return string an error formatted as the given text.

type InitiateMultipartUploadResponse Uses

type InitiateMultipartUploadResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InitiateMultipartUploadResult" json:"-"`

    Bucket   string
    Key      string
    UploadID string `xml:"UploadId"`
}

InitiateMultipartUploadResponse container for InitiateMultiPartUpload response, provides uploadID to start MultiPart upload

type Initiator Uses

type Initiator Owner

Initiator inherit from Owner struct, fields are same

type InsufficientReadQuorum Uses

type InsufficientReadQuorum struct{}

InsufficientReadQuorum storage cannot satisfy quorum for read operation.

func (InsufficientReadQuorum) Error Uses

func (e InsufficientReadQuorum) Error() string

type InsufficientWriteQuorum Uses

type InsufficientWriteQuorum struct{}

InsufficientWriteQuorum storage cannot satisfy quorum for write operation.

func (InsufficientWriteQuorum) Error Uses

func (e InsufficientWriteQuorum) Error() string

type InvalidETag Uses

type InvalidETag struct{}

InvalidETag error returned when the etag has changed on disk

func (InvalidETag) Error Uses

func (e InvalidETag) Error() string

type InvalidMarkerPrefixCombination Uses

type InvalidMarkerPrefixCombination struct {
    Marker, Prefix string
}

InvalidMarkerPrefixCombination - invalid marker and prefix combination.

func (InvalidMarkerPrefixCombination) Error Uses

func (e InvalidMarkerPrefixCombination) Error() string

type InvalidPart Uses

type InvalidPart struct {
    PartNumber int
    ExpETag    string
    GotETag    string
}

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

func (InvalidPart) Error Uses

func (e InvalidPart) Error() string

type InvalidRange Uses

type InvalidRange struct {
    OffsetBegin  int64
    OffsetEnd    int64
    ResourceSize int64
}

InvalidRange - invalid range typed error.

func (InvalidRange) Error Uses

func (e InvalidRange) Error() string

type InvalidUploadID Uses

type InvalidUploadID struct {
    UploadID string
}

InvalidUploadID invalid upload id.

func (InvalidUploadID) Error Uses

func (e InvalidUploadID) Error() string

type InvalidUploadIDKeyCombination Uses

type InvalidUploadIDKeyCombination struct {
    UploadIDMarker, KeyMarker string
}

InvalidUploadIDKeyCombination - invalid upload id and key marker combination.

func (InvalidUploadIDKeyCombination) Error Uses

func (e InvalidUploadIDKeyCombination) Error() string

type JwtIAMSys Uses

type JwtIAMSys struct {
    IAMSys
    // contains filtered or unexported fields
}

func NewJwtIAMSys Uses

func NewJwtIAMSys() *JwtIAMSys

func (*JwtIAMSys) DeleteCannedPolicy Uses

func (sys *JwtIAMSys) DeleteCannedPolicy(policyName string) error

DeleteCannedPolicy - deletes a canned policy.

func (*JwtIAMSys) DeleteUser Uses

func (sys *JwtIAMSys) DeleteUser(accessKey string) error

DeleteUser - set user credentials.

func (*JwtIAMSys) GetUser Uses

func (sys *JwtIAMSys) GetUser(accessKey string) (cred auth.Credentials, ok bool)

GetUser - get user credentials

func (*JwtIAMSys) Init Uses

func (sys *JwtIAMSys) Init(objAPI ObjectLayer) error

Init - initializes config system from iam.json

func (*JwtIAMSys) IsAllowed Uses

func (sys *JwtIAMSys) IsAllowed(args iampolicy.Args) bool

IsAllowed - checks given policy args is allowed to continue the Rest API.

func (*JwtIAMSys) ListCannedPolicies Uses

func (sys *JwtIAMSys) ListCannedPolicies() (map[string][]byte, error)

ListCannedPolicies - lists all canned policies.

func (*JwtIAMSys) ListUsers Uses

func (sys *JwtIAMSys) ListUsers() (map[string]madmin.UserInfo, error)

ListUsers - list all users.

func (*JwtIAMSys) Load Uses

func (sys *JwtIAMSys) Load(objAPI ObjectLayer) error

Load - load iam.json

func (*JwtIAMSys) SetCannedPolicy Uses

func (sys *JwtIAMSys) SetCannedPolicy(policyName string, p iampolicy.Policy) error

SetCannedPolicy - sets a new canned policy.

func (*JwtIAMSys) SetTempUser Uses

func (sys *JwtIAMSys) SetTempUser(accessKey string, cred auth.Credentials, policyName string) error

SetTempUser - set temporary user credentials, these credentials have an expiry.

func (*JwtIAMSys) SetUser Uses

func (sys *JwtIAMSys) SetUser(accessKey string, uinfo madmin.UserInfo) error

SetUser - set user credentials.

func (*JwtIAMSys) SetUserPolicy Uses

func (sys *JwtIAMSys) SetUserPolicy(accessKey, policyName string) error

SetUserPolicy - sets policy to given user name.

func (*JwtIAMSys) SetUserStatus Uses

func (sys *JwtIAMSys) SetUserStatus(accessKey string, status madmin.AccountStatus) error

SetUserStatus - sets current user status, supports disabled or enabled.

type ListAllBucketPoliciesArgs Uses

type ListAllBucketPoliciesArgs struct {
    BucketName string `json:"bucketName"`
}

ListAllBucketPoliciesArgs - get all bucket policies.

type ListAllBucketPoliciesRep Uses

type ListAllBucketPoliciesRep struct {
    UIVersion string               `json:"uiVersion"`
    Policies  []BucketAccessPolicy `json:"policies"`
}

ListAllBucketPoliciesRep - get all bucket policy reply.

type ListBucketsRep Uses

type ListBucketsRep struct {
    Buckets   []WebBucketInfo `json:"buckets"`
    UIVersion string          `json:"uiVersion"`
}

ListBucketsRep - list buckets response

type ListBucketsResponse Uses

type ListBucketsResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResult" json:"-"`

    Owner Owner

    // Container for one or more buckets.
    Buckets struct {
        Buckets []Bucket `xml:"Bucket"`
    }   // Buckets are nested
}

ListBucketsResponse - format for list buckets response

type ListMultipartUploadsResponse Uses

type ListMultipartUploadsResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListMultipartUploadsResult" json:"-"`

    Bucket             string
    KeyMarker          string
    UploadIDMarker     string `xml:"UploadIdMarker"`
    NextKeyMarker      string
    NextUploadIDMarker string `xml:"NextUploadIdMarker"`
    Delimiter          string
    Prefix             string
    EncodingType       string `xml:"EncodingType,omitempty"`
    MaxUploads         int
    IsTruncated        bool

    // List of pending uploads.
    Uploads []Upload `xml:"Upload"`

    // Delimed common prefixes.
    CommonPrefixes []CommonPrefix
}

ListMultipartUploadsResponse - format for list multipart uploads response.

type ListMultipartsInfo Uses

type ListMultipartsInfo struct {
    // Together with upload-id-marker, this parameter specifies the multipart upload
    // after which listing should begin.
    KeyMarker string

    // Together with key-marker, specifies the multipart upload after which listing
    // should begin. If key-marker is not specified, the upload-id-marker parameter
    // is ignored.
    UploadIDMarker string

    // When a list is truncated, this element specifies the value that should be
    // used for the key-marker request parameter in a subsequent request.
    NextKeyMarker string

    // When a list is truncated, this element specifies the value that should be
    // used for the upload-id-marker request parameter in a subsequent request.
    NextUploadIDMarker string

    // Maximum number of multipart uploads that could have been included in the
    // response.
    MaxUploads int

    // Indicates whether the returned list of multipart uploads is truncated. A
    // value of true indicates that the list was truncated. The list can be truncated
    // if the number of multipart uploads exceeds the limit allowed or specified
    // by max uploads.
    IsTruncated bool

    // List of all pending uploads.
    Uploads []MultipartInfo

    // When a prefix is provided in the request, The result contains only keys
    // starting with the specified prefix.
    Prefix string

    // A character used to truncate the object prefixes.
    // NOTE: only supported delimiter is '/'.
    Delimiter string

    // CommonPrefixes contains all (if there are any) keys between Prefix and the
    // next occurrence of the string specified by delimiter.
    CommonPrefixes []string

    EncodingType string // Not supported yet.
}

ListMultipartsInfo - represnets bucket resources for incomplete multipart uploads.

func FromMinioClientListMultipartsInfo Uses

func FromMinioClientListMultipartsInfo(lmur minio.ListMultipartUploadsResult) ListMultipartsInfo

FromMinioClientListMultipartsInfo converts minio ListMultipartUploadsResult to ListMultipartsInfo

type ListObjectsArgs Uses

type ListObjectsArgs struct {
    BucketName string `json:"bucketName"`
    Prefix     string `json:"prefix"`
    Marker     string `json:"marker"`
}

ListObjectsArgs - list object args.

type ListObjectsInfo Uses

type ListObjectsInfo struct {
    // Indicates whether the returned list objects response is truncated. A
    // value of true indicates that the list was truncated. The list can be truncated
    // if the number of objects exceeds the limit allowed or specified
    // by max keys.
    IsTruncated bool

    // When response is truncated (the IsTruncated element value in the response
    // is true), you can use the key name in this field as marker in the subsequent
    // request to get next set of objects.
    //
    // NOTE: This element is returned only if you have delimiter request parameter
    // specified.
    NextMarker string

    // List of objects info for this request.
    Objects []ObjectInfo

    // List of prefixes for this request.
    Prefixes []string
}

ListObjectsInfo - container for list objects.

func FromMinioClientListBucketResult Uses

func FromMinioClientListBucketResult(bucket string, result minio.ListBucketResult) ListObjectsInfo

FromMinioClientListBucketResult converts minio ListBucketResult to ListObjectsInfo

type ListObjectsRep Uses

type ListObjectsRep struct {
    Objects     []WebObjectInfo `json:"objects"`
    NextMarker  string          `json:"nextmarker"`
    IsTruncated bool            `json:"istruncated"`
    Writable    bool            `json:"writable"` // Used by client to show "upload file" button.
    UIVersion   string          `json:"uiVersion"`
}

ListObjectsRep - list objects response.

type ListObjectsResponse Uses

type ListObjectsResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult" json:"-"`

    Name   string
    Prefix string
    Marker string

    // When response is truncated (the IsTruncated element value in the response
    // is true), you can use the key name in this field as marker in the subsequent
    // request to get next set of objects. Server lists objects in alphabetical
    // order Note: This element is returned only if you have delimiter request parameter
    // specified. If response does not include the NextMaker and it is truncated,
    // you can use the value of the last Key in the response as the marker in the
    // subsequent request to get the next set of object keys.
    NextMarker string `xml:"NextMarker,omitempty"`

    MaxKeys   int
    Delimiter string
    // A flag that indicates whether or not ListObjects returned all of the results
    // that satisfied the search criteria.
    IsTruncated bool

    Contents       []Object
    CommonPrefixes []CommonPrefix

    // Encoding type used to encode object keys in the response.
    EncodingType string `xml:"EncodingType,omitempty"`
}

ListObjectsResponse - format for list objects response.

type ListObjectsV2Info Uses

type ListObjectsV2Info struct {
    // Indicates whether the returned list objects response is truncated. A
    // value of true indicates that the list was truncated. The list can be truncated
    // if the number of objects exceeds the limit allowed or specified
    // by max keys.
    IsTruncated bool

    // When response is truncated (the IsTruncated element value in the response
    // is true), you can use the key name in this field as marker in the subsequent
    // request to get next set of objects.
    //
    // NOTE: This element is returned only if you have delimiter request parameter
    // specified.
    ContinuationToken     string
    NextContinuationToken string

    // List of objects info for this request.
    Objects []ObjectInfo

    // List of prefixes for this request.
    Prefixes []string
}

ListObjectsV2Info - container for list objects version 2.

func FromMinioClientListBucketResultToV2Info Uses

func FromMinioClientListBucketResultToV2Info(bucket string, result minio.ListBucketResult) ListObjectsV2Info

FromMinioClientListBucketResultToV2Info converts minio ListBucketResult to ListObjectsV2Info

func FromMinioClientListBucketV2Result Uses

func FromMinioClientListBucketV2Result(bucket string, result minio.ListBucketV2Result) ListObjectsV2Info

FromMinioClientListBucketV2Result converts minio ListBucketResult to ListObjectsInfo

type ListObjectsV2Response Uses

type ListObjectsV2Response struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult" json:"-"`

    Name       string
    Prefix     string
    StartAfter string `xml:"StartAfter,omitempty"`
    // When response is truncated (the IsTruncated element value in the response
    // is true), you can use the key name in this field as marker in the subsequent
    // request to get next set of objects. Server lists objects in alphabetical
    // order Note: This element is returned only if you have delimiter request parameter
    // specified. If response does not include the NextMaker and it is truncated,
    // you can use the value of the last Key in the response as the marker in the
    // subsequent request to get the next set of object keys.
    ContinuationToken     string `xml:"ContinuationToken,omitempty"`
    NextContinuationToken string `xml:"NextContinuationToken,omitempty"`

    KeyCount  int
    MaxKeys   int
    Delimiter string
    // A flag that indicates whether or not ListObjects returned all of the results
    // that satisfied the search criteria.
    IsTruncated bool

    Contents       []Object
    CommonPrefixes []CommonPrefix

    // Encoding type used to encode object keys in the response.
    EncodingType string `xml:"EncodingType,omitempty"`
}

ListObjectsV2Response - format for list objects response.

type ListPartsInfo Uses

type ListPartsInfo struct {
    // Name of the bucket.
    Bucket string

    // Name of the object.
    Object string

    // Upload ID identifying the multipart upload whose parts are being listed.
    UploadID string

    // The class of storage used to store the object.
    StorageClass string

    // Part number after which listing begins.
    PartNumberMarker int

    // When a list is truncated, this element specifies the last part in the list,
    // as well as the value to use for the part-number-marker request parameter
    // in a subsequent request.
    NextPartNumberMarker int

    // Maximum number of parts that were allowed in the response.
    MaxParts int

    // Indicates whether the returned list of parts is truncated.
    IsTruncated bool

    // List of all parts.
    Parts []PartInfo

    // Any metadata set during InitMultipartUpload, including encryption headers.
    UserDefined map[string]string

    EncodingType string // Not supported yet.
}

ListPartsInfo - represents list of all parts.

func FromMinioClientListPartsInfo Uses

func FromMinioClientListPartsInfo(lopr minio.ListObjectPartsResult) ListPartsInfo

FromMinioClientListPartsInfo converts minio ListObjectPartsResult to ListPartsInfo

type ListPartsResponse Uses

type ListPartsResponse struct {
    XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListPartsResult" json:"-"`

    Bucket   string
    Key      string
    UploadID string `xml:"UploadId"`

    Initiator Initiator
    Owner     Owner

    // The class of storage used to store the object.
    StorageClass string

    PartNumberMarker     int
    NextPartNumberMarker int
    MaxParts             int
    IsTruncated          bool

    // List of parts.
    Parts []Part `xml:"Part"`
}

ListPartsResponse - format for list parts response.

type ListenBucketNotificationArgs Uses

type ListenBucketNotificationArgs struct {
    AuthArgs   `json:"-"`
    BucketName string         `json:"-"`
    EventNames []event.Name   `json:"eventNames"`
    Pattern    string         `json:"pattern"`
    TargetID   event.TargetID `json:"targetId"`
    Addr       xnet.Host      `json:"addr"`
}

ListenBucketNotificationArgs - listen bucket notification RPC arguments.

type LocationResponse Uses

type LocationResponse struct {
    XMLName  xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LocationConstraint" json:"-"`
    Location string   `xml:",chardata"`
}

LocationResponse - format for location response.

type LockArgs Uses

type LockArgs struct {
    AuthArgs
    LockArgs dsync.LockArgs
}

LockArgs represents arguments for any authenticated lock RPC call.

type LockRPCClient Uses

type LockRPCClient struct {
    *RPCClient
}

LockRPCClient is authenticable lock RPC client compatible to dsync.NetLocker

func NewLockRPCClient Uses

func NewLockRPCClient(host *xnet.Host) (*LockRPCClient, error)

NewLockRPCClient - returns new lock RPC client.

func (*LockRPCClient) Expired Uses

func (lockRPC *LockRPCClient) Expired(args dsync.LockArgs) (reply bool, err error)

Expired calls expired RPC.

func (*LockRPCClient) ForceUnlock Uses

func (lockRPC *LockRPCClient) ForceUnlock(args dsync.LockArgs) (reply bool, err error)

ForceUnlock calls force unlock RPC.

func (*LockRPCClient) Lock Uses

func (lockRPC *LockRPCClient) Lock(args dsync.LockArgs) (reply bool, err error)

Lock calls write lock RPC.

func (*LockRPCClient) RLock Uses

func (lockRPC *LockRPCClient) RLock(args dsync.LockArgs) (reply bool, err error)

RLock calls read lock RPC.

func (*LockRPCClient) RUnlock Uses

func (lockRPC *LockRPCClient) RUnlock(args dsync.LockArgs) (reply bool, err error)

RUnlock calls read unlock RPC.

func (*LockRPCClient) ServerAddr Uses

func (lockRPC *LockRPCClient) ServerAddr() string

ServerAddr - dsync.NetLocker interface compatible method.

func (*LockRPCClient) ServiceEndpoint Uses

func (lockRPC *LockRPCClient) ServiceEndpoint() string

ServiceEndpoint - dsync.NetLocker interface compatible method.

func (*LockRPCClient) Unlock Uses

func (lockRPC *LockRPCClient) Unlock(args dsync.LockArgs) (reply bool, err error)

Unlock calls write unlock RPC.

type LockType Uses

type LockType int

LockType represents required locking for ObjectLayer operations

type LoginArgs Uses

type LoginArgs struct {
    Username string `json:"username" form:"username"`
    Password string `json:"password" form:"password"`
}

LoginArgs - login arguments.

type LoginRep Uses

type LoginRep struct {
    Token     string `json:"token"`
    UIVersion string `json:"uiVersion"`
}

LoginRep - login reply.

type MakeBucketArgs Uses

type MakeBucketArgs struct {
    BucketName string `json:"bucketName"`
}

MakeBucketArgs - make bucket args.

type MalformedUploadID Uses

type MalformedUploadID struct {
    UploadID string
}

MalformedUploadID malformed upload id.

func (MalformedUploadID) Error Uses

func (e MalformedUploadID) Error() string

type MemoryPolicySys Uses

type MemoryPolicySys struct {
    // contains filtered or unexported fields
}

PolicySys - policy subsystem.

func NewMemoryPolicySys Uses

func NewMemoryPolicySys() *MemoryPolicySys

NewPolicySys - creates new policy system.

func (*MemoryPolicySys) Init Uses

func (sys *MemoryPolicySys) Init(objAPI ObjectLayer) error

Init - initializes policy system from policy.json of all buckets.

func (*MemoryPolicySys) IsAllowed Uses

func (sys *MemoryPolicySys) IsAllowed(args policy.Args) bool

IsAllowed - checks given policy args is allowed to continue the Rest API.

func (*MemoryPolicySys) Remove Uses

func (sys *MemoryPolicySys) Remove(bucketName string)

Remove - removes policy for given bucket name.

func (*MemoryPolicySys) Set Uses

func (sys *MemoryPolicySys) Set(bucketName string, policy policy.Policy)

Set - sets policy to given bucket name. If policy is empty, existing policy is removed.

type MultipartInfo Uses

type MultipartInfo struct {
    // Object name for which the multipart upload was initiated.
    Object string

    // Unique identifier for this multipart upload.
    UploadID string

    // Date and time at which the multipart upload was initiated.
    Initiated time.Time

    StorageClass string // Not supported yet.
}

MultipartInfo - represents metadata in progress multipart upload.

type NotImplemented Uses

type NotImplemented struct{}

NotImplemented If a feature is not implemented

func (NotImplemented) Error Uses

func (e NotImplemented) Error() string

type NotificationPeerErr Uses

type NotificationPeerErr struct {
    Host xnet.Host // Remote host on which the rpc call was initiated
    Err  error     // Error returned by the remote peer for an rpc call
}

NotificationPeerErr returns error associated for a remote peer.

type NotificationSys Uses

type NotificationSys struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

NotificationSys - notification system.

func NewNotificationSys Uses

func NewNotificationSys(config *serverConfig, endpoints EndpointList) *NotificationSys

NewNotificationSys - creates new notification system object.

func (*NotificationSys) AddRemoteTarget Uses

func (sys *NotificationSys) AddRemoteTarget(bucketName string, target event.Target, rulesMap event.RulesMap) error

AddRemoteTarget - adds event rules map, HTTP/PeerRPC client target to bucket name.

func (*NotificationSys) AddRulesMap Uses

func (sys *NotificationSys) AddRulesMap(bucketName string, rulesMap event.RulesMap)

AddRulesMap - adds rules map for bucket name.

func (*NotificationSys) DeleteBucket Uses

func (sys *NotificationSys) DeleteBucket(ctx context.Context, bucketName string)

DeleteBucket - calls DeleteBucket RPC call on all peers.

func (*NotificationSys) GetARNList Uses

func (sys *NotificationSys) GetARNList() []string

GetARNList - returns available ARNs.

func (*NotificationSys) GetPeerRPCClient Uses

func (sys *NotificationSys) GetPeerRPCClient(addr xnet.Host) *PeerRPCClient

GetPeerRPCClient - returns PeerRPCClient of addr.

func (*NotificationSys) Init Uses

func (sys *NotificationSys) Init(objAPI ObjectLayer) error

Init - initializes notification system from notification.xml and listener.json of all buckets.

func (*NotificationSys) ListenBucketNotification Uses

func (sys *NotificationSys) ListenBucketNotification(ctx context.Context, bucketName string, eventNames []event.Name, pattern string,
    targetID event.TargetID, localPeer xnet.Host)

ListenBucketNotification - calls ListenBucketNotification RPC call on all peers.

func (*NotificationSys) LoadCredentials Uses

func (sys *NotificationSys) LoadCredentials() map[xnet.Host]error

LoadCredentials - calls LoadCredentials RPC call on all peers.

func (*NotificationSys) PutBucketNotification Uses

func (sys *NotificationSys) PutBucketNotification(ctx context.Context, bucketName string, rulesMap event.RulesMap)

PutBucketNotification - calls PutBucketNotification RPC call on all peers.

func (*NotificationSys) RemoteTargetExist Uses

func (sys *NotificationSys) RemoteTargetExist(bucketName string, targetID event.TargetID) bool

RemoteTargetExist - checks whether given target ID is a HTTP/PeerRPC client target or not.

func (*NotificationSys) RemoveAllRemoteTargets Uses

func (sys *NotificationSys) RemoveAllRemoteTargets()

RemoveAllRemoteTargets - closes and removes all HTTP/PeerRPC client targets.

func (*NotificationSys) RemoveBucketPolicy Uses

func (sys *NotificationSys) RemoveBucketPolicy(ctx context.Context, bucketName string)

RemoveBucketPolicy - calls RemoveBucketPolicy RPC call on all peers.

func (*NotificationSys) RemoveNotification Uses

func (sys *NotificationSys) RemoveNotification(bucketName string)

RemoveNotification - removes all notification configuration for bucket name.

func (*NotificationSys) RemoveRemoteTarget Uses

func (sys *NotificationSys) RemoveRemoteTarget(bucketName string, targetID event.TargetID)

RemoveRemoteTarget - closes and removes target by target ID.

func (*NotificationSys) RemoveRulesMap Uses

func (sys *NotificationSys) RemoveRulesMap(bucketName string, rulesMap event.RulesMap)

RemoveRulesMap - removes rules map for bucket name.

func (*NotificationSys) Send Uses

func (sys *NotificationSys) Send(args eventArgs) []event.TargetIDErr

Send - sends event data to all matching targets.

func (*NotificationSys) SetBucketPolicy Uses

func (sys *NotificationSys) SetBucketPolicy(ctx context.Context, bucketName string, bucketPolicy *policy.Policy)

SetBucketPolicy - calls SetBucketPolicy RPC call on all peers.

type ObjReaderFn Uses

type ObjReaderFn func(inputReader io.Reader, h http.Header, cleanupFns ...func()) (r *GetObjectReader, err error)

ObjReaderFn is a function type that takes a reader and returns GetObjectReader and an error. Request headers are passed to provide encryption parameters. cleanupFns allow cleanup funcs to be registered for calling after usage of the reader.

func NewGetObjectReader Uses

func NewGetObjectReader(rs *HTTPRangeSpec, oi ObjectInfo, cleanUpFns ...func()) (
    fn ObjReaderFn, off, length int64, err error)

NewGetObjectReader creates a new GetObjectReader. The cleanUpFns are called on Close() in reverse order as passed here. NOTE: It is assumed that clean up functions do not panic (otherwise, they may not all run!).

type Object Uses

type Object struct {
    Key          string
    LastModified string // time string of format "2006-01-02T15:04:05.000Z"
    ETag         string
    Size         int64

    // Owner of the object.
    Owner Owner

    // The class of storage used to store the object.
    StorageClass string
}

Object container for object metadata

type ObjectAlreadyExists Uses

type ObjectAlreadyExists GenericError

ObjectAlreadyExists object already exists.

func (ObjectAlreadyExists) Error Uses

func (e ObjectAlreadyExists) Error() string

type ObjectExistsAsDirectory Uses

type ObjectExistsAsDirectory GenericError

ObjectExistsAsDirectory object already exists as a directory.

func (ObjectExistsAsDirectory) Error Uses

func (e ObjectExistsAsDirectory) Error() string

type ObjectIdentifier Uses

type ObjectIdentifier struct {
    ObjectName string `xml:"Key"`
}

ObjectIdentifier carries key name for the object to delete.

type ObjectInfo Uses

type ObjectInfo struct {
    // Name of the bucket.
    Bucket string

    // Name of the object.
    Name string

    // Date and time when the object was last modified.
    ModTime time.Time

    // Total object size.
    Size int64

    // IsDir indicates if the object is prefix.
    IsDir bool

    // Hex encoded unique entity tag of the object.
    ETag string

    // A standard MIME type describing the format of the object.
    ContentType string

    // Specifies what content encodings have been applied to the object and thus
    // what decoding mechanisms must be applied to obtain the object referenced
    // by the Content-Type header field.
    ContentEncoding string

    // Specify object storage class
    StorageClass string

    // User-Defined metadata
    UserDefined map[string]string

    // List of individual parts, maximum size of upto 10,000
    Parts []objectPartInfo `json:"-"`

    // Implements writer and reader used by CopyObject API
    Writer io.WriteCloser `json:"-"`
    Reader *hash.Reader   `json:"-"`

    // Date and time when the object was last accessed.
    AccTime time.Time

    // Support for versioning
    VersionID string
    // contains filtered or unexported fields
}

ObjectInfo - represents object metadata.

func FromMinioClientObjectInfo Uses

func FromMinioClientObjectInfo(bucket string, oi minio.ObjectInfo) ObjectInfo

FromMinioClientObjectInfo converts minio ObjectInfo to gateway ObjectInfo

func (*ObjectInfo) DecryptedSize Uses

func (o *ObjectInfo) DecryptedSize() (int64, error)

DecryptedSize returns the size of the object after decryption in bytes. It returns an error if the object is not encrypted or marked as encrypted but has an invalid size.

func (*ObjectInfo) EncryptedSize Uses

func (o *ObjectInfo) EncryptedSize() int64

EncryptedSize returns the size of the object after encryption. An encrypted object is always larger than a plain object except for zero size objects.

func (ObjectInfo) GetActualSize Uses

func (o ObjectInfo) GetActualSize() int64

GetActualSize - read the decompressed size from the meta json.

func (*ObjectInfo) GetDecryptedRange Uses

func (o *ObjectInfo) GetDecryptedRange(rs *HTTPRangeSpec) (encOff, encLength, skipLen int64, seqNumber uint32, partStart int, err error)

GetDecryptedRange - To decrypt the range (off, length) of the decrypted object stream, we need to read the range (encOff, encLength) of the encrypted object stream to decrypt it, and compute skipLen, the number of bytes to skip in the beginning of the encrypted range.

In addition we also compute the object part number for where the requested range starts, along with the DARE sequence number within that part. For single part objects, the partStart will be 0.

func (ObjectInfo) IsCacheable Uses

func (o ObjectInfo) IsCacheable() bool

IsCacheable returns if the object should be saved in the cache.

func (ObjectInfo) IsCompressed Uses

func (o ObjectInfo) IsCompressed() bool

IsCompressed returns true if the object is marked as compressed.

type ObjectLayer Uses

type ObjectLayer interface {
    // Storage operations.
    Shutdown(context.Context) error
    StorageInfo(context.Context) StorageInfo

    // Bucket operations.
    MakeBucketWithLocation(ctx context.Context, bucket string, location string) error
    GetBucketInfo(ctx context.Context, bucket string) (bucketInfo BucketInfo, err error)
    ListBuckets(ctx context.Context) (buckets []BucketInfo, err error)
    DeleteBucket(ctx context.Context, bucket string) error
    ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (result ListObjectsInfo, err error)
    ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error)

    // GetObjectNInfo returns a GetObjectReader that satisfies the
    // ReadCloser interface. The Close method unlocks the object
    // after reading, so it must always be called after usage.
    //
    // IMPORTANTLY, when implementations return err != nil, this
    // function MUST NOT return a non-nil ReadCloser.
    GetObjectNInfo(ctx context.Context, bucket, object string, rs *HTTPRangeSpec, h http.Header, lockType LockType, opts ObjectOptions) (reader *GetObjectReader, err error)
    GetObject(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions) (err error)
    GetObjectInfo(ctx context.Context, bucket, object string, opts ObjectOptions) (objInfo ObjectInfo, err error)
    PutObject(ctx context.Context, bucket, object string, data *hash.Reader, metadata map[string]string, opts ObjectOptions) (objInfo ObjectInfo, err error)
    CopyObject(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (objInfo ObjectInfo, err error)
    DeleteObject(ctx context.Context, bucket, object string) error

    // Multipart operations.
    ListMultipartUploads(ctx context.Context, bucket, prefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (result ListMultipartsInfo, err error)
    NewMultipartUpload(ctx context.Context, bucket, object string, metadata map[string]string, opts ObjectOptions) (uploadID string, err error)
    CopyObjectPart(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, uploadID string, partID int,
        startOffset int64, length int64, srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (info PartInfo, err error)
    PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *hash.Reader, opts ObjectOptions) (info PartInfo, err error)
    ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker int, maxParts int) (result ListPartsInfo, err error)
    AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error
    CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, uploadedParts []CompletePart) (objInfo ObjectInfo, err error)

    // Healing operations.
    ReloadFormat(ctx context.Context, dryRun bool) error
    HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)
    HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error)
    HealObject(ctx context.Context, bucket, object string, dryRun bool) (madmin.HealResultItem, error)
    ListBucketsHeal(ctx context.Context) (buckets []BucketInfo, err error)
    ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, error)

    // Policy operations
    SetBucketPolicy(context.Context, string, *policy.Policy) error
    GetBucketPolicy(context.Context, string) (*policy.Policy, error)
    DeleteBucketPolicy(context.Context, string) error

    // Supported operations check
    IsNotificationSupported() bool
    IsEncryptionSupported() bool

    // Compression support check.
    IsCompressionSupported() bool
}

ObjectLayer implements primitives for object API layer.

func NewFSObjectLayer Uses

func NewFSObjectLayer(fsPath string) (ObjectLayer, error)

NewFSObjectLayer - initialize new fs object layer.

type ObjectNameInvalid Uses

type ObjectNameInvalid GenericError

ObjectNameInvalid - object name provided is invalid.

func (ObjectNameInvalid) Error Uses

func (e ObjectNameInvalid) Error() string

Return string an error formatted as the given text.

type ObjectNotFound Uses

type ObjectNotFound GenericError

ObjectNotFound object does not exist.

func (ObjectNotFound) Error Uses

func (e ObjectNotFound) Error() string

type ObjectOptions Uses

type ObjectOptions struct {
    ServerSideEncryption encrypt.ServerSide
    VersionID            string
}

ObjectOptions represents object options for ObjectLayer operations

type ObjectTooLarge Uses

type ObjectTooLarge GenericError

ObjectTooLarge error returned when the size of the object > max object size allowed (5G) per request.

func (ObjectTooLarge) Error Uses

func (e ObjectTooLarge) Error() string

type ObjectTooSmall Uses

type ObjectTooSmall GenericError

ObjectTooSmall error returned when the size of the object < what is expected.

func (ObjectTooSmall) Error Uses

func (e ObjectTooSmall) Error() string

type OperationTimedOut Uses

type OperationTimedOut struct {
    Path string
}

OperationTimedOut - a timeout occurred.

func (OperationTimedOut) Error Uses

func (e OperationTimedOut) Error() string

type Owner Uses

type Owner struct {
    ID          string
    DisplayName string
}

Owner - bucket owner/principal

type Part Uses

type Part struct {
    PartNumber   int
    LastModified string
    ETag         string
    Size         int64
}

Part container for part metadata.

type PartInfo Uses

type PartInfo struct {
    // Part number that identifies the part. This is a positive integer between
    // 1 and 10,000.
    PartNumber int

    // Date and time at which the part was uploaded.
    LastModified time.Time

    // Entity tag returned when the part was initially uploaded.
    ETag string

    // Size in bytes of the part.
    Size int64

    // Decompressed Size.
    ActualSize int64
}

PartInfo - represents individual part metadata.

func FromMinioClientObjectPart Uses

func FromMinioClientObjectPart(op minio.ObjectPart) PartInfo

FromMinioClientObjectPart converts minio ObjectPart to PartInfo

type PartTooBig Uses

type PartTooBig struct{}

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

func (PartTooBig) Error Uses

func (e PartTooBig) Error() string

type PartTooSmall Uses

type PartTooSmall struct {
    PartSize   int64
    PartNumber int
    PartETag   string
}

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

func (PartTooSmall) Error Uses

func (e PartTooSmall) Error() string

type PeerRPCClient Uses

type PeerRPCClient struct {
    *RPCClient
}

PeerRPCClient - peer RPC client talks to peer RPC server.

func NewPeerRPCClient Uses

func NewPeerRPCClient(host *xnet.Host) (*PeerRPCClient, error)

NewPeerRPCClient - returns new peer RPC client.

func (*PeerRPCClient) DeleteBucket Uses

func (rpcClient *PeerRPCClient) DeleteBucket(bucketName string) error

DeleteBucket - calls delete bucket RPC.

func (*PeerRPCClient) ListenBucketNotification Uses

func (rpcClient *PeerRPCClient) ListenBucketNotification(bucketName string, eventNames []event.Name,
    pattern string, targetID event.TargetID, addr xnet.Host) error

ListenBucketNotification - calls listen bucket notification RPC.

func (*PeerRPCClient) LoadCredentials Uses

func (rpcClient *PeerRPCClient) LoadCredentials() error

LoadCredentials - calls load credentials RPC.

func (*PeerRPCClient) PutBucketNotification Uses

func (rpcClient *PeerRPCClient) PutBucketNotification(bucketName string, rulesMap event.RulesMap) error

PutBucketNotification - calls put bukcet notification RPC.

func (*PeerRPCClient) RemoteTargetExist Uses

func (rpcClient *PeerRPCClient) RemoteTargetExist(bucketName string, targetID event.TargetID) (bool, error)

RemoteTargetExist - calls remote target ID exist RPC.

func (*PeerRPCClient) RemoveBucketPolicy Uses

func (rpcClient *PeerRPCClient) RemoveBucketPolicy(bucketName string) error

RemoveBucketPolicy - calls remove bucket policy RPC.

func (*PeerRPCClient) SendEvent Uses

func (rpcClient *PeerRPCClient) SendEvent(bucketName string, targetID, remoteTargetID event.TargetID, eventData event.Event) error

SendEvent - calls send event RPC.

func (*PeerRPCClient) SetBucketPolicy Uses

func (rpcClient *PeerRPCClient) SetBucketPolicy(bucketName string, bucketPolicy *policy.Policy) error

SetBucketPolicy - calls set bucket policy RPC.

type PeerRPCClientTarget Uses

type PeerRPCClientTarget struct {
    // contains filtered or unexported fields
}

PeerRPCClientTarget - RPCClient is an event.Target which sends event to target of remote peer.

func NewPeerRPCClientTarget Uses

func NewPeerRPCClientTarget(bucketName string, targetID event.TargetID, rpcClient *PeerRPCClient) *PeerRPCClientTarget

NewPeerRPCClientTarget - creates RPCClient target with given target ID available in remote peer.

func (*PeerRPCClientTarget) Close Uses

func (target *PeerRPCClientTarget) Close() error

Close - does nothing and available for interface compatibility.

func (*PeerRPCClientTarget) ID Uses

func (target *PeerRPCClientTarget) ID() event.TargetID

ID - returns target ID.

func (*PeerRPCClientTarget) Send Uses

func (target *PeerRPCClientTarget) Send(eventData event.Event) error

Send - sends event to remote peer by making RPC call.

type PolicyNesting Uses

type PolicyNesting struct{}

PolicyNesting - policy nesting conflict.

func (PolicyNesting) Error Uses

func (e PolicyNesting) Error() string

type PolicySys Uses

type PolicySys struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

PolicySys - policy subsystem.

func NewPolicySys Uses

func NewPolicySys() *PolicySys

NewPolicySys - creates new policy system.

func (*PolicySys) Init Uses

func (sys *PolicySys) Init(objAPI ObjectLayer) error

Init - initializes policy system from policy.json of all buckets.

func (*PolicySys) IsAllowed Uses

func (sys *PolicySys) IsAllowed(args policy.Args) bool

IsAllowed - checks given policy args is allowed to continue the Rest API.

func (*PolicySys) Remove Uses

func (sys *PolicySys) Remove(bucketName string)

Remove - removes policy for given bucket name.

func (*PolicySys) Set Uses

func (sys *PolicySys) Set(bucketName string, policy policy.Policy)

Set - sets policy to given bucket name. If policy is empty, existing policy is removed.

type PolicySysProvider Uses

type PolicySysProvider interface {
    Set(bucketName string, policy policy.Policy)
    Remove(bucketName string)
    IsAllowed(args policy.Args) bool
    Init(objAPI ObjectLayer) error
}

type PostPolicyForm Uses

type PostPolicyForm struct {
    Expiration time.Time // Expiration date and time of the POST policy.
    Conditions struct {
        Policies map[string]struct {
            Operator string
            Value    string
        }
        ContentLengthRange contentLengthRange
    }
}

PostPolicyForm provides strict static type conversion and validation for Amazon S3's POST policy JSON string.

type PostResponse Uses

type PostResponse struct {
    Bucket   string
    Key      string
    ETag     string
    Location string
}

PostResponse container for POST object request when success_action_status is set to 201

type PrefixAccessDenied Uses

type PrefixAccessDenied GenericError

PrefixAccessDenied object access is denied.

func (PrefixAccessDenied) Error Uses

func (e PrefixAccessDenied) Error() string

type PresignedGetArgs Uses

type PresignedGetArgs struct {
    // Host header required for signed headers.
    HostName string `json:"host"`

    // Bucket name of the object to be presigned.
    BucketName string `json:"bucket"`

    // Object name to be presigned.
    ObjectName string `json:"object"`

    // Expiry in seconds.
    Expiry int64 `json:"expiry"`
}

PresignedGetArgs - presigned-get API args.

type PresignedGetRep Uses

type PresignedGetRep struct {
    UIVersion string `json:"uiVersion"`
    // Presigned URL of the object.
    URL string `json:"url"`
}

PresignedGetRep - presigned-get URL reply.

type PutBucketNotificationArgs Uses

type PutBucketNotificationArgs struct {
    AuthArgs
    BucketName string
    RulesMap   event.RulesMap
}

PutBucketNotificationArgs - put bucket notification RPC arguments.

type RPCClient Uses

type RPCClient struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

RPCClient - base RPC client.

func NewRPCClient Uses

func NewRPCClient(args RPCClientArgs) (*RPCClient, error)

NewRPCClient - returns new RPC client.

func (*RPCClient) Call Uses

func (client *RPCClient) Call(serviceMethod string, args interface {
    SetAuthArgs(args AuthArgs)
}, reply interface{}) (err error)

Call - calls servicemethod on remote server.

func (*RPCClient) Close Uses

func (client *RPCClient) Close() error

Close - closes underneath RPC client.

func (*RPCClient) ServiceURL Uses

func (client *RPCClient) ServiceURL() *xnet.URL

ServiceURL - returns service URL used for RPC call.

type RPCClientArgs Uses

type RPCClientArgs struct {
    NewAuthTokenFunc func() string
    RPCVersion       RPCVersion
    ServiceName      string
    ServiceURL       *xnet.URL
    TLSConfig        *tls.Config
}

RPCClientArgs - RPC client arguments.

type RPCVersion Uses

type RPCVersion struct {
    Major uint64
    Minor uint64
    Patch uint64
}

RPCVersion - RPC semantic version based on semver 2.0.0 https://semver.org/.

func (RPCVersion) Compare Uses

func (v RPCVersion) Compare(o RPCVersion) int

Compare - compares given version with this version.

func (RPCVersion) String Uses

func (v RPCVersion) String() string

type RWLocker Uses

type RWLocker interface {
    GetLock(timeout *dynamicTimeout) (timedOutErr error)
    Unlock()
    GetRLock(timeout *dynamicTimeout) (timedOutErr error)
    RUnlock()
}

RWLocker - locker interface to introduce GetRLock, RUnlock.

type RWLockerSync Uses

type RWLockerSync interface {
    GetLock(timeout time.Duration) bool
    Unlock()
    GetRLock(timeout time.Duration) bool
    RUnlock()
}

RWLockerSync - internal locker interface.

type ReInitFormatArgs Uses

type ReInitFormatArgs struct {
    AuthArgs
    DryRun bool
}

ReInitFormatArgs - provides dry-run information to re-initialize format.json

type RemoteTargetExistArgs Uses

type RemoteTargetExistArgs struct {
    AuthArgs
    BucketName string
    TargetID   event.TargetID
}

RemoteTargetExistArgs - remote target ID exist RPC arguments.

type RemoveBucketArgs Uses

type RemoveBucketArgs struct {
    BucketName string `json:"bucketName"`
}

RemoveBucketArgs - remove bucket args.

type RemoveBucketPolicyArgs Uses

type RemoveBucketPolicyArgs struct {
    AuthArgs
    BucketName string
}

RemoveBucketPolicyArgs - delete bucket policy RPC arguments.

type RemoveObjectArgs Uses

type RemoveObjectArgs struct {
    Objects    []string `json:"objects"`    // Contains objects, prefixes.
    BucketName string   `json:"bucketname"` // Contains bucket name.
}

RemoveObjectArgs - args to remove an object, JSON will look like.

{

"bucketname": "testbucket",
"objects": [
    "photos/hawaii/",
    "photos/maldives/",
    "photos/sanjose.jpg"
]

}

type STSError Uses

type STSError struct {
    Code           string
    Description    string
    HTTPStatusCode int
}

STSError structure

type STSErrorCode Uses

type STSErrorCode int

STSErrorCode type of error status.

const (
    ErrSTSNone STSErrorCode = iota
    ErrSTSMissingParameter
    ErrSTSInvalidParameterValue
    ErrSTSClientGrantsExpiredToken
    ErrSTSInvalidClientGrantsToken
    ErrSTSMalformedPolicyDocument
    ErrSTSNotInitialized
    ErrSTSInternalError
)

Error codes, non exhaustive list - http://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithSAML.html

type STSErrorResponse Uses

type STSErrorResponse struct {
    XMLName xml.Name `xml:"https://sts.amazonaws.com/doc/2011-06-15/ ErrorResponse" json:"-"`
    Error   struct {
        Type    string `xml:"Type"`
        Code    string `xml:"Code"`
        Message string `xml:"Message"`
    }   `xml:"Error"`
    RequestID string `xml:"RequestId"`
}

STSErrorResponse - error response format

type SendEventArgs Uses

type SendEventArgs struct {
    AuthArgs
    Event      event.Event
    TargetID   event.TargetID
    BucketName string
}

SendEventArgs - send event RPC arguments.

type ServerConnStats Uses

type ServerConnStats struct {
    TotalInputBytes  uint64 `json:"transferred"`
    TotalOutputBytes uint64 `json:"received"`
    Throughput       uint64 `json:"throughput,omitempty"`
}

ServerConnStats holds transferred bytes from/to the server

type ServerHTTPMethodStats Uses

type ServerHTTPMethodStats struct {
    Count       uint64 `json:"count"`
    AvgDuration string `json:"avgDuration"`
}

ServerHTTPMethodStats holds total number of HTTP operations from/to the server, including the average duration the call was spent.

type ServerHTTPStats Uses

type ServerHTTPStats struct {
    TotalHEADStats     ServerHTTPMethodStats `json:"totalHEADs"`
    SuccessHEADStats   ServerHTTPMethodStats `json:"successHEADs"`
    TotalGETStats      ServerHTTPMethodStats `json:"totalGETs"`
    SuccessGETStats    ServerHTTPMethodStats `json:"successGETs"`
    TotalPUTStats      ServerHTTPMethodStats `json:"totalPUTs"`
    SuccessPUTStats    ServerHTTPMethodStats `json:"successPUTs"`
    TotalPOSTStats     ServerHTTPMethodStats `json:"totalPOSTs"`
    SuccessPOSTStats   ServerHTTPMethodStats `json:"successPOSTs"`
    TotalDELETEStats   ServerHTTPMethodStats `json:"totalDELETEs"`
    SuccessDELETEStats ServerHTTPMethodStats `json:"successDELETEs"`
}

ServerHTTPStats holds all type of http operations performed to/from the server including their average execution time.

type ServerInfo Uses

type ServerInfo struct {
    Error string          `json:"error"`
    Addr  string          `json:"addr"`
    Data  *ServerInfoData `json:"data"`
}

ServerInfo holds server information result of one node

type ServerInfoData Uses

type ServerInfoData struct {
    StorageInfo StorageInfo      `json:"storage"`
    ConnStats   ServerConnStats  `json:"network"`
    HTTPStats   ServerHTTPStats  `json:"http"`
    Properties  ServerProperties `json:"server"`
}

ServerInfoData holds storage, connections and other information of a given server.

type ServerInfoRep Uses

type ServerInfoRep struct {
    MinioVersion    string
    MinioMemory     string
    MinioPlatform   string
    MinioRuntime    string
    MinioGlobalInfo map[string]interface{}
    UIVersion       string `json:"uiVersion"`
}

ServerInfoRep - server info reply.

type ServerProperties Uses

type ServerProperties struct {
    Uptime   time.Duration `json:"uptime"`
    Version  string        `json:"version"`
    CommitID string        `json:"commitID"`
    Region   string        `json:"region"`
    SQSARN   []string      `json:"sqsARN"`
}

ServerProperties holds some server information such as, version, region uptime, etc..

type SetAuthArgs Uses

type SetAuthArgs struct {
    AccessKey string `json:"accessKey"`
    SecretKey string `json:"secretKey"`
}

SetAuthArgs - argument for SetAuth

type SetAuthReply Uses

type SetAuthReply struct {
    Token       string            `json:"token"`
    UIVersion   string            `json:"uiVersion"`
    PeerErrMsgs map[string]string `json:"peerErrMsgs"`
}

SetAuthReply - reply for SetAuth

type SetBucketPolicyArgs Uses

type SetBucketPolicyArgs struct {
    AuthArgs
    BucketName string
    Policy     policy.Policy
}

SetBucketPolicyArgs - set bucket policy RPC arguments.

type SetBucketPolicyWebArgs Uses

type SetBucketPolicyWebArgs struct {
    BucketName string `json:"bucketName"`
    Prefix     string `json:"prefix"`
    Policy     string `json:"policy"`
}

SetBucketPolicyWebArgs - set bucket policy args.

type SetupType Uses

type SetupType int

SetupType - enum for setup type.

const (
    // FSSetupType - FS setup type enum.
    FSSetupType SetupType = iota + 1

    // XLSetupType - XL setup type enum.
    XLSetupType

    // DistXLSetupType - Distributed XL setup type enum.
    DistXLSetupType
)

func (SetupType) String Uses

func (setupType SetupType) String() string

type SignalServiceArgs Uses

type SignalServiceArgs struct {
    AuthArgs
    Sig serviceSignal
}

SignalServiceArgs - provides the signal argument to SignalService RPC

type SignatureDoesNotMatch Uses

type SignatureDoesNotMatch struct{}

SignatureDoesNotMatch - when content md5 does not match with what was sent from client.

func (SignatureDoesNotMatch) Error Uses

func (e SignatureDoesNotMatch) Error() string

type StartProfilingArgs Uses

type StartProfilingArgs struct {
    AuthArgs
    Profiler string
}

StartProfilingArgs - holds the RPC argument for StartingProfiling RPC call

type StartProfilingResult Uses

type StartProfilingResult struct {
    NodeName string `json:"nodeName"`
    Success  bool   `json:"success"`
    Error    string `json:"error"`
}

StartProfilingResult contains the status of the starting profiling action in a given server

type StorageAPI Uses

type StorageAPI interface {
    // Stringified version of disk.
    String() string

    // Storage operations.
    IsOnline() bool // Returns true if disk is online.
    LastError() error
    Close() error

    DiskInfo() (info DiskInfo, err error)

    // Volume operations.
    MakeVol(volume string) (err error)
    ListVols() (vols []VolInfo, err error)
    StatVol(volume string) (vol VolInfo, err error)
    DeleteVol(volume string) (err error)

    // File operations.
    ListDir(volume, dirPath string, count int) ([]string, error)
    ReadFile(volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error)
    PrepareFile(volume string, path string, len int64) (err error)
    AppendFile(volume string, path string, buf []byte) (err error)
    RenameFile(srcVolume, srcPath, dstVolume, dstPath string) error
    StatFile(volume string, path string) (file FileInfo, err error)
    DeleteFile(volume string, path string) (err error)

    // Read all.
    ReadAll(volume string, path string) (buf []byte, err error)
}

StorageAPI interface.

var OfflineDisk StorageAPI // zero value is nil

OfflineDisk represents an unavailable disk.

type StorageFull Uses

type StorageFull struct{}

StorageFull storage ran out of space.

func (StorageFull) Error Uses

func (e StorageFull) Error() string

type StorageInfo Uses

type StorageInfo struct {
    Used uint64 // Used total used per tenant.

    // Backend type.
    Backend struct {
        // Represents various backend types, currently on FS and Erasure.
        Type BackendType

        // Following fields are only meaningful if BackendType is Erasure.
        OnlineDisks      int // Online disks during server startup.
        OfflineDisks     int // Offline disks during server startup.
        StandardSCData   int // Data disks for currently configured Standard storage class.
        StandardSCParity int // Parity disks for currently configured Standard storage class.
        RRSCData         int // Data disks for currently configured Reduced Redundancy storage class.
        RRSCParity       int // Parity disks for currently configured Reduced Redundancy storage class.

        // List of all disk status, this is only meaningful if BackendType is Erasure.
        Sets [][]madmin.DriveInfo
    }
}

StorageInfo - represents total capacity of underlying storage.

type StorageInfoRep Uses

type StorageInfoRep struct {
    StorageInfo StorageInfo `json:"storageInfo"`
    UIVersion   string      `json:"uiVersion"`
}

StorageInfoRep - contains storage usage statistics.

type URLTokenReply Uses

type URLTokenReply struct {
    Token     string `json:"token"`
    UIVersion string `json:"uiVersion"`
}

URLTokenReply contains the reply for CreateURLToken.

type UnsupportedDelimiter Uses

type UnsupportedDelimiter struct {
    Delimiter string
}

UnsupportedDelimiter - unsupported delimiter.

func (UnsupportedDelimiter) Error Uses

func (e UnsupportedDelimiter) Error() string

type UnsupportedMetadata Uses

type UnsupportedMetadata struct{}

UnsupportedMetadata - unsupported metadata

func (UnsupportedMetadata) Error Uses

func (e UnsupportedMetadata) Error() string

type Upload Uses

type Upload struct {
    Key          string
    UploadID     string `xml:"UploadId"`
    Initiator    Initiator
    Owner        Owner
    StorageClass string
    Initiated    string
}

Upload container for in progress multipart upload

type VoidReply Uses

type VoidReply struct{}

VoidReply - void (empty) RPC reply.

type VolInfo Uses

type VolInfo struct {
    // Name of the volume.
    Name string

    // Date and time when the volume was created.
    Created time.Time
}

VolInfo - represents volume stat information.

type WebBucketInfo Uses

type WebBucketInfo struct {
    // The name of the bucket.
    Name string `json:"name"`
    // Date the bucket was created.
    CreationDate time.Time `json:"creationDate"`
}

WebBucketInfo container for list buckets metadata.

type WebGenericArgs Uses

type WebGenericArgs struct{}

WebGenericArgs - empty struct for calls that don't accept arguments for ex. ServerInfo, GenerateAuth

type WebGenericRep Uses

type WebGenericRep struct {
    UIVersion string `json:"uiVersion"`
}

WebGenericRep - reply structure for calls for which reply is success/failure for ex. RemoveObject MakeBucket

type WebObjectInfo Uses

type WebObjectInfo struct {
    // Name of the object
    Key string `json:"name"`
    // Date and time the object was last modified.
    LastModified time.Time `json:"lastModified"`
    // Size in bytes of the object.
    Size int64 `json:"size"`
    // ContentType is mime type of the object.
    ContentType string `json:"contentType"`
}

WebObjectInfo container for list objects metadata.

Directories

PathSynopsis
cryptoPackage crypto implements AWS S3 related cryptographic building blocks for implementing Server-Side-Encryption (SSE-S3) and Server-Side-Encryption with customer provided keys (SSE-C).
gateway
gateway/azure
gateway/b2
gateway/gcs
gateway/manta
gateway/nas
gateway/oss
gateway/pydio
gateway/s3
gateway/sia
http
logger
rest
rpc

Package cmd imports 132 packages (graph) and is imported by 13 packages. Updated 2019-11-01. Refresh now. Tools for package owners.