cmd

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: AGPL-3.0 Imports: 221 Imported by: 0

Documentation

Overview

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

Constants

View Source
const (
	AdminUpdateUnexpectedFailure = "XMinioAdminUpdateUnexpectedFailure"
	AdminUpdateURLNotReachable   = "XMinioAdminUpdateURLNotReachable"
	AdminUpdateApplyFailure      = "XMinioAdminUpdateApplyFailure"
)

Admin API errors

View Source
const (
	// Disabled means the lifecycle rule is inactive
	Disabled = "Disabled"
	// TransitionStatus status of transition
	TransitionStatus = "transition-status"
	// TransitionedObjectName name of transitioned object
	TransitionedObjectName = "transitioned-object"
	// TransitionedVersionID is version of remote object
	TransitionedVersionID = "transitioned-versionID"
	// TransitionTier name of transition storage class
	TransitionTier = "transition-tier"
)
View Source
const (

	// ReplicationReset has reset id and timestamp of last reset operation
	ReplicationReset = "replication-reset"
	// ReplicationStatus has internal replication status - stringified representation of target's replication status for all replication
	// activity initiated from this cluster
	ReplicationStatus = "replication-status"
	// ReplicationTimestamp - the last time replication was initiated on this cluster for this object version
	ReplicationTimestamp = "replication-timestamp"
	// ReplicaStatus - this header is present if a replica was received by this cluster for this object version
	ReplicaStatus = "replica-status"
	// ReplicaTimestamp - the last time a replica was received by this cluster for this object version
	ReplicaTimestamp = "replica-timestamp"
	// TaggingTimestamp - the last time a tag metadata modification happened on this cluster for this object version
	TaggingTimestamp = "tagging-timestamp"
	// ObjectLockRetentionTimestamp - the last time a object lock metadata modification happened on this cluster for this object version
	ObjectLockRetentionTimestamp = "objectlock-retention-timestamp"
	// ObjectLockLegalHoldTimestamp - the last time a legal hold metadata modification happened on this cluster for this object version
	ObjectLockLegalHoldTimestamp = "objectlock-legalhold-timestamp"
	// ReplicationWorkerMultiplier is suggested worker multiplier if traffic exceeds replication worker capacity
	ReplicationWorkerMultiplier = 1.5
)
View Source
const (
	ReplicateObjectAPI = "ReplicateObject"
	ReplicateDeleteAPI = "ReplicateDelete"
)

Replication specific APIName

View Source
const (
	// ReplicateQueued - replication being queued trail
	ReplicateQueued = "replicate:queue"

	// ReplicateExisting - audit trail for existing objects replication
	ReplicateExisting = "replicate:existing"
	// ReplicateExistingDelete - audit trail for delete replication triggered for existing delete markers
	ReplicateExistingDelete = "replicate:existing:delete"

	// ReplicateMRF - audit trail for replication from Most Recent Failures (MRF) queue
	ReplicateMRF = "replicate:mrf"
	// ReplicateIncoming - audit trail of inline replication
	ReplicateIncoming = "replicate:incoming"
	// ReplicateIncomingDelete - audit trail of inline replication of deletes.
	ReplicateIncomingDelete = "replicate:incoming:delete"

	// ReplicateHeal - audit trail for healing of failed/pending replications
	ReplicateHeal = "replicate:heal"
	// ReplicateHealDelete - audit trail of healing of failed/pending delete replications.
	ReplicateHealDelete = "replicate:heal:delete"
)
View Source
const (
	// WorkerMaxLimit max number of workers per node for "fast" mode
	WorkerMaxLimit = 500

	// WorkerMinLimit min number of workers per node for "slow" mode
	WorkerMinLimit = 50

	// WorkerAutoDefault is default number of workers for "auto" mode
	WorkerAutoDefault = 100

	// MRFWorkerMaxLimit max number of mrf workers per node for "fast" mode
	MRFWorkerMaxLimit = 8

	// MRFWorkerMinLimit min number of mrf workers per node for "slow" mode
	MRFWorkerMinLimit = 2

	// MRFWorkerAutoDefault is default number of mrf workers for "auto" mode
	MRFWorkerAutoDefault = 4

	// LargeWorkerCount is default number of workers assigned to large uploads ( >= 128MiB)
	LargeWorkerCount = 10
)
View Source
const (
	// ILMExpiry - audit trail for ILM expiry
	ILMExpiry = "ilm:expiry"
	// ILMFreeVersionDelete - audit trail for ILM free-version delete
	ILMFreeVersionDelete = "ilm:free-version-delete"
	// ILMTransition - audit trail for ILM transitioning.
	ILMTransition = " ilm:transition"
)
View Source
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

	// SSEDAREPackageBlockSize - SSE dare package block size.
	SSEDAREPackageBlockSize = 64 * 1024 // 64KiB bytes

	// SSEDAREPackageMetaSize - SSE dare package meta padding bytes.
	SSEDAREPackageMetaSize = 32 // 32 bytes

)
View Source
const (
	ReservedMetadataPrefix      = "X-Minio-Internal-"
	ReservedMetadataPrefixLower = "x-minio-internal-"
)

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

View Source
const (

	// GlobalStaleUploadsExpiry - Expiry duration after which the uploads in multipart,
	// tmp directory are deemed stale.
	GlobalStaleUploadsExpiry = time.Hour * 24 // 24 hrs.

	// GlobalStaleUploadsCleanupInterval - Cleanup interval when the stale uploads cleanup is initiated.
	GlobalStaleUploadsCleanupInterval = time.Hour * 6 // 6 hrs.

)
View Source
const (
	Unknown = BackendType(madmin.Unknown)
	// Filesystem backend.
	BackendFS = BackendType(madmin.FS)
	// Multi disk BackendErasure (single, distributed) backend.
	BackendErasure = BackendType(madmin.Erasure)
)

Enum for different backend types.

View Source
const (
	DefaultBitrotAlgorithm = HighwayHash256S
)

DefaultBitrotAlgorithm is the default algorithm used for bitrot protection.

View Source
const DefaultSkewTime = 15 * time.Minute

DefaultSkewTime - skew time is 15 minutes between minio peers.

View Source
const (
	EnvErasureSetDriveCount = "MINIO_ERASURE_SET_DRIVE_COUNT"
)

Override set drive count for manual distribution.

View Source
const (
	EnvPrometheusAuthType = "MINIO_PROMETHEUS_AUTH_TYPE"
)

Standard env prometheus auth type

View Source
const (
	GlobalMinioDefaultPort = "9000"
)

minio configuration related constants.

View Source
const SlashSeparator = "/"

SlashSeparator - slash separator.

View Source
const SlashSeparatorChar = '/'

SlashSeparatorChar - slash separator.

View Source
const (
	VersionPurgeStatusKey = ReservedMetadataPrefixLower + "purgestatus"
)

VersionPurgeStatusKey denotes purge status in metadata

Variables

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

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

	// Version - version time.RFC3339.
	Version = "DEVELOPMENT.GOGET"

	// ReleaseTag - release tag in TAG.%Y-%m-%dT%H-%M-%SZ.
	ReleaseTag = "DEVELOPMENT.GOGET"

	// CommitID - latest commit id.
	CommitID = "DEVELOPMENT.GOGET"

	// ShortCommitID - first 12 characters from CommitID.
	ShortCommitID = "DEVELOPMENT.GOGET"

	// CopyrightYear - dynamic value of the copyright end year
	CopyrightYear = "0000"
)

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

View Source
var GlobalContext context.Context

GlobalContext context that is canceled when server is requested to shut down.

View Source
var GlobalFlags = []cli.Flag{

	cli.StringFlag{
		Name:   "config-dir, C",
		Value:  defaultConfigDir.Get(),
		Usage:  "[DEPRECATED] path to legacy configuration directory",
		Hidden: true,
	},
	cli.StringFlag{
		Name:  "certs-dir, S",
		Value: defaultCertsDir.Get(),
		Usage: "path to certs directory",
	},
	cli.BoolFlag{
		Name:  "quiet",
		Usage: "disable startup and info messages",
	},
	cli.BoolFlag{
		Name:  "anonymous",
		Usage: "hide sensitive information from logging",
	},
	cli.BoolFlag{
		Name:  "json",
		Usage: "output logs in JSON format",
	},

	cli.BoolFlag{
		Name:   "compat",
		Usage:  "enable strict S3 compatibility by turning off certain performance optimizations",
		Hidden: true,
	},

	cli.BoolFlag{
		Name:   "no-compat",
		Usage:  "disable strict S3 compatibility by turning on certain performance optimizations",
		Hidden: true,
	},
}

GlobalFlags - global flags for minio.

View Source
var (

	// GlobalKMS initialized KMS configuration
	GlobalKMS kms.KMS
)
View Source
var ObjectsHistogramIntervals = [dataUsageBucketLen]objectHistogramInterval{
	{"LESS_THAN_1024_B", 0, humanize.KiByte - 1},
	{"BETWEEN_1024_B_AND_1_MB", humanize.KiByte, humanize.MiByte - 1},
	{"BETWEEN_1_MB_AND_10_MB", humanize.MiByte, humanize.MiByte*10 - 1},
	{"BETWEEN_10_MB_AND_64_MB", humanize.MiByte * 10, humanize.MiByte*64 - 1},
	{"BETWEEN_64_MB_AND_128_MB", humanize.MiByte * 64, humanize.MiByte*128 - 1},
	{"BETWEEN_128_MB_AND_512_MB", humanize.MiByte * 128, humanize.MiByte*512 - 1},
	{"GREATER_THAN_512_MB", humanize.MiByte * 512, math.MaxInt64},
}

ObjectsHistogramIntervals is the list of all intervals of object sizes to be included in objects histogram.

View Source
var ObjectsVersionCountIntervals = [dataUsageVersionLen]objectHistogramInterval{
	{"UNVERSIONED", 0, 0},
	{"SINGLE_VERSION", 1, 1},
	{"BETWEEN_2_AND_10", 2, 9},
	{"BETWEEN_10_AND_100", 10, 99},
	{"BETWEEN_100_AND_1000", 100, 999},
	{"BETWEEN_1000_AND_10000", 1000, 9999},
	{"GREATER_THAN_10000", 10000, math.MaxInt64},
}

ObjectsVersionCountIntervals is the list of all intervals of object version count to be included in objects histogram.

View Source
var ServerFlags = []cli.Flag{
	cli.StringFlag{
		Name:   "address",
		Value:  ":" + GlobalMinioDefaultPort,
		Usage:  "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname",
		EnvVar: "MINIO_ADDRESS",
	},
	cli.IntFlag{
		Name:   "listeners",
		Value:  1,
		Usage:  "bind N number of listeners per ADDRESS:PORT",
		EnvVar: "MINIO_LISTENERS",
		Hidden: true,
	},
	cli.StringFlag{
		Name:   "console-address",
		Usage:  "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
		EnvVar: "MINIO_CONSOLE_ADDRESS",
	},
	cli.DurationFlag{
		Name:   "shutdown-timeout",
		Value:  xhttp.DefaultShutdownTimeout,
		Usage:  "shutdown timeout to gracefully shutdown server",
		EnvVar: "MINIO_SHUTDOWN_TIMEOUT",
		Hidden: true,
	},
	cli.DurationFlag{
		Name:   "idle-timeout",
		Value:  xhttp.DefaultIdleTimeout,
		Usage:  "idle timeout is the maximum amount of time to wait for the next request when keep-alives are enabled",
		EnvVar: "MINIO_IDLE_TIMEOUT",
		Hidden: true,
	},
	cli.DurationFlag{
		Name:   "read-header-timeout",
		Value:  xhttp.DefaultReadHeaderTimeout,
		Usage:  "read header timeout is the amount of time allowed to read request headers",
		EnvVar: "MINIO_READ_HEADER_TIMEOUT",
		Hidden: true,
	},
	cli.DurationFlag{
		Name:   "conn-read-deadline",
		Usage:  "custom connection READ deadline",
		Hidden: true,
		Value:  10 * time.Minute,
		EnvVar: "MINIO_CONN_READ_DEADLINE",
	},
	cli.DurationFlag{
		Name:   "conn-write-deadline",
		Usage:  "custom connection WRITE deadline",
		Hidden: true,
		Value:  10 * time.Minute,
		EnvVar: "MINIO_CONN_WRITE_DEADLINE",
	},
	cli.DurationFlag{
		Name:   "conn-user-timeout",
		Usage:  "custom TCP_USER_TIMEOUT for socket buffers",
		Hidden: true,
		Value:  10 * time.Minute,
		EnvVar: "MINIO_CONN_USER_TIMEOUT",
	},
	cli.StringFlag{
		Name:   "interface",
		Usage:  "bind to right VRF device for MinIO services",
		Hidden: true,
		EnvVar: "MINIO_INTERFACE",
	},
	cli.DurationFlag{
		Name:   "dns-cache-ttl",
		Usage:  "custom DNS cache TTL for baremetal setups",
		Hidden: true,
		Value:  10 * time.Minute,
		EnvVar: "MINIO_DNS_CACHE_TTL",
	},
	cli.StringSliceFlag{
		Name:  "ftp",
		Usage: "enable and configure an FTP(Secure) server",
	},
	cli.StringSliceFlag{
		Name:  "sftp",
		Usage: "enable and configure an SFTP server",
	},
}

ServerFlags - server command specific flags

Functions

func Access

func Access(name string) (err error)

Access captures time taken to call syscall.Access() on windows, plan9 and solaris syscall.Access uses os.Lstat()

func AuthMiddleware

func AuthMiddleware(h http.Handler) http.Handler

AuthMiddleware checks if the bearer token is valid and authorized.

func BucketAccessPolicyToPolicy

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

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

func CheckLocalServerAddr

func CheckLocalServerAddr(serverAddr string) error

CheckLocalServerAddr - checks if serverAddr is valid and local host.

func ClusterCheckHandler

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

ClusterCheckHandler returns if the server is ready for requests.

func ClusterReadCheckHandler

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

ClusterReadCheckHandler returns if the server is ready for requests.

func Create

func Create(name string) (f *os.File, err error)

Create captures time taken to call os.Create

func CreateEndpoints

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

CreateEndpoints - validates and creates new endpoints for given args.

func CreatePoolEndpoints

func CreatePoolEndpoints(serverAddr string, poolArgs ...[][]string) ([]Endpoints, SetupType, error)

CreatePoolEndpoints creates a list of endpoints per pool, resolves their relevant hostnames and discovers those are local or remote.

func DecryptBlocksRequestR

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

DecryptBlocksRequestR - same as DecryptBlocksRequest but with a reader

func DecryptCopyRequestR

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 DecryptETag

func DecryptETag(key crypto.ObjectKey, object ObjectInfo) (string, error)

DecryptETag decrypts the ETag that is part of given object with the given object encryption key.

However, DecryptETag does not try to decrypt the ETag if it consists of a 128 bit hex value (32 hex chars) and exactly one '-' followed by a 32-bit number. This special case adresses randomly-generated ETags generated by the MinIO server when running in non-compat mode. These random ETags are not encrypt.

Calling DecryptETag with a non-randomly generated ETag will fail.

func DecryptETags

func DecryptETags(ctx context.Context, k kms.KMS, objects []ObjectInfo) error

DecryptETags decryptes the ETag of all ObjectInfos using the KMS.

It adjusts the size of all encrypted objects since encrypted objects are slightly larger due to encryption overhead. Further, it decrypts all single-part SSE-S3 encrypted objects and formats ETags of SSE-C / SSE-KMS encrypted objects to be AWS S3 compliant.

DecryptETags uses a KMS bulk decryption API, if available, which is more efficient than decrypting ETags sequentually.

func DecryptObjectInfo

func DecryptObjectInfo(info *ObjectInfo, r *http.Request) (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 DecryptRequestWithSequenceNumberR

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 EncryptRequest

func EncryptRequest(content io.Reader, r *http.Request, bucket, object string, metadata map[string]string) (io.Reader, crypto.ObjectKey, 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

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

ErrorRespToObjectError converts MinIO errors to minio object layer errors.

func Fdatasync

func Fdatasync(f *os.File) (err error)

Fdatasync captures time taken to call Fdatasync

func GenETag

func GenETag() string

GenETag - generate UUID based ETag

func GetAllSets

func GetAllSets(args ...string) ([][]string, error)

GetAllSets - parses all ellipses input arguments, expands them into corresponding list of endpoints chunked evenly in accordance with a specific set size. For example: {1...64} is divided into 4 sets each of size 16. This applies to even distributed setup syntax as well.

func GetCurrentReleaseTime

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 GetDefaultConnSettings

func GetDefaultConnSettings() xhttp.ConnSettings

GetDefaultConnSettings returns default HTTP connection settings.

func GetLocalPeer

func GetLocalPeer(endpointServerPools EndpointServerPools, host, port string) (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 GetObject

func GetObject(ctx context.Context, api ObjectLayer, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions) (err error)

GetObject - TODO(aead): This function just acts as an adapter for GetObject tests and benchmarks since the GetObject method of the ObjectLayer interface has been removed. Once, the tests are adjusted to use GetObjectNInfo this function can be removed.

func GetProxyEndpointLocalIndex

func GetProxyEndpointLocalIndex(proxyEps []ProxyEndpoint) int

GetProxyEndpointLocalIndex returns index of the local proxy endpoint

func GetTotalCapacity

func GetTotalCapacity(diskInfo []madmin.Disk) (capacity uint64)

GetTotalCapacity gets the total capacity in the cluster.

func GetTotalCapacityFree

func GetTotalCapacityFree(diskInfo []madmin.Disk) (capacity uint64)

GetTotalCapacityFree gets the total capacity free in the cluster.

func GetTotalUsableCapacity

func GetTotalUsableCapacity(diskInfo []madmin.Disk, s StorageInfo) (capacity uint64)

GetTotalUsableCapacity gets the total usable capacity in the cluster.

func GetTotalUsableCapacityFree

func GetTotalUsableCapacityFree(diskInfo []madmin.Disk, s StorageInfo) (capacity uint64)

GetTotalUsableCapacityFree gets the total usable capacity free in the cluster.

func GetVersion

func GetVersion(configFile string) (string, error)

GetVersion gets config version from backend

func HasPrefix

func HasPrefix(s string, prefix string) bool

HasPrefix - Prefix matcher string matches prefix in a platform specific way. For example on windows since its case insensitive we are supposed to do case insensitive checks.

func HasSuffix

func HasSuffix(s string, suffix string) bool

HasSuffix - Suffix matcher string matches suffix in a platform specific way. For example on windows since its case insensitive we are supposed to do case insensitive checks.

func IsBOSH

func IsBOSH() bool

IsBOSH returns true if minio is deployed from a bosh package

func IsDCOS

func IsDCOS() bool

IsDCOS returns true if minio is running in DCOS.

func IsDocker

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 https://github.com/containers/podman/blob/master/libpod/runtime.go

"/.dockerenv":        "file",
"/run/.containerenv": "file",

func IsErr

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

IsErr returns whether given error is exact error.

func IsErrIgnored

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

IsErrIgnored returns whether given error is ignored or not.

func IsKubernetes

func IsKubernetes() bool

IsKubernetes returns true if minio is running in kubernetes.

func IsPCFTile

func IsPCFTile() bool

IsPCFTile returns if server is running in PCF

func IsSourceBuild

func IsSourceBuild() bool

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

func IsValidBucketName

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

func IsValidObjectName(object string) bool

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

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

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

Rejects strings with following characters.

- Backslash ("\")

additionally minio does not support object names with trailing SlashSeparator.

func IsValidObjectPrefix

func IsValidObjectPrefix(object string) bool

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

func LivenessCheckHandler

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

LivenessCheckHandler - Checks if the process is up. Always returns success.

func Load

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

Load config from backend

func Lstat

func Lstat(name string) (info os.FileInfo, err error)

Lstat captures time taken to call os.Lstat

func Main

func Main(args []string)

Main main for minio server.

func Mkdir

func Mkdir(dirPath string, mode os.FileMode) (err error)

Mkdir captures time taken to call os.Mkdir

func MkdirAll

func MkdirAll(dirPath string, mode os.FileMode, baseDir string) (err error)

MkdirAll captures time taken to call os.MkdirAll

func MockOpenIDTestUserInteraction

func MockOpenIDTestUserInteraction(ctx context.Context, pro OpenIDClientAppParams, username, password string) (string, error)

MockOpenIDTestUserInteraction - tries to login to dex using provided credentials. It performs the user's browser interaction to login and retrieves the auth code from dex and exchanges it for a JWT.

func NewCustomHTTPProxyTransport

func NewCustomHTTPProxyTransport() func() *http.Transport

NewCustomHTTPProxyTransport is used only for proxied requests, specifically only supports HTTP/1.1

func NewFTPDriver

func NewFTPDriver() ftp.Driver

NewFTPDriver implements ftp.Driver interface

func NewHTTPTransport

func NewHTTPTransport() *http.Transport

NewHTTPTransport returns a new http configuration used while communicating with the cloud backends.

func NewHTTPTransportWithClientCerts

func NewHTTPTransportWithClientCerts(clientCert, clientKey string) *http.Transport

NewHTTPTransportWithClientCerts returns a new http configuration used while communicating with the cloud backends.

func NewHTTPTransportWithTimeout

func NewHTTPTransportWithTimeout(timeout time.Duration) *http.Transport

NewHTTPTransportWithTimeout allows setting a timeout.

func NewInternodeHTTPTransport

func NewInternodeHTTPTransport() func() http.RoundTripper

NewInternodeHTTPTransport returns a transport for internode MinIO connections.

func NewRemoteTargetHTTPTransport

func NewRemoteTargetHTTPTransport(insecure bool) func() *http.Transport

NewRemoteTargetHTTPTransport returns a new http configuration used while communicating with the remote replication targets.

func NewSFTPDriver

func NewSFTPDriver(perms *ssh.Permissions) sftp.Handlers

NewSFTPDriver initializes sftp.Handlers implementation of following interfaces

- sftp.Fileread - sftp.Filewrite - sftp.Filelist - sftp.Filecmd

func NoAuthMiddleware

func NoAuthMiddleware(h http.Handler) http.Handler

NoAuthMiddleware no auth middle ware.

func Open

func Open(name string) (f *os.File, err error)

Open captures time taken to call os.Open

func OpenFile

func OpenFile(name string, flag int, perm os.FileMode) (f *os.File, err error)

OpenFile captures time taken to call os.OpenFile

func OpenFileDirectIO

func OpenFileDirectIO(name string, flag int, perm os.FileMode) (f *os.File, err error)

OpenFileDirectIO captures time taken to call disk.OpenFileDirectIO

func ParseSSECopyCustomerRequest

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

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

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

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

PolicyToBucketAccessPolicy converts a MinIO policy into a minio-go policy data structure.

func QueueReplicationHeal

func QueueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo, retryCount int)

QueueReplicationHeal is a wrapper for queueReplicationHeal

func ReadinessCheckHandler

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

ReadinessCheckHandler Checks if the process is up. Always returns success.

func Remove

func Remove(deletePath string) (err error)

Remove captures time taken to call os.Remove

func RemoveAll

func RemoveAll(dirPath string) (err error)

RemoveAll captures time taken to call the underlying os.RemoveAll

func Rename

func Rename(src, dst string) (err error)

Rename captures time taken to call os.Rename

func Rename2

func Rename2(src, dst string) (err error)

Rename2 captures time taken to call os.Rename

func RenameSys

func RenameSys(src, dst string) (err error)

RenameSys is low level call in case of Linux this uses syscall.Rename() directly.

func ReportMetrics

func ReportMetrics(ctx context.Context, metricsGroups []*MetricsGroup) <-chan Metric

ReportMetrics reports serialized metrics to the channel passed for the metrics generated.

func Save

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

Save config file to corresponding backend

func Stat

func Stat(name string) (info os.FileInfo, err error)

Stat captures time taken to call os.Stat

func StatusCode

func StatusCode(text string) int

StatusCode returns a HTTP Status code for the HTTP text. It returns -1 if the text is unknown.

func ToS3ETag

func ToS3ETag(etag string) string

ToS3ETag - return checksum to ETag

func UTCNow

func UTCNow() time.Time

UTCNow - returns current UTC time.

Types

type APIError

type APIError struct {
	Code           string
	Description    string
	HTTPStatusCode int
}

APIError structure

type APIErrorCode

type APIErrorCode int

APIErrorCode type of error status.

const (
	ErrNone APIErrorCode = iota
	ErrAccessDenied
	ErrBadDigest
	ErrEntityTooSmall
	ErrEntityTooLarge
	ErrPolicyTooLarge
	ErrIncompleteBody
	ErrInternalError
	ErrInvalidAccessKeyID
	ErrAccessKeyDisabled
	ErrInvalidArgument
	ErrInvalidBucketName
	ErrInvalidDigest
	ErrInvalidRange
	ErrInvalidRangePartNumber
	ErrInvalidCopyPartRange
	ErrInvalidCopyPartRangeSource
	ErrInvalidMaxKeys
	ErrInvalidEncodingMethod
	ErrInvalidMaxUploads
	ErrInvalidMaxParts
	ErrInvalidPartNumberMarker
	ErrInvalidPartNumber
	ErrInvalidRequestBody
	ErrInvalidCopySource
	ErrInvalidMetadataDirective
	ErrInvalidCopyDest
	ErrInvalidPolicyDocument
	ErrInvalidObjectState
	ErrMalformedXML
	ErrMissingContentLength
	ErrMissingContentMD5
	ErrMissingRequestBodyError
	ErrMissingSecurityHeader
	ErrNoSuchBucket
	ErrNoSuchBucketPolicy
	ErrNoSuchBucketLifecycle
	ErrNoSuchLifecycleConfiguration
	ErrInvalidLifecycleWithObjectLock
	ErrNoSuchBucketSSEConfig
	ErrNoSuchCORSConfiguration
	ErrNoSuchWebsiteConfiguration
	ErrReplicationConfigurationNotFoundError
	ErrRemoteDestinationNotFoundError
	ErrReplicationDestinationMissingLock
	ErrRemoteTargetNotFoundError
	ErrReplicationRemoteConnectionError
	ErrReplicationBandwidthLimitError
	ErrBucketRemoteIdenticalToSource
	ErrBucketRemoteAlreadyExists
	ErrBucketRemoteLabelInUse
	ErrBucketRemoteArnTypeInvalid
	ErrBucketRemoteArnInvalid
	ErrBucketRemoteRemoveDisallowed
	ErrRemoteTargetNotVersionedError
	ErrReplicationSourceNotVersionedError
	ErrReplicationNeedsVersioningError
	ErrReplicationBucketNeedsVersioningError
	ErrReplicationDenyEditError
	ErrRemoteTargetDenyAddError
	ErrReplicationNoExistingObjects
	ErrReplicationValidationError
	ErrReplicationPermissionCheckError
	ErrObjectRestoreAlreadyInProgress
	ErrNoSuchKey
	ErrNoSuchUpload
	ErrInvalidVersionID
	ErrNoSuchVersion
	ErrNotImplemented
	ErrPreconditionFailed
	ErrRequestTimeTooSkewed
	ErrSignatureDoesNotMatch
	ErrMethodNotAllowed
	ErrInvalidPart
	ErrInvalidPartOrder
	ErrMissingPart
	ErrAuthorizationHeaderMalformed
	ErrMalformedPOSTRequest
	ErrPOSTFileRequired
	ErrSignatureVersionNotSupported
	ErrBucketNotEmpty
	ErrAllAccessDisabled
	ErrPolicyInvalidVersion
	ErrMissingFields
	ErrMissingCredTag
	ErrCredMalformed
	ErrInvalidRegion
	ErrInvalidServiceS3
	ErrInvalidServiceSTS
	ErrInvalidRequestVersion
	ErrMissingSignTag
	ErrMissingSignHeadersTag
	ErrMalformedDate
	ErrMalformedPresignedDate
	ErrMalformedCredentialDate
	ErrMalformedExpires
	ErrNegativeExpires
	ErrAuthHeaderEmpty
	ErrExpiredPresignRequest
	ErrRequestNotReadyYet
	ErrUnsignedHeaders
	ErrMissingDateHeader
	ErrInvalidQuerySignatureAlgo
	ErrInvalidQueryParams
	ErrBucketAlreadyOwnedByYou
	ErrInvalidDuration
	ErrBucketAlreadyExists
	ErrMetadataTooLarge
	ErrUnsupportedMetadata
	ErrUnsupportedHostHeader
	ErrMaximumExpires
	ErrSlowDownRead
	ErrSlowDownWrite
	ErrMaxVersionsExceeded
	ErrInvalidPrefixMarker
	ErrBadRequest
	ErrKeyTooLongError
	ErrInvalidBucketObjectLockConfiguration
	ErrObjectLockConfigurationNotFound
	ErrObjectLockConfigurationNotAllowed
	ErrNoSuchObjectLockConfiguration
	ErrObjectLocked
	ErrInvalidRetentionDate
	ErrPastObjectLockRetainDate
	ErrUnknownWORMModeDirective
	ErrBucketTaggingNotFound
	ErrObjectLockInvalidHeaders
	ErrInvalidTagDirective
	ErrPolicyAlreadyAttached
	ErrPolicyNotAttached
	ErrExcessData

	// SSE-S3/SSE-KMS related API errors
	ErrInvalidEncryptionMethod
	ErrInvalidEncryptionKeyID

	// Server-Side-Encryption (with Customer provided key) related API errors.
	ErrInsecureSSECustomerRequest
	ErrSSEMultipartEncrypted
	ErrSSEEncryptedObject
	ErrInvalidEncryptionParameters
	ErrInvalidEncryptionParametersSSEC

	ErrInvalidSSECustomerAlgorithm
	ErrInvalidSSECustomerKey
	ErrMissingSSECustomerKey
	ErrMissingSSECustomerKeyMD5
	ErrSSECustomerKeyMD5Mismatch
	ErrInvalidSSECustomerParameters
	ErrIncompatibleEncryptionMethod
	ErrKMSNotConfigured
	ErrKMSKeyNotFoundException
	ErrKMSDefaultKeyAlreadyConfigured

	ErrNoAccessKey
	ErrInvalidToken

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

	// S3 extended errors.
	ErrContentSHA256Mismatch
	ErrContentChecksumMismatch

	// MinIO extended errors.
	ErrStorageFull
	ErrRequestBodyParse
	ErrObjectExistsAsDirectory
	ErrInvalidObjectName
	ErrInvalidObjectNamePrefixSlash
	ErrInvalidResourceName
	ErrInvalidLifecycleQueryParameter
	ErrServerNotInitialized
	ErrRequestTimedout
	ErrClientDisconnected
	ErrTooManyRequests
	ErrInvalidRequest
	ErrTransitionStorageClassNotFoundError
	// MinIO storage class error codes
	ErrInvalidStorageClass
	ErrBackendDown

	ErrMalformedJSON
	ErrAdminNoSuchUser
	ErrAdminNoSuchUserLDAPWarn
	ErrAdminNoSuchGroup
	ErrAdminGroupNotEmpty
	ErrAdminGroupDisabled
	ErrAdminNoSuchJob
	ErrAdminNoSuchPolicy
	ErrAdminPolicyChangeAlreadyApplied
	ErrAdminInvalidArgument
	ErrAdminInvalidAccessKey
	ErrAdminInvalidSecretKey
	ErrAdminConfigNoQuorum
	ErrAdminConfigTooLarge
	ErrAdminConfigBadJSON
	ErrAdminNoSuchConfigTarget
	ErrAdminConfigEnvOverridden
	ErrAdminConfigDuplicateKeys
	ErrAdminConfigInvalidIDPType
	ErrAdminConfigLDAPNonDefaultConfigName
	ErrAdminConfigLDAPValidation
	ErrAdminConfigIDPCfgNameAlreadyExists
	ErrAdminConfigIDPCfgNameDoesNotExist
	ErrAdminCredentialsMismatch
	ErrInsecureClientRequest
	ErrObjectTampered

	// Site-Replication errors
	ErrSiteReplicationInvalidRequest
	ErrSiteReplicationPeerResp
	ErrSiteReplicationBackendIssue
	ErrSiteReplicationServiceAccountError
	ErrSiteReplicationBucketConfigError
	ErrSiteReplicationBucketMetaError
	ErrSiteReplicationIAMError
	ErrSiteReplicationConfigMissing

	// Pool rebalance errors
	ErrAdminRebalanceAlreadyStarted
	ErrAdminRebalanceNotStarted

	// Bucket Quota error codes
	ErrAdminBucketQuotaExceeded
	ErrAdminNoSuchQuotaConfiguration

	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
	ErrInvalidColumnIndex

	ErrAdminConfigNotificationTargetsFailed
	ErrAdminProfilerNotEnabled
	ErrInvalidDecompressedSize
	ErrAddUserInvalidArgument
	ErrAdminResourceInvalidArgument
	ErrAdminAccountNotEligible
	ErrAccountNotEligible
	ErrAdminServiceAccountNotFound
	ErrPostPolicyConditionInvalidFormat

	ErrInvalidChecksum

	// Lambda functions
	ErrLambdaARNInvalid
	ErrLambdaARNNotFound
)

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

func (APIErrorCode) String

func (i APIErrorCode) String() string

type APIErrorResponse

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
	Region     string `xml:"Region,omitempty" json:"Region,omitempty"`
	RequestID  string `xml:"RequestId" json:"RequestId"`
	HostID     string `xml:"HostId" json:"HostId"`
}

APIErrorResponse - error response format

type AccElem

type AccElem struct {
	Total int64
	Size  int64
	N     int64
}

AccElem holds information for calculating an average value

func (*AccElem) DecodeMsg

func (z *AccElem) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (AccElem) EncodeMsg

func (z AccElem) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (AccElem) MarshalMsg

func (z AccElem) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (AccElem) Msgsize

func (z AccElem) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AccElem) UnmarshalMsg

func (z *AccElem) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ActiveWorkerStat

type ActiveWorkerStat struct {
	Curr int     `json:"curr"`
	Avg  float32 `json:"avg"`
	Max  int     `json:"max"`
	// contains filtered or unexported fields
}

ActiveWorkerStat is stat for active replication workers

func (*ActiveWorkerStat) DecodeMsg

func (z *ActiveWorkerStat) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ActiveWorkerStat) EncodeMsg

func (z ActiveWorkerStat) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ActiveWorkerStat) MarshalMsg

func (z ActiveWorkerStat) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ActiveWorkerStat) Msgsize

func (z ActiveWorkerStat) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ActiveWorkerStat) UnmarshalMsg

func (z *ActiveWorkerStat) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AdminError

type AdminError struct {
	Code       string
	Message    string
	StatusCode int
}

AdminError - is a generic error for all admin APIs.

func (AdminError) Error

func (ae AdminError) Error() string

type AllAccessDisabled

type AllAccessDisabled GenericError

AllAccessDisabled All access to this object has been disabled

func (AllAccessDisabled) Error

func (e AllAccessDisabled) Error() string

Error returns string an error formatted as the given text.

type AssumeRoleResponse

type AssumeRoleResponse struct {
	XMLName xml.Name `xml:"https://sts.amazonaws.com/doc/2011-06-15/ AssumeRoleResponse" json:"-"`

	Result           AssumeRoleResult `xml:"AssumeRoleResult"`
	ResponseMetadata struct {
		RequestID string `xml:"RequestId,omitempty"`
	} `xml:"ResponseMetadata,omitempty"`
}

AssumeRoleResponse contains the result of successful AssumeRole request.

type AssumeRoleResult

type AssumeRoleResult struct {
	// The identifiers for the temporary security credentials that the operation
	// returns.
	AssumedRoleUser AssumedRoleUser `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"`
}

AssumeRoleResult - Contains the response to a successful AssumeRole request, including temporary credentials that can be used to make MinIO API requests.

type AssumeRoleWithCertificateResponse

type AssumeRoleWithCertificateResponse struct {
	XMLName xml.Name `xml:"https://sts.amazonaws.com/doc/2011-06-15/ AssumeRoleWithCertificateResponse" json:"-"`
	Result  struct {
		Credentials auth.Credentials `xml:"Credentials,omitempty"`
	} `xml:"AssumeRoleWithCertificateResult"`
	Metadata struct {
		RequestID string `xml:"RequestId,omitempty"`
	} `xml:"ResponseMetadata,omitempty"`
}

AssumeRoleWithCertificateResponse contains the result of a successful AssumeRoleWithCertificate request.

type AssumeRoleWithClientGrantsResponse

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 AssumeRoleWithCustomTokenResponse

type AssumeRoleWithCustomTokenResponse struct {
	XMLName xml.Name `xml:"https://sts.amazonaws.com/doc/2011-06-15/ AssumeRoleWithCustomTokenResponse" json:"-"`
	Result  struct {
		Credentials auth.Credentials `xml:"Credentials,omitempty"`
		AssumedUser string           `xml:"AssumedUser,omitempty"`
	} `xml:"AssumeRoleWithCustomTokenResult"`
	Metadata struct {
		RequestID string `xml:"RequestId,omitempty"`
	} `xml:"ResponseMetadata,omitempty"`
}

AssumeRoleWithCustomTokenResponse contains the result of a successful AssumeRoleWithCustomToken request.

type AssumeRoleWithLDAPResponse

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

AssumeRoleWithLDAPResponse contains the result of successful AssumeRoleWithLDAPIdentity request

type AssumeRoleWithWebIdentityResponse

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

AssumeRoleWithWebIdentityResponse contains the result of successful AssumeRoleWithWebIdentity request.

type AssumedRoleUser

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 AuditLogOptions

type AuditLogOptions struct {
	Event     string
	APIName   string
	Status    string
	Bucket    string
	Object    string
	VersionID string
	Error     string
	Tags      map[string]interface{}
}

AuditLogOptions takes options for audit logging subsystem activity

type BackendDown

type BackendDown struct {
	Err string
}

BackendDown is returned for network errors

func (BackendDown) Error

func (e BackendDown) Error() string

type BackendType

type BackendType int

BackendType - represents different backend types.

type BatchJobKV

type BatchJobKV struct {
	Key   string `yaml:"key" json:"key"`
	Value string `yaml:"value" json:"value"`
}

BatchJobKV is a key-value data type which supports wildcard matching

func (*BatchJobKV) DecodeMsg

func (z *BatchJobKV) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchJobKV) Empty

func (kv BatchJobKV) Empty() bool

Empty indicates if kv is not set

func (BatchJobKV) EncodeMsg

func (z BatchJobKV) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchJobKV) MarshalMsg

func (z BatchJobKV) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchJobKV) Match

func (kv BatchJobKV) Match(ikv BatchJobKV) bool

Match matches input kv with kv, value will be wildcard matched depending on the user input

func (BatchJobKV) Msgsize

func (z BatchJobKV) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobKV) UnmarshalMsg

func (z *BatchJobKV) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobKV) Validate

func (kv BatchJobKV) Validate() error

Validate returns an error if key is empty

type BatchJobKeyRotateEncryption

type BatchJobKeyRotateEncryption struct {
	Type    BatchKeyRotationType `yaml:"type" json:"type"`
	Key     string               `yaml:"key" json:"key"`
	Context string               `yaml:"context" json:"context"`
	// contains filtered or unexported fields
}

BatchJobKeyRotateEncryption defines key rotation encryption options passed

func (*BatchJobKeyRotateEncryption) DecodeMsg

func (z *BatchJobKeyRotateEncryption) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchJobKeyRotateEncryption) EncodeMsg

func (z BatchJobKeyRotateEncryption) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchJobKeyRotateEncryption) MarshalMsg

func (z BatchJobKeyRotateEncryption) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchJobKeyRotateEncryption) Msgsize

func (z BatchJobKeyRotateEncryption) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobKeyRotateEncryption) UnmarshalMsg

func (z *BatchJobKeyRotateEncryption) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobKeyRotateEncryption) Validate

func (e BatchJobKeyRotateEncryption) Validate() error

Validate validates input key rotation encryption options.

type BatchJobKeyRotateFlags

type BatchJobKeyRotateFlags struct {
	Filter BatchKeyRotateFilter `yaml:"filter" json:"filter"`
	Notify BatchJobNotification `yaml:"notify" json:"notify"`
	Retry  BatchJobRetry        `yaml:"retry" json:"retry"`
}

BatchJobKeyRotateFlags various configurations for replication job definition currently includes - filter - notify - retry

func (*BatchJobKeyRotateFlags) DecodeMsg

func (z *BatchJobKeyRotateFlags) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobKeyRotateFlags) EncodeMsg

func (z *BatchJobKeyRotateFlags) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobKeyRotateFlags) MarshalMsg

func (z *BatchJobKeyRotateFlags) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobKeyRotateFlags) Msgsize

func (z *BatchJobKeyRotateFlags) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobKeyRotateFlags) UnmarshalMsg

func (z *BatchJobKeyRotateFlags) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchJobKeyRotateV1

type BatchJobKeyRotateV1 struct {
	APIVersion string                      `yaml:"apiVersion" json:"apiVersion"`
	Flags      BatchJobKeyRotateFlags      `yaml:"flags" json:"flags"`
	Bucket     string                      `yaml:"bucket" json:"bucket"`
	Prefix     string                      `yaml:"prefix" json:"prefix"`
	Endpoint   string                      `yaml:"endpoint" json:"endpoint"`
	Encryption BatchJobKeyRotateEncryption `yaml:"encryption" json:"encryption"`
}

BatchJobKeyRotateV1 v1 of batch key rotation job

func (*BatchJobKeyRotateV1) DecodeMsg

func (z *BatchJobKeyRotateV1) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobKeyRotateV1) EncodeMsg

func (z *BatchJobKeyRotateV1) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobKeyRotateV1) KeyRotate

func (r *BatchJobKeyRotateV1) KeyRotate(ctx context.Context, api ObjectLayer, objInfo ObjectInfo) error

KeyRotate rotates encryption key of an object

func (*BatchJobKeyRotateV1) MarshalMsg

func (z *BatchJobKeyRotateV1) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobKeyRotateV1) Msgsize

func (z *BatchJobKeyRotateV1) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (BatchJobKeyRotateV1) Notify

func (r BatchJobKeyRotateV1) Notify(ctx context.Context, ri *batchJobInfo) error

Notify notifies notification endpoint if configured regarding job failure or success.

func (*BatchJobKeyRotateV1) Start

Start the batch key rottion job, resumes if there was a pending job via "job.ID"

func (*BatchJobKeyRotateV1) UnmarshalMsg

func (z *BatchJobKeyRotateV1) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*BatchJobKeyRotateV1) Validate

Validate validates the job definition input

type BatchJobNotification

type BatchJobNotification struct {
	Endpoint string `yaml:"endpoint" json:"endpoint"`
	Token    string `yaml:"token" json:"token"`
}

BatchJobNotification stores notification endpoint and token information. Used by batch jobs to notify of their status.

func (*BatchJobNotification) DecodeMsg

func (z *BatchJobNotification) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchJobNotification) EncodeMsg

func (z BatchJobNotification) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchJobNotification) MarshalMsg

func (z BatchJobNotification) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchJobNotification) Msgsize

func (z BatchJobNotification) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobNotification) UnmarshalMsg

func (z *BatchJobNotification) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchJobPool

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

BatchJobPool batch job pool

func (*BatchJobPool) AddWorker

func (j *BatchJobPool) AddWorker()

AddWorker adds a replication worker to the pool

func (*BatchJobPool) ResizeWorkers

func (j *BatchJobPool) ResizeWorkers(n int)

ResizeWorkers sets replication workers pool to new size

type BatchJobReplicateCredentials

type BatchJobReplicateCredentials struct {
	AccessKey    string `xml:"AccessKeyId" json:"accessKey,omitempty" yaml:"accessKey"`
	SecretKey    string `xml:"SecretAccessKey" json:"secretKey,omitempty" yaml:"secretKey"`
	SessionToken string `xml:"SessionToken" json:"sessionToken,omitempty" yaml:"sessionToken"`
}

BatchJobReplicateCredentials access credentials for batch replication it may be either for target or source.

func (*BatchJobReplicateCredentials) DecodeMsg

func (z *BatchJobReplicateCredentials) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchJobReplicateCredentials) Empty

Empty indicates if credentials are not set

func (BatchJobReplicateCredentials) EncodeMsg

func (z BatchJobReplicateCredentials) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchJobReplicateCredentials) MarshalMsg

func (z BatchJobReplicateCredentials) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchJobReplicateCredentials) Msgsize

func (z BatchJobReplicateCredentials) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobReplicateCredentials) UnmarshalMsg

func (z *BatchJobReplicateCredentials) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobReplicateCredentials) Validate

func (c BatchJobReplicateCredentials) Validate() error

Validate validates if credentials are valid

type BatchJobReplicateFlags

type BatchJobReplicateFlags struct {
	Filter BatchReplicateFilter `yaml:"filter" json:"filter"`
	Notify BatchJobNotification `yaml:"notify" json:"notify"`
	Retry  BatchJobRetry        `yaml:"retry" json:"retry"`
}

BatchJobReplicateFlags various configurations for replication job definition currently includes - filter - notify - retry

func (*BatchJobReplicateFlags) DecodeMsg

func (z *BatchJobReplicateFlags) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobReplicateFlags) EncodeMsg

func (z *BatchJobReplicateFlags) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobReplicateFlags) MarshalMsg

func (z *BatchJobReplicateFlags) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobReplicateFlags) Msgsize

func (z *BatchJobReplicateFlags) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobReplicateFlags) UnmarshalMsg

func (z *BatchJobReplicateFlags) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchJobReplicateResourceType

type BatchJobReplicateResourceType string

BatchJobReplicateResourceType defines the type of batch jobs

const (
	BatchJobReplicateResourceMinIO BatchJobReplicateResourceType = "minio"
	BatchJobReplicateResourceS3    BatchJobReplicateResourceType = "s3"
)

Different types of batch jobs..

func (*BatchJobReplicateResourceType) DecodeMsg

func (z *BatchJobReplicateResourceType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchJobReplicateResourceType) EncodeMsg

func (z BatchJobReplicateResourceType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchJobReplicateResourceType) MarshalMsg

func (z BatchJobReplicateResourceType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchJobReplicateResourceType) Msgsize

func (z BatchJobReplicateResourceType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobReplicateResourceType) UnmarshalMsg

func (z *BatchJobReplicateResourceType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobReplicateResourceType) Validate

func (t BatchJobReplicateResourceType) Validate() error

Validate validates if the replicate resource type is recognized and supported

type BatchJobReplicateSource

type BatchJobReplicateSource struct {
	Type     BatchJobReplicateResourceType `yaml:"type" json:"type"`
	Bucket   string                        `yaml:"bucket" json:"bucket"`
	Prefix   string                        `yaml:"prefix" json:"prefix"`
	Endpoint string                        `yaml:"endpoint" json:"endpoint"`
	Path     string                        `yaml:"path" json:"path"`
	Creds    BatchJobReplicateCredentials  `yaml:"credentials" json:"credentials"`
}

BatchJobReplicateSource describes source element of the replication job that is the source of the data for the target

func (*BatchJobReplicateSource) DecodeMsg

func (z *BatchJobReplicateSource) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobReplicateSource) EncodeMsg

func (z *BatchJobReplicateSource) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobReplicateSource) MarshalMsg

func (z *BatchJobReplicateSource) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobReplicateSource) Msgsize

func (z *BatchJobReplicateSource) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobReplicateSource) UnmarshalMsg

func (z *BatchJobReplicateSource) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobReplicateSource) ValidPath

func (s BatchJobReplicateSource) ValidPath() bool

ValidPath returns true if path is valid

type BatchJobReplicateTarget

type BatchJobReplicateTarget struct {
	Type     BatchJobReplicateResourceType `yaml:"type" json:"type"`
	Bucket   string                        `yaml:"bucket" json:"bucket"`
	Prefix   string                        `yaml:"prefix" json:"prefix"`
	Endpoint string                        `yaml:"endpoint" json:"endpoint"`
	Path     string                        `yaml:"path" json:"path"`
	Creds    BatchJobReplicateCredentials  `yaml:"credentials" json:"credentials"`
}

BatchJobReplicateTarget describes target element of the replication job that receives the filtered data from source

func (*BatchJobReplicateTarget) DecodeMsg

func (z *BatchJobReplicateTarget) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobReplicateTarget) EncodeMsg

func (z *BatchJobReplicateTarget) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobReplicateTarget) MarshalMsg

func (z *BatchJobReplicateTarget) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobReplicateTarget) Msgsize

func (z *BatchJobReplicateTarget) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobReplicateTarget) UnmarshalMsg

func (z *BatchJobReplicateTarget) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobReplicateTarget) ValidPath

func (t BatchJobReplicateTarget) ValidPath() bool

ValidPath returns true if path is valid

type BatchJobReplicateV1

type BatchJobReplicateV1 struct {
	APIVersion string                  `yaml:"apiVersion" json:"apiVersion"`
	Flags      BatchJobReplicateFlags  `yaml:"flags" json:"flags"`
	Target     BatchJobReplicateTarget `yaml:"target" json:"target"`
	Source     BatchJobReplicateSource `yaml:"source" json:"source"`
	// contains filtered or unexported fields
}

BatchJobReplicateV1 v1 of batch job replication

func (*BatchJobReplicateV1) DecodeMsg

func (z *BatchJobReplicateV1) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobReplicateV1) EncodeMsg

func (z *BatchJobReplicateV1) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobReplicateV1) MarshalMsg

func (z *BatchJobReplicateV1) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobReplicateV1) Msgsize

func (z *BatchJobReplicateV1) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (BatchJobReplicateV1) Notify

func (r BatchJobReplicateV1) Notify(ctx context.Context, ri *batchJobInfo) error

Notify notifies notification endpoint if configured regarding job failure or success.

func (BatchJobReplicateV1) RemoteToLocal

func (r BatchJobReplicateV1) RemoteToLocal() bool

RemoteToLocal returns true if source is remote and target is local

func (*BatchJobReplicateV1) ReplicateFromSource

func (r *BatchJobReplicateV1) ReplicateFromSource(ctx context.Context, api ObjectLayer, core *miniogo.Core, srcObjInfo ObjectInfo, retry bool) error

ReplicateFromSource - this is not implemented yet where source is 'remote' and target is local.

func (*BatchJobReplicateV1) ReplicateToTarget

func (r *BatchJobReplicateV1) ReplicateToTarget(ctx context.Context, api ObjectLayer, c *miniogo.Core, srcObjInfo ObjectInfo, retry bool) error

ReplicateToTarget read from source and replicate to configured target

func (*BatchJobReplicateV1) Start

Start start the batch replication job, resumes if there was a pending job via "job.ID"

func (*BatchJobReplicateV1) StartFromSource

func (r *BatchJobReplicateV1) StartFromSource(ctx context.Context, api ObjectLayer, job BatchJobRequest) error

StartFromSource starts the batch replication job from remote source, resumes if there was a pending job via "job.ID"

func (*BatchJobReplicateV1) UnmarshalMsg

func (z *BatchJobReplicateV1) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*BatchJobReplicateV1) Validate

Validate validates the job definition input

type BatchJobRequest

type BatchJobRequest struct {
	ID        string               `yaml:"-" json:"name"`
	User      string               `yaml:"-" json:"user"`
	Started   time.Time            `yaml:"-" json:"started"`
	Location  string               `yaml:"-" json:"location"`
	Replicate *BatchJobReplicateV1 `yaml:"replicate" json:"replicate"`
	KeyRotate *BatchJobKeyRotateV1 `yaml:"keyrotate" json:"keyrotate"`
	// contains filtered or unexported fields
}

BatchJobRequest this is an internal data structure not for external consumption.

func (*BatchJobRequest) DecodeMsg

func (z *BatchJobRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchJobRequest) EncodeMsg

func (z *BatchJobRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchJobRequest) MarshalMsg

func (z *BatchJobRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchJobRequest) Msgsize

func (z *BatchJobRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (BatchJobRequest) Type

func (j BatchJobRequest) Type() madmin.BatchJobType

Type returns type of batch job, currently only supports 'replicate'

func (*BatchJobRequest) UnmarshalMsg

func (z *BatchJobRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobRequest) Validate

func (j BatchJobRequest) Validate(ctx context.Context, o ObjectLayer) error

Validate validates the current job, used by 'save()' before persisting the job request

type BatchJobRetry

type BatchJobRetry struct {
	Attempts int           `yaml:"attempts" json:"attempts"` // number of retry attempts
	Delay    time.Duration `yaml:"delay" json:"delay"`       // delay between each retries
}

BatchJobRetry stores retry configuration used in the event of failures.

func (*BatchJobRetry) DecodeMsg

func (z *BatchJobRetry) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchJobRetry) EncodeMsg

func (z BatchJobRetry) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchJobRetry) MarshalMsg

func (z BatchJobRetry) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchJobRetry) Msgsize

func (z BatchJobRetry) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchJobRetry) UnmarshalMsg

func (z *BatchJobRetry) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BatchJobRetry) Validate

func (r BatchJobRetry) Validate() error

Validate validates input replicate retries.

type BatchKeyRotateFilter

type BatchKeyRotateFilter struct {
	NewerThan     time.Duration `yaml:"newerThan,omitempty" json:"newerThan"`
	OlderThan     time.Duration `yaml:"olderThan,omitempty" json:"olderThan"`
	CreatedAfter  time.Time     `yaml:"createdAfter,omitempty" json:"createdAfter"`
	CreatedBefore time.Time     `yaml:"createdBefore,omitempty" json:"createdBefore"`
	Tags          []BatchJobKV  `yaml:"tags,omitempty" json:"tags"`
	Metadata      []BatchJobKV  `yaml:"metadata,omitempty" json:"metadata"`
	KMSKeyID      string        `yaml:"kmskeyid" json:"kmskey"`
}

BatchKeyRotateFilter holds all the filters currently supported for batch replication

func (*BatchKeyRotateFilter) DecodeMsg

func (z *BatchKeyRotateFilter) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchKeyRotateFilter) EncodeMsg

func (z *BatchKeyRotateFilter) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchKeyRotateFilter) MarshalMsg

func (z *BatchKeyRotateFilter) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchKeyRotateFilter) Msgsize

func (z *BatchKeyRotateFilter) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchKeyRotateFilter) UnmarshalMsg

func (z *BatchKeyRotateFilter) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchKeyRotateNotification

type BatchKeyRotateNotification struct {
	Endpoint string `yaml:"endpoint" json:"endpoint"`
	Token    string `yaml:"token" json:"token"`
}

BatchKeyRotateNotification success or failure notification endpoint for each job attempts

func (*BatchKeyRotateNotification) DecodeMsg

func (z *BatchKeyRotateNotification) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchKeyRotateNotification) EncodeMsg

func (z BatchKeyRotateNotification) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchKeyRotateNotification) MarshalMsg

func (z BatchKeyRotateNotification) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchKeyRotateNotification) Msgsize

func (z BatchKeyRotateNotification) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchKeyRotateNotification) UnmarshalMsg

func (z *BatchKeyRotateNotification) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchKeyRotationType

type BatchKeyRotationType string

BatchKeyRotationType defines key rotation type

func (*BatchKeyRotationType) DecodeMsg

func (z *BatchKeyRotationType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BatchKeyRotationType) EncodeMsg

func (z BatchKeyRotationType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BatchKeyRotationType) MarshalMsg

func (z BatchKeyRotationType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BatchKeyRotationType) Msgsize

func (z BatchKeyRotationType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchKeyRotationType) UnmarshalMsg

func (z *BatchKeyRotationType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchReplicateFilter

type BatchReplicateFilter struct {
	NewerThan     time.Duration `yaml:"newerThan,omitempty" json:"newerThan"`
	OlderThan     time.Duration `yaml:"olderThan,omitempty" json:"olderThan"`
	CreatedAfter  time.Time     `yaml:"createdAfter,omitempty" json:"createdAfter"`
	CreatedBefore time.Time     `yaml:"createdBefore,omitempty" json:"createdBefore"`
	Tags          []BatchJobKV  `yaml:"tags,omitempty" json:"tags"`
	Metadata      []BatchJobKV  `yaml:"metadata,omitempty" json:"metadata"`
}

BatchReplicateFilter holds all the filters currently supported for batch replication

func (*BatchReplicateFilter) DecodeMsg

func (z *BatchReplicateFilter) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchReplicateFilter) EncodeMsg

func (z *BatchReplicateFilter) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchReplicateFilter) MarshalMsg

func (z *BatchReplicateFilter) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchReplicateFilter) Msgsize

func (z *BatchReplicateFilter) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchReplicateFilter) UnmarshalMsg

func (z *BatchReplicateFilter) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BitrotAlgorithm

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
	// HighwayHash256S represents the Streaming HighwayHash-256 hash function
	HighwayHash256S
	// BLAKE2b512 represents the BLAKE2b-512 hash function
	BLAKE2b512
)

func BitrotAlgorithmFromString

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

func (a BitrotAlgorithm) Available() bool

Available reports whether the given algorithm is available.

func (*BitrotAlgorithm) DecodeMsg

func (z *BitrotAlgorithm) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BitrotAlgorithm) EncodeMsg

func (z BitrotAlgorithm) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BitrotAlgorithm) MarshalMsg

func (z BitrotAlgorithm) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BitrotAlgorithm) Msgsize

func (z BitrotAlgorithm) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (BitrotAlgorithm) New

func (a BitrotAlgorithm) New() hash.Hash

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

func (BitrotAlgorithm) String

func (a BitrotAlgorithm) String() string

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

func (*BitrotAlgorithm) UnmarshalMsg

func (z *BitrotAlgorithm) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BitrotVerifier

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

BitrotVerifier can be used to verify protected data.

func NewBitrotVerifier

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

NewBitrotVerifier returns a new BitrotVerifier implementing the given algorithm.

type Bucket

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

Bucket container for bucket metadata

type BucketAccessPolicy

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

type BucketAlreadyExists GenericError

BucketAlreadyExists the requested bucket name is not available.

func (BucketAlreadyExists) Error

func (e BucketAlreadyExists) Error() string

type BucketAlreadyOwnedByYou

type BucketAlreadyOwnedByYou GenericError

BucketAlreadyOwnedByYou already owned by you.

func (BucketAlreadyOwnedByYou) Error

func (e BucketAlreadyOwnedByYou) Error() string

type BucketExists

type BucketExists GenericError

BucketExists bucket exists.

func (BucketExists) Error

func (e BucketExists) Error() string

type BucketInfo

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

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

	// Bucket features enabled
	Versioning, ObjectLocking bool
}

BucketInfo - represents bucket metadata.

type BucketLifecycleNotFound

type BucketLifecycleNotFound GenericError

BucketLifecycleNotFound - no bucket lifecycle found.

func (BucketLifecycleNotFound) Error

func (e BucketLifecycleNotFound) Error() string

type BucketMetadata

type BucketMetadata struct {
	Name                        string
	Created                     time.Time
	LockEnabled                 bool // legacy not used anymore.
	PolicyConfigJSON            []byte
	NotificationConfigXML       []byte
	LifecycleConfigXML          []byte
	ObjectLockConfigXML         []byte
	VersioningConfigXML         []byte
	EncryptionConfigXML         []byte
	TaggingConfigXML            []byte
	QuotaConfigJSON             []byte
	ReplicationConfigXML        []byte
	BucketTargetsConfigJSON     []byte
	BucketTargetsConfigMetaJSON []byte
	PolicyConfigUpdatedAt       time.Time
	ObjectLockConfigUpdatedAt   time.Time
	EncryptionConfigUpdatedAt   time.Time
	TaggingConfigUpdatedAt      time.Time
	QuotaConfigUpdatedAt        time.Time
	ReplicationConfigUpdatedAt  time.Time
	VersioningConfigUpdatedAt   time.Time
	LifecycleConfigUpdatedAt    time.Time
	// contains filtered or unexported fields
}

BucketMetadata contains bucket metadata. When adding/removing fields, regenerate the marshal code using the go generate above. Only changing meaning of fields requires a version bump. bucketMetadataFormat refers to the format. bucketMetadataVersion can be used to track a rolling upgrade of a field.

func (*BucketMetadata) DecodeMsg

func (z *BucketMetadata) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BucketMetadata) EncodeMsg

func (z *BucketMetadata) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BucketMetadata) MarshalMsg

func (z *BucketMetadata) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BucketMetadata) Msgsize

func (z *BucketMetadata) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (BucketMetadata) ObjectLocking

func (b BucketMetadata) ObjectLocking() bool

ObjectLocking returns true if object locking is enabled

func (*BucketMetadata) Save

func (b *BucketMetadata) Save(ctx context.Context, api ObjectLayer) error

Save config to supplied ObjectLayer api.

func (*BucketMetadata) SetCreatedAt

func (b *BucketMetadata) SetCreatedAt(createdAt time.Time)

SetCreatedAt preserves the CreatedAt time for bucket across sites in site replication. It defaults to creation time of bucket on this cluster in all other cases.

func (*BucketMetadata) UnmarshalMsg

func (z *BucketMetadata) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (BucketMetadata) Versioning

func (b BucketMetadata) Versioning() bool

Versioning returns true if versioning is enabled

type BucketMetadataSys

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

BucketMetadataSys captures all bucket metadata for a given cluster.

func NewBucketMetadataSys

func NewBucketMetadataSys() *BucketMetadataSys

NewBucketMetadataSys - creates new policy system.

func (*BucketMetadataSys) Count

func (sys *BucketMetadataSys) Count() int

Count returns number of bucket metadata map entries.

func (*BucketMetadataSys) CreatedAt

func (sys *BucketMetadataSys) CreatedAt(bucket string) (time.Time, error)

CreatedAt returns the time of creation of bucket

func (*BucketMetadataSys) Delete

func (sys *BucketMetadataSys) Delete(ctx context.Context, bucket string, configFile string) (updatedAt time.Time, err error)

Delete delete the bucket metadata for the specified bucket. must be used by all callers instead of using Update() with nil configData.

func (*BucketMetadataSys) Get

func (sys *BucketMetadataSys) Get(bucket string) (BucketMetadata, error)

Get metadata for a bucket. If no metadata exists errConfigNotFound is returned and a new metadata is returned. Only a shallow copy is returned, so referenced data should not be modified, but can be replaced atomically.

This function should only be used with - GetBucketInfo - ListBuckets For all other bucket specific metadata, use the relevant calls implemented specifically for each of those features.

func (*BucketMetadataSys) GetBucketTargetsConfig

func (sys *BucketMetadataSys) GetBucketTargetsConfig(bucket string) (*madmin.BucketTargets, error)

GetBucketTargetsConfig returns configured bucket targets for this bucket The returned object may not be modified.

func (*BucketMetadataSys) GetConfig

func (sys *BucketMetadataSys) GetConfig(ctx context.Context, bucket string) (meta BucketMetadata, reloaded bool, err error)

GetConfig returns a specific configuration from the bucket metadata. The returned object may not be modified. reloaded will be true if metadata refreshed from disk

func (*BucketMetadataSys) GetConfigFromDisk

func (sys *BucketMetadataSys) GetConfigFromDisk(ctx context.Context, bucket string) (BucketMetadata, error)

GetConfigFromDisk read bucket metadata config from disk.

func (*BucketMetadataSys) GetLifecycleConfig

func (sys *BucketMetadataSys) GetLifecycleConfig(bucket string) (*lifecycle.Lifecycle, time.Time, error)

GetLifecycleConfig returns configured lifecycle config The returned object may not be modified.

func (*BucketMetadataSys) GetNotificationConfig

func (sys *BucketMetadataSys) GetNotificationConfig(bucket string) (*event.Config, error)

GetNotificationConfig returns configured notification config The returned object may not be modified.

func (*BucketMetadataSys) GetObjectLockConfig

func (sys *BucketMetadataSys) GetObjectLockConfig(bucket string) (*objectlock.Config, time.Time, error)

GetObjectLockConfig returns configured object lock config The returned object may not be modified.

func (*BucketMetadataSys) GetPolicyConfig

func (sys *BucketMetadataSys) GetPolicyConfig(bucket string) (*policy.BucketPolicy, time.Time, error)

GetPolicyConfig returns configured bucket policy The returned object may not be modified.

func (*BucketMetadataSys) GetQuotaConfig

func (sys *BucketMetadataSys) GetQuotaConfig(ctx context.Context, bucket string) (*madmin.BucketQuota, time.Time, error)

GetQuotaConfig returns configured bucket quota The returned object may not be modified.

func (*BucketMetadataSys) GetReplicationConfig

func (sys *BucketMetadataSys) GetReplicationConfig(ctx context.Context, bucket string) (*replication.Config, time.Time, error)

GetReplicationConfig returns configured bucket replication config The returned object may not be modified.

func (*BucketMetadataSys) GetSSEConfig

func (sys *BucketMetadataSys) GetSSEConfig(bucket string) (*bucketsse.BucketSSEConfig, time.Time, error)

GetSSEConfig returns configured SSE config The returned object may not be modified.

func (*BucketMetadataSys) GetTaggingConfig

func (sys *BucketMetadataSys) GetTaggingConfig(bucket string) (*tags.Tags, time.Time, error)

GetTaggingConfig returns configured tagging config The returned object may not be modified.

func (*BucketMetadataSys) GetVersioningConfig

func (sys *BucketMetadataSys) GetVersioningConfig(bucket string) (*versioning.Versioning, time.Time, error)

GetVersioningConfig returns configured versioning config The returned object may not be modified.

func (*BucketMetadataSys) Init

func (sys *BucketMetadataSys) Init(ctx context.Context, buckets []BucketInfo, objAPI ObjectLayer) error

Init - initializes bucket metadata system for all buckets.

func (*BucketMetadataSys) Remove

func (sys *BucketMetadataSys) Remove(buckets ...string)

Remove bucket metadata from memory.

func (*BucketMetadataSys) RemoveStaleBuckets

func (sys *BucketMetadataSys) RemoveStaleBuckets(diskBuckets set.StringSet)

RemoveStaleBuckets removes all stale buckets in memory that are not on disk.

func (*BucketMetadataSys) Reset

func (sys *BucketMetadataSys) Reset()

Reset the state of the BucketMetadataSys.

func (*BucketMetadataSys) Set

func (sys *BucketMetadataSys) Set(bucket string, meta BucketMetadata)

Set - sets a new metadata in-memory. Only a shallow copy is saved and fields with references cannot be modified without causing a race condition, so they should be replaced atomically and not appended to, etc. Data is not persisted to disk.

func (*BucketMetadataSys) Update

func (sys *BucketMetadataSys) Update(ctx context.Context, bucket string, configFile string, configData []byte) (updatedAt time.Time, err error)

Update update bucket metadata for the specified bucket. The configData data should not be modified after being sent here.

type BucketNameInvalid

type BucketNameInvalid GenericError

BucketNameInvalid - bucketname provided is invalid.

func (BucketNameInvalid) Error

func (e BucketNameInvalid) Error() string

Error returns string an error formatted as the given text.

type BucketNotEmpty

type BucketNotEmpty GenericError

BucketNotEmpty bucket is not empty.

func (BucketNotEmpty) Error

func (e BucketNotEmpty) Error() string

type BucketNotFound

type BucketNotFound GenericError

BucketNotFound bucket does not exist.

func (BucketNotFound) Error

func (e BucketNotFound) Error() string

type BucketObjectLockConfigNotFound

type BucketObjectLockConfigNotFound GenericError

BucketObjectLockConfigNotFound - no bucket object lock config found

func (BucketObjectLockConfigNotFound) Error

type BucketObjectLockSys

type BucketObjectLockSys struct{}

BucketObjectLockSys - map of bucket and retention configuration.

func NewBucketObjectLockSys

func NewBucketObjectLockSys() *BucketObjectLockSys

NewBucketObjectLockSys returns initialized BucketObjectLockSys

func (*BucketObjectLockSys) Get

func (sys *BucketObjectLockSys) Get(bucketName string) (r objectlock.Retention, err error)

Get - Get retention configuration.

type BucketOptions

type BucketOptions struct {
	Deleted bool // true only when site replication is enabled
	Cached  bool // true only when we are requesting a cached response instead of hitting the disk for example ListBuckets() call.
}

BucketOptions provides options for ListBuckets and GetBucketInfo call.

type BucketPolicyNotFound

type BucketPolicyNotFound GenericError

BucketPolicyNotFound - no bucket policy found.

func (BucketPolicyNotFound) Error

func (e BucketPolicyNotFound) Error() string

type BucketQuotaConfigNotFound

type BucketQuotaConfigNotFound GenericError

BucketQuotaConfigNotFound - no bucket quota config found.

func (BucketQuotaConfigNotFound) Error

type BucketQuotaExceeded

type BucketQuotaExceeded GenericError

BucketQuotaExceeded - bucket quota exceeded.

func (BucketQuotaExceeded) Error

func (e BucketQuotaExceeded) Error() string

type BucketQuotaSys

type BucketQuotaSys struct{}

BucketQuotaSys - map of bucket and quota configuration.

func NewBucketQuotaSys

func NewBucketQuotaSys() *BucketQuotaSys

NewBucketQuotaSys returns initialized BucketQuotaSys

func (*BucketQuotaSys) Get

func (sys *BucketQuotaSys) Get(ctx context.Context, bucketName string) (*madmin.BucketQuota, error)

Get - Get quota configuration.

func (*BucketQuotaSys) GetBucketUsageInfo

func (sys *BucketQuotaSys) GetBucketUsageInfo(bucket string) (BucketUsageInfo, error)

GetBucketUsageInfo return bucket usage info for a given bucket

func (*BucketQuotaSys) Init

func (sys *BucketQuotaSys) Init(objAPI ObjectLayer)

Init initialize bucket quota.

type BucketRemoteAlreadyExists

type BucketRemoteAlreadyExists GenericError

BucketRemoteAlreadyExists remote already exists for this target type.

func (BucketRemoteAlreadyExists) Error

type BucketRemoteArnInvalid

type BucketRemoteArnInvalid GenericError

BucketRemoteArnInvalid arn needs to be specified.

func (BucketRemoteArnInvalid) Error

func (e BucketRemoteArnInvalid) Error() string

type BucketRemoteArnTypeInvalid

type BucketRemoteArnTypeInvalid GenericError

BucketRemoteArnTypeInvalid arn type for remote is not valid.

func (BucketRemoteArnTypeInvalid) Error

type BucketRemoteDestinationNotFound

type BucketRemoteDestinationNotFound GenericError

BucketRemoteDestinationNotFound bucket does not exist.

func (BucketRemoteDestinationNotFound) Error

type BucketRemoteIdenticalToSource

type BucketRemoteIdenticalToSource struct {
	GenericError
	Endpoint string
}

BucketRemoteIdenticalToSource remote already exists for this target type.

func (BucketRemoteIdenticalToSource) Error

type BucketRemoteLabelInUse

type BucketRemoteLabelInUse GenericError

BucketRemoteLabelInUse remote already exists for this target label.

func (BucketRemoteLabelInUse) Error

func (e BucketRemoteLabelInUse) Error() string

type BucketRemoteRemoveDisallowed

type BucketRemoteRemoveDisallowed GenericError

BucketRemoteRemoveDisallowed when replication configuration exists

func (BucketRemoteRemoveDisallowed) Error

type BucketRemoteTargetNotFound

type BucketRemoteTargetNotFound GenericError

BucketRemoteTargetNotFound remote target does not exist.

func (BucketRemoteTargetNotFound) Error

type BucketRemoteTargetNotVersioned

type BucketRemoteTargetNotVersioned GenericError

BucketRemoteTargetNotVersioned remote target does not have versioning enabled.

func (BucketRemoteTargetNotVersioned) Error

type BucketReplicationConfigNotFound

type BucketReplicationConfigNotFound GenericError

BucketReplicationConfigNotFound - no bucket replication config found

func (BucketReplicationConfigNotFound) Error

type BucketReplicationResyncStatus

type BucketReplicationResyncStatus struct {
	Version int `json:"version" msg:"v"`
	// map of remote arn to their resync status for a bucket
	TargetsMap map[string]TargetReplicationResyncStatus `json:"resyncMap,omitempty" msg:"brs"`
	ID         int                                      `json:"id" msg:"id"`
	LastUpdate time.Time                                `json:"lastUpdate" msg:"lu"`
}

BucketReplicationResyncStatus captures current replication resync status

func (*BucketReplicationResyncStatus) DecodeMsg

func (z *BucketReplicationResyncStatus) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BucketReplicationResyncStatus) EncodeMsg

func (z *BucketReplicationResyncStatus) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BucketReplicationResyncStatus) MarshalMsg

func (z *BucketReplicationResyncStatus) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BucketReplicationResyncStatus) Msgsize

func (z *BucketReplicationResyncStatus) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BucketReplicationResyncStatus) UnmarshalMsg

func (z *BucketReplicationResyncStatus) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BucketReplicationSourceNotVersioned

type BucketReplicationSourceNotVersioned GenericError

BucketReplicationSourceNotVersioned replication source does not have versioning enabled.

func (BucketReplicationSourceNotVersioned) Error

type BucketReplicationStat

type BucketReplicationStat struct {
	// Pending size in bytes
	//	PendingSize int64 `json:"pendingReplicationSize"`
	// Completed size in bytes
	ReplicatedSize int64 `json:"completedReplicationSize"`
	// Total Replica size in bytes
	ReplicaSize int64 `json:"replicaSize"`
	// Collect stats for failures
	FailStats RTimedMetrics `json:"-"`

	// Total number of failed operations including metadata updates in the last minute
	Failed madmin.TimedErrStats `json:"failed"`
	// Total number of completed operations
	ReplicatedCount int64 `json:"replicationCount"`
	// Replication latency information
	Latency ReplicationLatency `json:"replicationLatency"`
	// bandwidth limit for target
	BandWidthLimitInBytesPerSecond int64 `json:"limitInBits"`
	// current bandwidth reported
	CurrentBandwidthInBytesPerSecond float64 `json:"currentBandwidth"`
	// transfer rate for large uploads
	XferRateLrg *XferStats `json:"-" msg:"lt"`
	// transfer rate for small uploads
	XferRateSml *XferStats `json:"-" msg:"st"`

	// Deprecated fields
	// Pending size in bytes
	PendingSize int64 `json:"pendingReplicationSize"`
	// Failed size in bytes
	FailedSize int64 `json:"failedReplicationSize"`
	// Total number of pending operations including metadata updates
	PendingCount int64 `json:"pendingReplicationCount"`
	// Total number of failed operations including metadata updates
	FailedCount int64 `json:"failedReplicationCount"`
}

BucketReplicationStat represents inline replication statistics such as pending, failed and completed bytes in total for a bucket remote target

func (*BucketReplicationStat) DecodeMsg

func (z *BucketReplicationStat) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BucketReplicationStat) EncodeMsg

func (z *BucketReplicationStat) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BucketReplicationStat) MarshalMsg

func (z *BucketReplicationStat) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BucketReplicationStat) Msgsize

func (z *BucketReplicationStat) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BucketReplicationStat) UnmarshalMsg

func (z *BucketReplicationStat) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BucketReplicationStats

type BucketReplicationStats struct {
	Stats map[string]*BucketReplicationStat `json:",omitempty"`
	// Completed size in bytes
	ReplicatedSize int64 `json:"completedReplicationSize"`
	// Total Replica size in bytes
	ReplicaSize int64 `json:"replicaSize"`
	// Total failed operations including metadata updates for various time frames
	Failed madmin.TimedErrStats `json:"failed"`

	// Total number of completed operations
	ReplicatedCount int64 `json:"replicationCount"`
	// Total number of replica received
	ReplicaCount int64 `json:"replicaCount"`

	// in Queue stats for bucket - from qCache
	QStat InQueueMetric `json:"queued"`
	// Deprecated fields
	// Pending size in bytes
	PendingSize int64 `json:"pendingReplicationSize"`
	// Failed size in bytes
	FailedSize int64 `json:"failedReplicationSize"`
	// Total number of pending operations including metadata updates
	PendingCount int64 `json:"pendingReplicationCount"`
	// Total number of failed operations including metadata updates
	FailedCount int64 `json:"failedReplicationCount"`
}

BucketReplicationStats represents inline replication statistics such as pending, failed and completed bytes in total for a bucket

func (BucketReplicationStats) Clone

Clone creates a new BucketReplicationStats copy

func (*BucketReplicationStats) DecodeMsg

func (z *BucketReplicationStats) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BucketReplicationStats) Empty

func (brs *BucketReplicationStats) Empty() bool

Empty returns true if there are no target stats

func (*BucketReplicationStats) EncodeMsg

func (z *BucketReplicationStats) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BucketReplicationStats) MarshalMsg

func (z *BucketReplicationStats) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BucketReplicationStats) Msgsize

func (z *BucketReplicationStats) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BucketReplicationStats) UnmarshalMsg

func (z *BucketReplicationStats) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BucketSSEConfigNotFound

type BucketSSEConfigNotFound GenericError

BucketSSEConfigNotFound - no bucket encryption found

func (BucketSSEConfigNotFound) Error

func (e BucketSSEConfigNotFound) Error() string

type BucketSSEConfigSys

type BucketSSEConfigSys struct{}

BucketSSEConfigSys - in-memory cache of bucket encryption config

func NewBucketSSEConfigSys

func NewBucketSSEConfigSys() *BucketSSEConfigSys

NewBucketSSEConfigSys - Creates an empty in-memory bucket encryption configuration cache

func (*BucketSSEConfigSys) Get

func (sys *BucketSSEConfigSys) Get(bucket string) (*sse.BucketSSEConfig, error)

Get - gets bucket encryption config for the given bucket.

type BucketStats

type BucketStats struct {
	Uptime           int64                  `json:"uptime"`
	ReplicationStats BucketReplicationStats `json:"currStats"`  // current replication stats since cluster startup
	QueueStats       ReplicationQueueStats  `json:"queueStats"` // replication queue stats
}

BucketStats bucket statistics

func (*BucketStats) DecodeMsg

func (z *BucketStats) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BucketStats) EncodeMsg

func (z *BucketStats) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BucketStats) MarshalMsg

func (z *BucketStats) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BucketStats) Msgsize

func (z *BucketStats) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BucketStats) UnmarshalMsg

func (z *BucketStats) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BucketStatsMap

type BucketStatsMap struct {
	Stats     map[string]BucketStats
	Timestamp time.Time
}

BucketStatsMap captures bucket statistics for all buckets

func (*BucketStatsMap) DecodeMsg

func (z *BucketStatsMap) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BucketStatsMap) EncodeMsg

func (z *BucketStatsMap) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BucketStatsMap) MarshalMsg

func (z *BucketStatsMap) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BucketStatsMap) Msgsize

func (z *BucketStatsMap) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BucketStatsMap) UnmarshalMsg

func (z *BucketStatsMap) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BucketTaggingNotFound

type BucketTaggingNotFound GenericError

BucketTaggingNotFound - no bucket tags found

func (BucketTaggingNotFound) Error

func (e BucketTaggingNotFound) Error() string

type BucketTargetSys

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

BucketTargetSys represents bucket targets subsystem

func NewBucketTargetSys

func NewBucketTargetSys(ctx context.Context) *BucketTargetSys

NewBucketTargetSys - creates new replication system.

func (*BucketTargetSys) Delete

func (sys *BucketTargetSys) Delete(bucket string)

Delete clears targets present for a bucket

func (*BucketTargetSys) GetRemoteBucketTargetByArn

func (sys *BucketTargetSys) GetRemoteBucketTargetByArn(ctx context.Context, bucket, arn string) madmin.BucketTarget

GetRemoteBucketTargetByArn returns BucketTarget for a ARN

func (*BucketTargetSys) GetRemoteTargetClient

func (sys *BucketTargetSys) GetRemoteTargetClient(arn string) *TargetClient

GetRemoteTargetClient returns minio-go client for replication target instance

func (*BucketTargetSys) ListBucketTargets

func (sys *BucketTargetSys) ListBucketTargets(ctx context.Context, bucket string) (*madmin.BucketTargets, error)

ListBucketTargets - gets list of bucket targets for this bucket.

func (*BucketTargetSys) ListTargets

func (sys *BucketTargetSys) ListTargets(ctx context.Context, bucket, arnType string) (targets []madmin.BucketTarget)

ListTargets lists bucket targets across tenant or for individual bucket, and returns results filtered by arnType

func (*BucketTargetSys) RemoveTarget

func (sys *BucketTargetSys) RemoveTarget(ctx context.Context, bucket, arnStr string) error

RemoveTarget - removes a remote bucket target for this source bucket.

func (*BucketTargetSys) SetTarget

func (sys *BucketTargetSys) SetTarget(ctx context.Context, bucket string, tgt *madmin.BucketTarget, update bool) error

SetTarget - sets a new minio-go client target for this bucket.

func (*BucketTargetSys) UpdateAllTargets

func (sys *BucketTargetSys) UpdateAllTargets(bucket string, tgts *madmin.BucketTargets)

UpdateAllTargets updates target to reflect metadata updates

type BucketTargetUsageInfo

type BucketTargetUsageInfo struct {
	ReplicationPendingSize  uint64 `json:"objectsPendingReplicationTotalSize"`
	ReplicationFailedSize   uint64 `json:"objectsFailedReplicationTotalSize"`
	ReplicatedSize          uint64 `json:"objectsReplicatedTotalSize"`
	ReplicaSize             uint64 `json:"objectReplicaTotalSize"`
	ReplicationPendingCount uint64 `json:"objectsPendingReplicationCount"`
	ReplicationFailedCount  uint64 `json:"objectsFailedReplicationCount"`
	ReplicatedCount         uint64 `json:"objectsReplicatedCount"`
}

BucketTargetUsageInfo - bucket target usage info provides - replicated size for all objects sent to this target - replica size for all objects received from this target - replication pending size for all objects pending replication to this target - replication failed size for all objects failed replication to this target - replica pending count - replica failed count

type BucketUsageInfo

type BucketUsageInfo struct {
	Size uint64 `json:"size"`
	// Following five fields suffixed with V1 are here for backward compatibility
	// Total Size for objects that have not yet been replicated
	ReplicationPendingSizeV1 uint64 `json:"objectsPendingReplicationTotalSize"`
	// Total size for objects that have witness one or more failures and will be retried
	ReplicationFailedSizeV1 uint64 `json:"objectsFailedReplicationTotalSize"`
	// Total size for objects that have been replicated to destination
	ReplicatedSizeV1 uint64 `json:"objectsReplicatedTotalSize"`
	// Total number of objects pending replication
	ReplicationPendingCountV1 uint64 `json:"objectsPendingReplicationCount"`
	// Total number of objects that failed replication
	ReplicationFailedCountV1 uint64 `json:"objectsFailedReplicationCount"`

	ObjectsCount            uint64                           `json:"objectsCount"`
	ObjectSizesHistogram    map[string]uint64                `json:"objectsSizesHistogram"`
	ObjectVersionsHistogram map[string]uint64                `json:"objectsVersionsHistogram"`
	VersionsCount           uint64                           `json:"versionsCount"`
	DeleteMarkersCount      uint64                           `json:"deleteMarkersCount"`
	ReplicaSize             uint64                           `json:"objectReplicaTotalSize"`
	ReplicaCount            uint64                           `json:"objectReplicaCount"`
	ReplicationInfo         map[string]BucketTargetUsageInfo `json:"objectsReplicationInfo"`
}

BucketUsageInfo - bucket usage info provides - total size of the bucket - total objects in a bucket - object size histogram per bucket

type BucketVersioningSys

type BucketVersioningSys struct{}

BucketVersioningSys - policy subsystem.

func NewBucketVersioningSys

func NewBucketVersioningSys() *BucketVersioningSys

NewBucketVersioningSys - creates new versioning system.

func (*BucketVersioningSys) Enabled

func (sys *BucketVersioningSys) Enabled(bucket string) bool

Enabled enabled versioning?

func (*BucketVersioningSys) Get

func (sys *BucketVersioningSys) Get(bucket string) (*versioning.Versioning, error)

Get returns stored bucket policy

func (*BucketVersioningSys) PrefixEnabled

func (sys *BucketVersioningSys) PrefixEnabled(bucket, prefix string) bool

PrefixEnabled returns true is versioning is enabled at bucket level and if the given prefix doesn't match any excluded prefixes pattern. This is part of a MinIO versioning configuration extension.

func (*BucketVersioningSys) PrefixSuspended

func (sys *BucketVersioningSys) PrefixSuspended(bucket, prefix string) bool

PrefixSuspended returns true if the given prefix matches an excluded prefix pattern. This is part of a MinIO versioning configuration extension.

func (*BucketVersioningSys) Suspended

func (sys *BucketVersioningSys) Suspended(bucket string) bool

Suspended suspended versioning?

type CheckPreconditionFn

type CheckPreconditionFn func(o ObjectInfo) bool

CheckPreconditionFn returns true if precondition check failed.

type ChecksumAlgo

type ChecksumAlgo uint8

ChecksumAlgo defines common type of different checksum algorithms

const (
	HighwayHash ChecksumAlgo = 1
)

List of currently supported checksum algorithms

func (*ChecksumAlgo) DecodeMsg

func (z *ChecksumAlgo) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ChecksumAlgo) EncodeMsg

func (z ChecksumAlgo) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ChecksumAlgo) MarshalMsg