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

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

MarshalMsg implements msgp.Marshaler

func (ChecksumAlgo) Msgsize

func (z ChecksumAlgo) Msgsize() (s int)

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

func (*ChecksumAlgo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ChecksumInfo

type ChecksumInfo struct {
	PartNumber int
	Algorithm  BitrotAlgorithm
	Hash       []byte
}

ChecksumInfo - carries checksums of individual scattered parts per disk.

func (*ChecksumInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ChecksumInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ChecksumInfo) MarshalJSON

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

MarshalJSON marshals the ChecksumInfo struct

func (*ChecksumInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ChecksumInfo) Msgsize

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

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

func (*ChecksumInfo) UnmarshalJSON

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

UnmarshalJSON - custom checksum info unmarshaller

func (*ChecksumInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ClientGrantsResult

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

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

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

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

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

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

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

type CommonPrefix

type CommonPrefix struct {
	Prefix string
}

CommonPrefix container for prefix response in ListObjectsResponse

type CompleteMultipartUpload

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

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

type CompleteMultipartUploadResponse

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

	Location string
	Bucket   string
	Key      string
	ETag     string

	ChecksumCRC32  string `xml:"ChecksumCRC32,omitempty"`
	ChecksumCRC32C string `xml:"ChecksumCRC32C,omitempty"`
	ChecksumSHA1   string `xml:"ChecksumSHA1,omitempty"`
	ChecksumSHA256 string `xml:"ChecksumSHA256,omitempty"`
}

CompleteMultipartUploadResponse container for completed multipart upload response

type CompletePart

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

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

	// Checksum values. Optional.
	ChecksumCRC32  string
	ChecksumCRC32C string
	ChecksumSHA1   string
	ChecksumSHA256 string
}

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

type ConfigDir

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

ConfigDir - points to a user set directory.

func (*ConfigDir) Get

func (dir *ConfigDir) Get() string

Get - returns current directory.

type ConfigSys

type ConfigSys struct{}

ConfigSys - config system.

func NewConfigSys

func NewConfigSys() *ConfigSys

NewConfigSys - creates new config system object.

func (*ConfigSys) Init

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

Init - initializes config system from config.json.

type ConsoleLogger

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

ConsoleLogger is introduced to workaround the dependency about logrus

type CopyObjectPartResponse

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

CopyObjectPartResponse container returns ETag and LastModified of the successfully copied object

type CopyObjectResponse

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

CopyObjectResponse container returns ETag and LastModified of the successfully copied object

type DailyAllTierStats

type DailyAllTierStats map[string]lastDayTierStats

DailyAllTierStats is used to aggregate last day tier stats across MinIO servers

type DataUsageInfo

type DataUsageInfo struct {
	// LastUpdate is the timestamp of when the data usage info was last updated.
	// This does not indicate a full scan.
	LastUpdate time.Time `json:"lastUpdate"`

	// Objects total count across all buckets
	ObjectsTotalCount uint64 `json:"objectsCount"`

	// Versions total count across all buckets
	VersionsTotalCount uint64 `json:"versionsCount"`

	// Delete markers total count across all buckets
	DeleteMarkersTotalCount uint64 `json:"deleteMarkersCount"`

	// Objects total size across all buckets
	ObjectsTotalSize uint64                           `json:"objectsTotalSize"`
	ReplicationInfo  map[string]BucketTargetUsageInfo `json:"objectsReplicationInfo"`
	// Total number of buckets in this cluster
	BucketsCount uint64 `json:"bucketsCount"`

	// Buckets usage info provides following information across all buckets
	// - total size of the bucket
	// - total objects in a bucket
	// - object size histogram per bucket
	BucketsUsage map[string]BucketUsageInfo `json:"bucketsUsageInfo"`
	// Deprecated kept here for backward compatibility reasons.
	BucketSizes map[string]uint64 `json:"bucketsSizes"`

	// TierStats contains per-tier stats of all configured remote tiers
	TierStats *allTierStats `json:"tierStats,omitempty"`
}

DataUsageInfo represents data usage stats of the underlying Object API

type DecryptBlocksReader

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

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

func (*DecryptBlocksReader) Read

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

type DeleteBucketOptions

type DeleteBucketOptions struct {
	NoLock     bool             // does not lock the delete bucket call if set to 'true'
	NoRecreate bool             // do not recreate bucket on delete failures
	Force      bool             // Force deletion
	SRDeleteOp SRBucketDeleteOp // only when site replication is enabled
}

DeleteBucketOptions provides options for DeleteBucket calls.

type DeleteError

type DeleteError struct {
	Code      string
	Message   string
	Key       string
	VersionID string `xml:"VersionId"`
}

DeleteError structure.

type DeleteMarkerMTime

type DeleteMarkerMTime struct {
	time.Time
}

DeleteMarkerMTime is an embedded type containing time.Time for XML marshal

func (DeleteMarkerMTime) MarshalXML

func (t DeleteMarkerMTime) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error

MarshalXML encodes expiration date if it is non-zero and encodes empty string otherwise

type DeleteMarkerVersion

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

	// Owner of the object.
	Owner Owner

	IsLatest  bool
	VersionID string `xml:"VersionId"`
}

DeleteMarkerVersion container for delete marker metadata

type DeleteObjectsRequest

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

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

type DeleteObjectsResponse

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

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

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

DeleteObjectsResponse container for multiple object deletes.

type DeleteOptions

type DeleteOptions struct {
	Recursive bool
	Force     bool
}

DeleteOptions represents the disk level delete options available for the APIs

type DeleteVersionsErrsResp

type DeleteVersionsErrsResp struct {
	Errs []error
}

DeleteVersionsErrsResp - collection of delete errors for bulk version deletes

type DeletedObject

type DeletedObject struct {
	DeleteMarker          bool   `xml:"DeleteMarker,omitempty"`
	DeleteMarkerVersionID string `xml:"DeleteMarkerVersionId,omitempty"`
	ObjectName            string `xml:"Key,omitempty"`
	VersionID             string `xml:"VersionId,omitempty"`
	// MTime of DeleteMarker on source that needs to be propagated to replica
	DeleteMarkerMTime DeleteMarkerMTime `xml:"-"`
	// MinIO extensions to support delete marker replication
	ReplicationState ReplicationState `xml:"-"`
}

DeletedObject objects deleted

func (*DeletedObject) DeleteMarkerReplicationStatus

func (d *DeletedObject) DeleteMarkerReplicationStatus() replication.StatusType

DeleteMarkerReplicationStatus return composite replication status of delete marker across targets

func (*DeletedObject) VersionPurgeStatus

func (d *DeletedObject) VersionPurgeStatus() VersionPurgeStatusType

VersionPurgeStatus returns a composite version purge status across targets

type DeletedObjectInfo

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

	// Name of the object.
	Name string

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

	// Version ID of this object.
	VersionID string

	// Indicates the deleted marker is latest
	IsLatest bool
}

DeletedObjectInfo - container for list objects versions deleted objects.

type DeletedObjectReplicationInfo

type DeletedObjectReplicationInfo struct {
	DeletedObject
	Bucket    string
	EventType string
	OpType    replication.Type
	ResetID   string
	TargetArn string
}

DeletedObjectReplicationInfo has info on deleted object

func (DeletedObjectReplicationInfo) ToMRFEntry

ToMRFEntry returns the relevant info needed by MRF

type DiskInfo

type DiskInfo struct {
	Total      uint64
	Free       uint64
	Used       uint64
	UsedInodes uint64
	FreeInodes uint64
	Major      uint32
	Minor      uint32
	NRRequests uint64
	FSType     string
	RootDisk   bool
	Healing    bool
	Scanning   bool
	Endpoint   string
	MountPath  string
	ID         string
	Rotational bool
	Metrics    DiskMetrics
	Error      string // carries the error over the network
}

DiskInfo is an extended type which returns current disk usage per path. The above means that any added/deleted fields are incompatible.

The above means that any added/deleted fields are incompatible.

func (*DiskInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*DiskInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*DiskInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*DiskInfo) Msgsize

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

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

func (*DiskInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type DiskMetrics

type DiskMetrics struct {
	LastMinute              map[string]AccElem `json:"apiLatencies,omitempty"`
	APICalls                map[string]uint64  `json:"apiCalls,omitempty"`
	TotalErrorsAvailability uint64             `json:"totalErrsAvailability"`
	TotalErrorsTimeout      uint64             `json:"totalErrsTimeout"`
}

DiskMetrics has the information about XL Storage APIs the number of calls of each API and the moving average of the duration of each API.

func (*DiskMetrics) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*DiskMetrics) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*DiskMetrics) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*DiskMetrics) Msgsize

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

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

func (*DiskMetrics) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type Encryption

type Encryption struct {
	EncryptionType sse.Algorithm `xml:"EncryptionType"`
	KMSContext     string        `xml:"KMSContext,omitempty"`
	KMSKeyID       string        `xml:"KMSKeyId,omitempty"`
}

Encryption specifies encryption setting on restored bucket

type Endpoint

type Endpoint struct {
	*url.URL
	IsLocal bool

	PoolIdx, SetIdx, DiskIdx int
}

Endpoint - any type of endpoint.

func NewEndpoint

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

NewEndpoint - returns new endpoint based on given arguments.

func (Endpoint) HTTPS

func (endpoint Endpoint) HTTPS() bool

HTTPS - returns true if secure for URLEndpointType.

func (*Endpoint) SetDiskIndex

func (endpoint *Endpoint) SetDiskIndex(i int)

SetDiskIndex sets a specific disk number to this node

func (*Endpoint) SetPoolIndex

func (endpoint *Endpoint) SetPoolIndex(i int)

SetPoolIndex sets a specific pool number to this node

func (*Endpoint) SetSetIndex

func (endpoint *Endpoint) SetSetIndex(i int)

SetSetIndex sets a specific set number to this node

func (Endpoint) String

func (endpoint Endpoint) String() string

func (Endpoint) Type

func (endpoint Endpoint) Type() EndpointType

Type - returns type of endpoint.

func (*Endpoint) UpdateIsLocal

func (endpoint *Endpoint) UpdateIsLocal() (err error)

UpdateIsLocal - resolves the host and updates if it is local or not.

type EndpointServerPools

type EndpointServerPools []PoolEndpoints

EndpointServerPools - list of list of endpoints

func (*EndpointServerPools) Add

Add add pool endpoints

func (EndpointServerPools) FirstLocal

func (l EndpointServerPools) FirstLocal() bool

FirstLocal returns true if the first endpoint is local.

func (EndpointServerPools) GetLocalPoolIdx

func (l EndpointServerPools) GetLocalPoolIdx(ep Endpoint) int

GetLocalPoolIdx returns the pool which endpoint belongs to locally. if ep is remote this code will return -1 poolIndex

func (EndpointServerPools) GetNodes

func (l EndpointServerPools) GetNodes() (nodes []Node)

GetNodes returns a sorted list of nodes in this cluster

func (EndpointServerPools) GetPoolIdx

func (l EndpointServerPools) GetPoolIdx(pool string) int

GetPoolIdx return pool index

func (EndpointServerPools) HTTPS

func (l EndpointServerPools) HTTPS() bool

HTTPS - returns true if secure for URLEndpointType.

func (EndpointServerPools) Hostnames

func (l EndpointServerPools) Hostnames() []string

Hostnames - returns list of unique hostnames

func (EndpointServerPools) Legacy

func (l EndpointServerPools) Legacy() bool

Legacy returns 'true' if the MinIO server commandline was provided with no ellipses pattern, those are considered legacy deployments.

func (EndpointServerPools) LocalDisksPaths

func (l EndpointServerPools) LocalDisksPaths() []string

LocalDisksPaths returns the disk paths of the local disks

func (EndpointServerPools) Localhost

func (l EndpointServerPools) Localhost() string

Localhost - returns the local hostname from list of endpoints

func (EndpointServerPools) NEndpoints

func (l EndpointServerPools) NEndpoints() (count int)

NEndpoints - returns number of endpoints

func (EndpointServerPools) NLocalDisksPathsPerPool

func (l EndpointServerPools) NLocalDisksPathsPerPool() []int

NLocalDisksPathsPerPool returns the disk paths of the local disks per pool

type EndpointType

type EndpointType int

EndpointType - enum for endpoint type.

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

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

type Endpoints

type Endpoints []Endpoint

Endpoints - list of same type of endpoint.

func NewEndpoints

func NewEndpoints(args ...string) (endpoints Endpoints, err error)

NewEndpoints - returns new endpoint list based on input args.

func (Endpoints) GetAllStrings

func (endpoints Endpoints) GetAllStrings() (all []string)

GetAllStrings - returns allstring of all endpoints

func (Endpoints) GetString

func (endpoints Endpoints) GetString(i int) string

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

func (Endpoints) HTTPS

func (endpoints Endpoints) HTTPS() bool

HTTPS - returns true if secure for URLEndpointType.

func (Endpoints) UpdateIsLocal

func (endpoints Endpoints) UpdateIsLocal() error

UpdateIsLocal - resolves the host and discovers the local host.

type Erasure

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

Erasure - erasure encoding details.

func NewErasure

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

NewErasure creates a new ErasureStorage.

func (Erasure) Decode

func (e Erasure) Decode(ctx context.Context, writer io.Writer, readers []io.ReaderAt, offset, length, totalLength int64, prefer []bool) (written int64, derr error)

Decode reads from readers, reconstructs data if needed and writes the data to the writer. A set of preferred drives can be supplied. In that case they will be used and the data reconstructed.

func (*Erasure) DecodeDataAndParityBlocks

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

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

func (*Erasure) DecodeDataBlocks

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

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

func (*Erasure) Encode

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

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

func (*Erasure) EncodeData

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

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

func (Erasure) Heal

func (e Erasure) Heal(ctx context.Context, writers []io.Writer, readers []io.ReaderAt, totalLength int64, prefer []bool) (derr error)

Heal reads from readers, reconstruct shards and writes the data to the writers.

func (*Erasure) ShardFileOffset

func (e *Erasure) ShardFileOffset(startOffset, length, totalLength int64) int64

ShardFileOffset - returns the effective offset where erasure reading begins.

func (*Erasure) ShardFileSize

func (e *Erasure) ShardFileSize(totalLength int64) int64

ShardFileSize - returns final erasure size from original size.

func (*Erasure) ShardSize

func (e *Erasure) ShardSize() int64

ShardSize - returns actual shared size from erasure blockSize.

type ErasureAlgo

type ErasureAlgo uint8

ErasureAlgo defines common type of different erasure algorithms

const (
	ReedSolomon ErasureAlgo = 1
)

List of currently supported erasure coding algorithms

func (*ErasureAlgo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ErasureAlgo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ErasureAlgo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ErasureAlgo) Msgsize

func (z ErasureAlgo) Msgsize() (s int)

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

func (ErasureAlgo) String

func (i ErasureAlgo) String() string

func (*ErasureAlgo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ErasureInfo

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

ErasureInfo holds erasure coding and bitrot related information.

func (*ErasureInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ErasureInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ErasureInfo) Equal

func (ei ErasureInfo) Equal(nei ErasureInfo) bool

Equal equates current erasure info with newer erasure info. returns false if one of the following check fails - erasure algorithm is different - data blocks are different - parity blocks are different - block size is different - distribution array size is different - distribution indexes are different

func (ErasureInfo) GetChecksumInfo

func (e ErasureInfo) GetChecksumInfo(partNumber int) (ckSum ChecksumInfo)

GetChecksumInfo - get checksum of a part.

func (*ErasureInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ErasureInfo) Msgsize

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

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

func (ErasureInfo) ShardFileSize

func (e ErasureInfo) ShardFileSize(totalLength int64) int64

ShardFileSize - returns final erasure size from original size.

func (ErasureInfo) ShardSize

func (e ErasureInfo) ShardSize() int64

ShardSize - returns actual shared size from erasure blockSize.

func (*ErasureInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type EvalMetadataFn

type EvalMetadataFn func(o *ObjectInfo, gerr error) (ReplicateDecision, error)

EvalMetadataFn validates input objInfo and GetObjectInfo error and returns an updated metadata and replication decision if any

type EvalRetentionBypassFn

type EvalRetentionBypassFn func(o ObjectInfo, gerr error) error

EvalRetentionBypassFn validates input objInfo and GetObjectInfo error and returns an error if retention bypass is not allowed.

type EventNotifier

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

EventNotifier - notifies external systems about events in MinIO.

func NewEventNotifier

func NewEventNotifier() *EventNotifier

NewEventNotifier - creates new event notification object.

func (*EventNotifier) AddRulesMap

func (evnot *EventNotifier) AddRulesMap(bucketName string, rulesMap event.RulesMap)

AddRulesMap - adds rules map for bucket name.

func (*EventNotifier) ConfiguredTargetIDs

func (evnot *EventNotifier) ConfiguredTargetIDs() []event.TargetID

ConfiguredTargetIDs - returns list of configured target id's

func (*EventNotifier) GetARNList

func (evnot *EventNotifier) GetARNList(onlyActive bool) []string

GetARNList - returns available ARNs.

func (*EventNotifier) InitBucketTargets

func (evnot *EventNotifier) InitBucketTargets(ctx context.Context, objAPI ObjectLayer) error

InitBucketTargets - initializes event notification system from notification.xml of all buckets.

func (*EventNotifier) RemoveAllBucketTargets

func (evnot *EventNotifier) RemoveAllBucketTargets()

RemoveAllBucketTargets - closes and removes all notification targets.

func (*EventNotifier) RemoveNotification

func (evnot *EventNotifier) RemoveNotification(bucketName string)

RemoveNotification - removes all notification configuration for bucket name.

func (*EventNotifier) RemoveRulesMap

func (evnot *EventNotifier) RemoveRulesMap(bucketName string, rulesMap event.RulesMap)

RemoveRulesMap - removes rules map for bucket name.

func (*EventNotifier) Send

func (evnot *EventNotifier) Send(args eventArgs)

Send - sends the event to all registered notification targets

type ExpirationOptions

type ExpirationOptions struct {
	Expire bool
}

ExpirationOptions represents object options for object expiration at objectLayer.

type FileInfo

type FileInfo struct {
	// Name of the volume.
	Volume string `msg:"v,omitempty"`

	// Name of the file.
	Name string `msg:"n,omitempty"`

	// Version of the file.
	VersionID string `msg:"vid,omitempty"`

	// Indicates if the version is the latest
	IsLatest bool `msg:"is"`

	// Deleted is set when this FileInfo represents
	// a deleted marker for a versioned bucket.
	Deleted bool `msg:"del"`

	// TransitionStatus is set to Pending/Complete for transitioned
	// entries based on state of transition
	TransitionStatus string `msg:"ts"`
	// TransitionedObjName is the object name on the remote tier corresponding
	// to object (version) on the source tier.
	TransitionedObjName string `msg:"to"`
	// TransitionTier is the storage class label assigned to remote tier.
	TransitionTier string `msg:"tt"`
	// TransitionVersionID stores a version ID of the object associate
	// with the remote tier.
	TransitionVersionID string `msg:"tv"`
	// ExpireRestored indicates that the restored object is to be expired.
	ExpireRestored bool `msg:"exp"`

	// DataDir of the file
	DataDir string `msg:"dd"`

	// Indicates if this object is still in V1 format.
	XLV1 bool `msg:"v1"`

	// Date and time when the file was last modified, if Deleted
	// is 'true' this value represents when while was deleted.
	ModTime time.Time `msg:"mt"`

	// Total file size.
	Size int64 `msg:"sz"`

	// File mode bits.
	Mode uint32 `msg:"m"`

	// WrittenByVersion is the unix time stamp of the MinIO
	// version that created this version of the object.
	WrittenByVersion uint64 `msg:"wv"`

	// File metadata
	Metadata map[string]string `msg:"meta"`

	// All the parts per object.
	Parts []ObjectPartInfo `msg:"parts"`

	// Erasure info for all objects.
	Erasure ErasureInfo `msg:"ei"`

	MarkDeleted      bool             `msg:"md"` // mark this version as deleted
	ReplicationState ReplicationState `msg:"rs"` // Internal replication state to be passed back in ObjectInfo

	Data []byte `msg:"d,allownil"` // optionally carries object data

	NumVersions      int       `msg:"nv"`
	SuccessorModTime time.Time `msg:"smt"`

	Fresh bool `msg:"fr"` // indicates this is a first time call to write FileInfo.

	// Position of this version or object in a multi-object delete call,
	// no other caller must set this value other than multi-object delete call.
	// usage in other calls in undefined please avoid.
	Idx int `msg:"i"`

	// DiskMTime indicates the mtime of the xl.meta on disk
	// This is mainly used for detecting a particular issue
	// reported in https://gitlab.com/t6085/minio/pull/13803
	DiskMTime time.Time `msg:"dmt"`

	// Combined checksum when object was uploaded.
	Checksum []byte `msg:"cs,allownil"`

	// Versioned - indicates if this file is versioned or not.
	Versioned bool `msg:"vs"`
}

FileInfo - represents file stat information. The above means that any added/deleted fields are incompatible. Make sure to bump the internode version at storage-rest-common.go

func (FileInfo) AcceptableDelta

func (fi FileInfo) AcceptableDelta(maxTime time.Time, delta time.Duration) bool

AcceptableDelta returns 'true' if the fi.DiskMTime is under acceptable delta of "delta" duration with maxTime.

This code is primarily used for heuristic detection of incorrect shards, as per https://gitlab.com/t6085/minio/pull/13803

This check only is active if we could find maximally occurring disk mtimes that are somewhat same across the quorum. Allowing to skip those shards which we might think are wrong.

func (*FileInfo) AddObjectPart

func (fi *FileInfo) AddObjectPart(partNumber int, partETag string, partSize, actualSize int64, modTime time.Time, idx []byte, checksums map[string]string)

AddObjectPart - add a new object part in order.

func (FileInfo) DataShardFixed

func (fi FileInfo) DataShardFixed() bool

DataShardFixed - data shard fixed?

func (*FileInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*FileInfo) DeleteMarkerReplicationStatus

func (fi *FileInfo) DeleteMarkerReplicationStatus() replication.StatusType

DeleteMarkerReplicationStatus returns overall replication status for this delete marker version across targets

func (*FileInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (FileInfo) Equals

func (fi FileInfo) Equals(ofi FileInfo) (ok bool)

Equals checks if fi(FileInfo) matches ofi(FileInfo)

func (FileInfo) GetActualSize

func (fi FileInfo) GetActualSize() (int64, error)

GetActualSize - returns the actual size of the stored object

func (FileInfo) GetDataDir

func (fi FileInfo) GetDataDir() string

GetDataDir returns an expected dataDir given FileInfo

  • deleteMarker returns "delete-marker"
  • returns "legacy" if FileInfo is XLV1 and DataDir is empty, returns DataDir otherwise
  • returns "dataDir"

func (FileInfo) Healing

func (fi FileInfo) Healing() bool

Healing returns true if object is being healed (i.e fi is being passed down from healObject)

func (FileInfo) InlineData

func (fi FileInfo) InlineData() bool

InlineData returns true if object contents are inlined alongside its metadata.

func (FileInfo) IsRemote

func (fi FileInfo) IsRemote() bool

IsRemote returns true if this object version's contents are in its remote tier.

func (*FileInfo) IsRestoreObjReq

func (fi *FileInfo) IsRestoreObjReq() bool

IsRestoreObjReq returns true if fi corresponds to a RestoreObject request.

func (FileInfo) IsValid

func (fi FileInfo) IsValid() bool

IsValid - tells if erasure info fields are valid.

func (*FileInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (FileInfo) MetadataEquals

func (fi FileInfo) MetadataEquals(ofi FileInfo) bool

MetadataEquals returns true if FileInfos Metadata maps are equal, false otherwise.

func (*FileInfo) Msgsize

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

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

func (FileInfo) ObjectToPartOffset

func (fi FileInfo) ObjectToPartOffset(ctx context.Context, offset int64) (partIndex int, partOffset int64, err error)

ObjectToPartOffset - translate offset of an object to offset of its individual part.

func (FileInfo) ReadQuorum

func (fi FileInfo) ReadQuorum(dquorum int) int

ReadQuorum returns expected read quorum for this FileInfo

func (FileInfo) ReplicationInfoEquals

func (fi FileInfo) ReplicationInfoEquals(ofi FileInfo) bool

ReplicationInfoEquals returns true if server-side replication related fields are equal, false otherwise.

func (*FileInfo) ReplicationStatus

func (fi *FileInfo) ReplicationStatus() replication.StatusType

ReplicationStatus returns overall version replication status for this object version across targets

func (*FileInfo) SetHealing

func (fi *FileInfo) SetHealing()

SetHealing marks object (version) as being healed. Note: this is to be used only from healObject

func (*FileInfo) SetInlineData

func (fi *FileInfo) SetInlineData()

SetInlineData marks object (version) as inline.

func (*FileInfo) SetTierFreeVersion

func (fi *FileInfo) SetTierFreeVersion()

SetTierFreeVersion sets fi as a free-version. This method is used by lower layers to indicate a free-version.

func (*FileInfo) SetTierFreeVersionID

func (fi *FileInfo) SetTierFreeVersionID(versionID string)

SetTierFreeVersionID sets free-version's versionID. This method is used by object layer to pass down a versionID to set for a free-version that may be created.

func (*FileInfo) TierFreeVersion

func (fi *FileInfo) TierFreeVersion() bool

TierFreeVersion returns true if version is a free-version.

func (*FileInfo) TierFreeVersionID

func (fi *FileInfo) TierFreeVersionID() string

TierFreeVersionID returns the free-version's version id.

func (FileInfo) ToObjectInfo

func (fi FileInfo) ToObjectInfo(bucket, object string, versioned bool) ObjectInfo

ToObjectInfo - Converts metadata to object info.

func (FileInfo) TransitionInfoEquals

func (fi FileInfo) TransitionInfoEquals(ofi FileInfo) bool

TransitionInfoEquals returns true if transition related information are equal, false otherwise.

func (*FileInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

func (*FileInfo) VersionPurgeStatus

func (fi *FileInfo) VersionPurgeStatus() VersionPurgeStatusType

VersionPurgeStatus returns overall version purge status for this object version across targets

func (FileInfo) WriteQuorum

func (fi FileInfo) WriteQuorum(dquorum int) int

WriteQuorum returns expected write quorum for this FileInfo

type FileInfoVersions

type FileInfoVersions struct {
	// Name of the volume.
	Volume string `msg:"v,omitempty"`

	// Name of the file.
	Name string `msg:"n,omitempty"`

	// Represents the latest mod time of the
	// latest version.
	LatestModTime time.Time `msg:"lm"`

	Versions     []FileInfo `msg:"vs"`
	FreeVersions []FileInfo `msg:"fvs"`
}

FileInfoVersions represent a list of versions for a given file. The above means that any added/deleted fields are incompatible.

The above means that any added/deleted fields are incompatible.

func (*FileInfoVersions) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*FileInfoVersions) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*FileInfoVersions) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*FileInfoVersions) Msgsize

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

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

func (FileInfoVersions) Size

func (f FileInfoVersions) Size() (size int64)

Size returns size of all versions for the object 'Name'

func (*FileInfoVersions) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type FileLogger

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

FileLogger is introduced to workaround the dependency about logrus

type FilesInfo

type FilesInfo struct {
	Files       []FileInfo
	IsTruncated bool
}

FilesInfo represent a list of files, additionally indicates if the list is last.

func (*FilesInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*FilesInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*FilesInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*FilesInfo) Msgsize

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

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

func (*FilesInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type GenericError

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

GenericError - generic object layer error.

func (GenericError) Unwrap

func (e GenericError) Unwrap() error

Unwrap the error to its underlying error.

type GetObjectInfoFn

type GetObjectInfoFn func(ctx context.Context, bucket, object string, opts ObjectOptions) (ObjectInfo, error)

GetObjectInfoFn is the signature of GetObjectInfo function.

type GetObjectReader

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

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

func NewGetObjectReaderFromReader

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

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

func (*GetObjectReader) Close

func (g *GetObjectReader) Close() error

Close - calls the cleanup actions in reverse order

func (*GetObjectReader) WithCleanupFuncs

func (g *GetObjectReader) WithCleanupFuncs(fns ...func()) *GetObjectReader

WithCleanupFuncs sets additional cleanup functions to be called when closing the GetObjectReader.

type GroupInfo

type GroupInfo struct {
	Version   int       `json:"version"`
	Status    string    `json:"status"`
	Members   []string  `json:"members"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

GroupInfo contains info about a group

type HTTPAPIStats

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

HTTPAPIStats holds statistics information about a given API in the requests.

func (*HTTPAPIStats) Dec

func (stats *HTTPAPIStats) Dec(api string)

Dec increments the api stats counter.

func (*HTTPAPIStats) Get

func (stats *HTTPAPIStats) Get(api string) int

Get returns the current counter on input API string

func (*HTTPAPIStats) Inc

func (stats *HTTPAPIStats) Inc(api string)

Inc increments the api stats counter.

func (*HTTPAPIStats) Load

func (stats *HTTPAPIStats) Load() map[string]int

Load returns the recorded stats.

type HTTPConsoleLoggerSys

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

HTTPConsoleLoggerSys holds global console logger state

func NewConsoleLogger

func NewConsoleLogger(ctx context.Context) *HTTPConsoleLoggerSys

NewConsoleLogger - creates new HTTPConsoleLoggerSys with all nodes subscribed to the console logging pub sub system

func (*HTTPConsoleLoggerSys) Cancel

func (sys *HTTPConsoleLoggerSys) Cancel()

Cancel - cancels the target

func (*HTTPConsoleLoggerSys) Content

func (sys *HTTPConsoleLoggerSys) Content() (logs []log.Entry)

Content returns the console stdout log

func (*HTTPConsoleLoggerSys) Endpoint

func (sys *HTTPConsoleLoggerSys) Endpoint() string

Endpoint - dummy function for interface compatibility

func (*HTTPConsoleLoggerSys) HasLogListeners

func (sys *HTTPConsoleLoggerSys) HasLogListeners() bool

HasLogListeners returns true if console log listeners are registered for this node or peers

func (*HTTPConsoleLoggerSys) Init

Init if HTTPConsoleLoggerSys is valid, always returns nil right now

func (*HTTPConsoleLoggerSys) IsOnline

func (sys *HTTPConsoleLoggerSys) IsOnline(_ context.Context) bool

IsOnline always true in case of console logger

func (*HTTPConsoleLoggerSys) Send

func (sys *HTTPConsoleLoggerSys) Send(ctx context.Context, entry interface{}) error

Send log message 'e' to console and publish to console log pubsub system

func (*HTTPConsoleLoggerSys) SetNodeName

func (sys *HTTPConsoleLoggerSys) SetNodeName(nodeName string)

SetNodeName - sets the node name if any after distributed setup has initialized

func (*HTTPConsoleLoggerSys) Stats

func (sys *HTTPConsoleLoggerSys) Stats() types.TargetStats

Stats returns the target statistics.

func (*HTTPConsoleLoggerSys) String

func (sys *HTTPConsoleLoggerSys) String() string

String - stringer function for interface compatibility

func (*HTTPConsoleLoggerSys) Subscribe

func (sys *HTTPConsoleLoggerSys) Subscribe(subCh chan log.Info, doneCh <-chan struct{}, node string, last int, logKind madmin.LogMask, filter func(entry log.Info) bool) error

Subscribe starts console logging for this node.

func (*HTTPConsoleLoggerSys) Type

Type - returns type of the target

type HTTPRangeSpec

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

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

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

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

func (*HTTPRangeSpec) GetLength

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

GetLength - get length of range

func (*HTTPRangeSpec) GetOffsetLength

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

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

func (*HTTPRangeSpec) String

func (h *HTTPRangeSpec) String(resourceSize int64) string

String returns stringified representation of range for a particular resource size.

func (*HTTPRangeSpec) ToHeader

func (h *HTTPRangeSpec) ToHeader() (string, error)

ToHeader returns the Range header value.

type HTTPStats

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

HTTPStats holds statistics information about HTTP requests made by all clients

type HealObjectFn

type HealObjectFn func(bucket, object, versionID string) error

HealObjectFn closure function heals the object.

type HealthOptions

type HealthOptions struct {
	Maintenance    bool
	DeploymentType string
}

HealthOptions takes input options to return sepcific information

type HealthResult

type HealthResult struct {
	Healthy        bool
	HealingDrives  int
	UnhealthyPools []struct {
		Maintenance   bool
		PoolID, SetID int
		WriteQuorum   int
	}
	WriteQuorum   int
	UsingDefaults bool
}

HealthResult returns the current state of the system, also additionally with any specific heuristic information which was queried

type Help

type Help struct {
	SubSys          string         `json:"subSys"`
	Description     string         `json:"description"`
	MultipleTargets bool           `json:"multipleTargets"`
	KeysHelp        config.HelpKVS `json:"keysHelp"`
}

Help - return sub-system level help

func GetHelp

func GetHelp(subSys, key string, envOnly bool) (Help, error)

GetHelp - returns help for sub-sys, a key for a sub-system or all the help.

type IAMEtcdStore

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

IAMEtcdStore implements IAMStorageAPI

type IAMObjectStore

type IAMObjectStore struct {
	// Protect access to storage within the current server.
	sync.RWMutex
	// contains filtered or unexported fields
}

IAMObjectStore implements IAMStorageAPI

func (*IAMObjectStore) PurgeExpiredSTS

func (iamOS *IAMObjectStore) PurgeExpiredSTS(ctx context.Context) error

PurgeExpiredSTS - purge expired STS credentials from object store.

type IAMStorageAPI

type IAMStorageAPI interface {
	// contains filtered or unexported methods
}

IAMStorageAPI defines an interface for the IAM persistence layer

type IAMStoreSys

type IAMStoreSys struct {
	IAMStorageAPI
}

IAMStoreSys contains IAMStorageAPI to add higher-level methods on the storage layer.

func (*IAMStoreSys) AddServiceAccount

func (store *IAMStoreSys) AddServiceAccount(ctx context.Context, cred auth.Credentials) (updatedAt time.Time, err error)

AddServiceAccount - add a new service account

func (*IAMStoreSys) AddUser

func (store *IAMStoreSys) AddUser(ctx context.Context, accessKey string, ureq madmin.AddOrUpdateUserReq) (updatedAt time.Time, err error)

AddUser - adds/updates long term user account to storage.

func (*IAMStoreSys) AddUsersToGroup

func (store *IAMStoreSys) AddUsersToGroup(ctx context.Context, group string, members []string) (updatedAt time.Time, err error)

AddUsersToGroup - adds users to group, creating the group if needed.

func (*IAMStoreSys) DeletePolicy

func (store *IAMStoreSys) DeletePolicy(ctx context.Context, policy string) error

DeletePolicy - deletes policy from storage and cache.

func (*IAMStoreSys) DeleteUser

func (store *IAMStoreSys) DeleteUser(ctx context.Context, accessKey string, userType IAMUserType) error

DeleteUser - deletes a user from storage and cache. This only used with long-term users and service accounts, not STS.

func (*IAMStoreSys) DeleteUsers

func (store *IAMStoreSys) DeleteUsers(ctx context.Context, users []string) error

DeleteUsers - given a set of users or access keys, deletes them along with any derived credentials (STS or service accounts) and any associated policy mappings.

func (*IAMStoreSys) FilterPolicies

func (store *IAMStoreSys) FilterPolicies(policyName string, bucketName string) (string, policy.Policy)

FilterPolicies - accepts a comma separated list of policy names as a string and bucket and returns only policies that currently exist in MinIO. If bucketName is non-empty, additionally filters policies matching the bucket. The first returned value is the list of currently existing policies, and the second is their combined policy definition.

func (*IAMStoreSys) GetAllParentUsers

func (store *IAMStoreSys) GetAllParentUsers() map[string]ParentUserInfo

GetAllParentUsers - returns all distinct "parent-users" associated with STS or service credentials, mapped to all distinct roleARNs associated with the parent user. The dummy role ARN is associated with parent users from policy-claim based OpenID providers.

func (*IAMStoreSys) GetBucketUsers

func (store *IAMStoreSys) GetBucketUsers(bucket string) (map[string]madmin.UserInfo, error)

GetBucketUsers - returns users (not STS or service accounts) that have access to the bucket. User is included even if a group policy that grants access to the bucket is disabled.

func (*IAMStoreSys) GetGroupDescription

func (store *IAMStoreSys) GetGroupDescription(group string) (gd madmin.GroupDesc, err error)

GetGroupDescription - builds up group description

func (*IAMStoreSys) GetMappedPolicy

func (store *IAMStoreSys) GetMappedPolicy(name string, isGroup bool) (MappedPolicy, bool)

GetMappedPolicy - fetches mapped policy from memory.

func (*IAMStoreSys) GetPolicy

func (store *IAMStoreSys) GetPolicy(name string) (policy.Policy, error)

GetPolicy - gets the policy definition. Allows specifying multiple comma separated policies - returns a combined policy.

func (*IAMStoreSys) GetPolicyDoc

func (store *IAMStoreSys) GetPolicyDoc(name string) (r PolicyDoc, err error)

GetPolicyDoc - gets the policy doc which has the policy and some metadata. Exactly one policy must be specified here.

func (*IAMStoreSys) GetSTSAndServiceAccounts

func (store *IAMStoreSys) GetSTSAndServiceAccounts() []auth.Credentials

GetSTSAndServiceAccounts - returns all STS and Service account credentials.

func (*IAMStoreSys) GetUser

func (store *IAMStoreSys) GetUser(user string) (UserIdentity, bool)

GetUser - fetches credential from memory.

func (*IAMStoreSys) GetUserInfo

func (store *IAMStoreSys) GetUserInfo(name string) (u madmin.UserInfo, err error)

GetUserInfo - get info on a user.

func (*IAMStoreSys) GetUsers

func (store *IAMStoreSys) GetUsers() map[string]madmin.UserInfo

GetUsers - returns all users (not STS or service accounts).

func (*IAMStoreSys) GetUsersWithMappedPolicies

func (store *IAMStoreSys) GetUsersWithMappedPolicies() map[string]string

GetUsersWithMappedPolicies - safely returns the name of access keys with associated policies

func (*IAMStoreSys) GroupNotificationHandler

func (store *IAMStoreSys) GroupNotificationHandler(ctx context.Context, group string) error

GroupNotificationHandler - updates in-memory cache on notification of change (e.g. peer notification for object storage and etcd watch notification).

func (*IAMStoreSys) HasWatcher

func (store *IAMStoreSys) HasWatcher() bool

HasWatcher - returns if the storage system has a watcher.

func (*IAMStoreSys) ListGroups

func (store *IAMStoreSys) ListGroups(ctx context.Context) (res []string, err error)

ListGroups - lists groups. Since this is not going to be a frequent operation, we fetch this info from storage, and refresh the cache as well.

func (*IAMStoreSys) ListPolicies

func (store *IAMStoreSys) ListPolicies(ctx context.Context, bucketName string) (map[string]policy.Policy, error)

ListPolicies - fetches all policies from storage and updates cache as well. If bucketName is non-empty, returns policies matching the bucket.

func (*IAMStoreSys) ListPolicyDocs

func (store *IAMStoreSys) ListPolicyDocs(ctx context.Context, bucketName string) (map[string]PolicyDoc, error)

ListPolicyDocs - fetches all policy docs from storage and updates cache as well. If bucketName is non-empty, returns policy docs matching the bucket.

func (*IAMStoreSys) ListPolicyMappings

func (store *IAMStoreSys) ListPolicyMappings(q madmin.PolicyEntitiesQuery,
	userPredicate, groupPredicate func(string) bool,
) madmin.PolicyEntitiesResult

ListPolicyMappings - return users/groups mapped to policies.

func (*IAMStoreSys) ListServiceAccounts

func (store *IAMStoreSys) ListServiceAccounts(ctx context.Context, accessKey string) ([]auth.Credentials, error)

ListServiceAccounts - lists only service accounts from the cache.

func (*IAMStoreSys) ListTempAccounts

func (store *IAMStoreSys) ListTempAccounts(ctx context.Context, accessKey string) ([]UserIdentity, error)

ListTempAccounts - lists only temporary accounts from the cache.

func (*IAMStoreSys) LoadIAMCache

func (store *IAMStoreSys) LoadIAMCache(ctx context.Context) error

LoadIAMCache reads all IAM items and populates a new iamCache object and replaces the in-memory cache object.

func (*IAMStoreSys) LoadUser

func (store *IAMStoreSys) LoadUser(ctx context.Context, accessKey string)

LoadUser - attempts to load user info from storage and updates cache.

func (*IAMStoreSys) PolicyDBGet

func (store *IAMStoreSys) PolicyDBGet(name string, isGroup bool, groups ...string) ([]string, error)

PolicyDBGet - fetches policies associated with the given user or group, and additional groups if provided.

func (*IAMStoreSys) PolicyDBSet

func (store *IAMStoreSys) PolicyDBSet(ctx context.Context, name, policy string, userType IAMUserType, isGroup bool) (updatedAt time.Time, err error)

PolicyDBSet - update the policy mapping for the given user or group in storage and in cache. We do not check for the existence of the user here since users can be virtual, such as for:

  • LDAP users
  • CommonName for STS accounts generated by AssumeRoleWithCertificate

func (*IAMStoreSys) PolicyDBUpdate

func (store *IAMStoreSys) PolicyDBUpdate(ctx context.Context, name string, isGroup bool,
	userType IAMUserType, policies []string, isAttach bool) (updatedAt time.Time,
	addedOrRemoved, effectivePolicies []string, err error,
)

PolicyDBUpdate - adds or removes given policies to/from the user or group's policy associations.

func (*IAMStoreSys) PolicyMappingNotificationHandler

func (store *IAMStoreSys) PolicyMappingNotificationHandler(ctx context.Context, userOrGroup string, isGroup bool, userType IAMUserType) error

PolicyMappingNotificationHandler - handles updating a policy mapping from storage.

func (*IAMStoreSys) PolicyNotificationHandler

func (store *IAMStoreSys) PolicyNotificationHandler(ctx context.Context, policy string) error

PolicyNotificationHandler - loads given policy from storage. If not present, deletes from cache. This notification only reads from storage, and updates cache. When the notification is for a policy deletion, it updates the user-policy and group-policy maps as well.

func (*IAMStoreSys) PurgeExpiredSTS

func (store *IAMStoreSys) PurgeExpiredSTS(ctx context.Context) error

PurgeExpiredSTS - purges expired STS credentials.

func (*IAMStoreSys) RemoveUsersFromGroup

func (store *IAMStoreSys) RemoveUsersFromGroup(ctx context.Context, group string, members []string) (updatedAt time.Time, err error)

RemoveUsersFromGroup - removes users from group, deleting it if it is empty.

func (*IAMStoreSys) SetGroupStatus

func (store *IAMStoreSys) SetGroupStatus(ctx context.Context, group string, enabled bool) (updatedAt time.Time, err error)

SetGroupStatus - updates group status

func (*IAMStoreSys) SetPolicy

func (store *IAMStoreSys) SetPolicy(ctx context.Context, name string, policy policy.Policy) (time.Time, error)

SetPolicy - creates a policy with name.

func (*IAMStoreSys) SetTempUser

func (store *IAMStoreSys) SetTempUser(ctx context.Context, accessKey string, cred auth.Credentials, policyName string) (time.Time, error)

SetTempUser - saves temporary (STS) credential to storage and cache. If a policy name is given, it is associated with the parent user specified in the credential.

func (*IAMStoreSys) SetUserStatus

func (store *IAMStoreSys) SetUserStatus(ctx context.Context, accessKey string, status madmin.AccountStatus) (updatedAt time.Time, err error)

SetUserStatus - sets current user status.

func (*IAMStoreSys) UpdateServiceAccount

func (store *IAMStoreSys) UpdateServiceAccount(ctx context.Context, accessKey string, opts updateServiceAccountOpts) (updatedAt time.Time, err error)

UpdateServiceAccount - updates a service account on storage.

func (*IAMStoreSys) UpdateUserIdentity

func (store *IAMStoreSys) UpdateUserIdentity(ctx context.Context, cred auth.Credentials) error

UpdateUserIdentity - updates a user credential.

func (*IAMStoreSys) UpdateUserSecretKey

func (store *IAMStoreSys) UpdateUserSecretKey(ctx context.Context, accessKey, secretKey string) error

UpdateUserSecretKey - sets user secret key to storage.

func (*IAMStoreSys) UserNotificationHandler

func (store *IAMStoreSys) UserNotificationHandler(ctx context.Context, accessKey string, userType IAMUserType) error

UserNotificationHandler - handles updating a user/STS account/service account from storage.

type IAMSys

type IAMSys struct {
	// Need to keep them here to keep alignment - ref: https://golang.org/pkg/sync/atomic/#pkg-note-BUG
	// metrics
	LastRefreshTimeUnixNano         uint64
	LastRefreshDurationMilliseconds uint64
	TotalRefreshSuccesses           uint64
	TotalRefreshFailures            uint64

	sync.Mutex

	LDAPConfig   xldap.Config  // only valid if usersSysType is LDAPUsers
	OpenIDConfig openid.Config // only valid if OpenID is configured
	STSTLSConfig xtls.Config   // only valid if STS TLS is configured
	// contains filtered or unexported fields
}

IAMSys - config system.

func NewIAMSys

func NewIAMSys() *IAMSys

NewIAMSys - creates new config system object.

func (*IAMSys) AddUsersToGroup

func (sys *IAMSys) AddUsersToGroup(ctx context.Context, group string, members []string) (updatedAt time.Time, err error)

AddUsersToGroup - adds users to a group, creating the group if needed. No error if user(s) already are in the group.

func (*IAMSys) CreateUser

func (sys *IAMSys) CreateUser(ctx context.Context, accessKey string, ureq madmin.AddOrUpdateUserReq) (updatedAt time.Time, err error)

CreateUser - create new user credentials and policy, if user already exists they shall be rewritten with new inputs.

func (*IAMSys) CurrentPolicies

func (sys *IAMSys) CurrentPolicies(policyName string) string

CurrentPolicies - returns comma separated policy string, from an input policy after validating if there are any current policies which exist on MinIO corresponding to the input.

func (*IAMSys) DeletePolicy

func (sys *IAMSys) DeletePolicy(ctx context.Context, policyName string, notifyPeers bool) error

DeletePolicy - deletes a canned policy from backend or etcd.

func (*IAMSys) DeleteServiceAccount

func (sys *IAMSys) DeleteServiceAccount(ctx context.Context, accessKey string, notifyPeers bool) error

DeleteServiceAccount - delete a service account

func (*IAMSys) DeleteUser

func (sys *IAMSys) DeleteUser(ctx context.Context, accessKey string, notifyPeers bool) error

DeleteUser - delete user (only for long-term users not STS users).

func (*IAMSys) GetClaimsForSvcAcc

func (sys *IAMSys) GetClaimsForSvcAcc(ctx context.Context, accessKey string) (map[string]interface{}, error)

GetClaimsForSvcAcc - gets the claims associated with the service account.

func (*IAMSys) GetCombinedPolicy

func (sys *IAMSys) GetCombinedPolicy(policies ...string) policy.Policy

GetCombinedPolicy returns a combined policy combining all policies

func (*IAMSys) GetGroupDescription

func (sys *IAMSys) GetGroupDescription(group string) (gd madmin.GroupDesc, err error)

GetGroupDescription - builds up group description

func (*IAMSys) GetRolePolicy

func (sys *IAMSys) GetRolePolicy(arnStr string) (arn.ARN, string, error)

GetRolePolicy - returns policies associated with a role ARN.

func (*IAMSys) GetServiceAccount

func (sys *IAMSys) GetServiceAccount(ctx context.Context, accessKey string) (auth.Credentials, *policy.Policy, error)

GetServiceAccount - wrapper method to get information about a service account

func (*IAMSys) GetTemporaryAccount

func (sys *IAMSys) GetTemporaryAccount(ctx context.Context, accessKey string) (auth.Credentials, *policy.Policy, error)

GetTemporaryAccount - wrapper method to get information about a temporary account

func (*IAMSys) GetUser

func (sys *IAMSys) GetUser(ctx context.Context, accessKey string) (u UserIdentity, ok bool)

GetUser - get user credentials

func (*IAMSys) GetUserInfo

func (sys *IAMSys) GetUserInfo(ctx context.Context, name string) (u madmin.UserInfo, err error)

GetUserInfo - get info on a user.

func (*IAMSys) GetUsersSysType

func (sys *IAMSys) GetUsersSysType() UsersSysType

GetUsersSysType - returns the users system type for this IAM

func (*IAMSys) HasRolePolicy

func (sys *IAMSys) HasRolePolicy() bool

HasRolePolicy - returns if a role policy is configured for IAM.

func (*IAMSys) HasWatcher

func (sys *IAMSys) HasWatcher() bool

HasWatcher - returns if the IAM system has a watcher to be notified of changes.

func (*IAMSys) InfoPolicy

func (sys *IAMSys) InfoPolicy(policyName string) (*madmin.PolicyInfo, error)

InfoPolicy - returns the policy definition with some metadata.

func (*IAMSys) Init

func (sys *IAMSys) Init(ctx context.Context, objAPI ObjectLayer, etcdClient *etcd.Client, iamRefreshInterval time.Duration)

Init - initializes config system by reading entries from config/iam

func (*IAMSys) Initialized

func (sys *IAMSys) Initialized() bool

Initialized checks if IAM is initialized

func (*IAMSys) IsAllowed

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

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

func (*IAMSys) IsAllowedSTS

func (sys *IAMSys) IsAllowedSTS(args policy.Args, parentUser string) bool

IsAllowedSTS is meant for STS based temporary credentials, which implements claims validation and verification other than applying policies.

func (*IAMSys) IsAllowedServiceAccount

func (sys *IAMSys) IsAllowedServiceAccount(args policy.Args, parentUser string) bool

IsAllowedServiceAccount - checks if the given service account is allowed to perform actions. The permission of the parent user is checked first

func (*IAMSys) IsServiceAccount

func (sys *IAMSys) IsServiceAccount(name string) (bool, string, error)

IsServiceAccount - returns if given key is a service account

func (*IAMSys) IsTempUser

func (sys *IAMSys) IsTempUser(name string) (bool, string, error)

IsTempUser - returns if given key is a temporary user and parent user.

func (*IAMSys) ListBucketUsers

func (sys *IAMSys) ListBucketUsers(ctx context.Context, bucket string) (map[string]madmin.UserInfo, error)

ListBucketUsers - list all users who can access this 'bucket'

func (*IAMSys) ListGroups

func (sys *IAMSys) ListGroups(ctx context.Context) (r []string, err error)

ListGroups - lists groups.

func (*IAMSys) ListLDAPUsers

func (sys *IAMSys) ListLDAPUsers(ctx context.Context) (map[string]madmin.UserInfo, error)

ListLDAPUsers - list LDAP users which has

func (*IAMSys) ListPolicies

func (sys *IAMSys) ListPolicies(ctx context.Context, bucketName string) (map[string]policy.Policy, error)

ListPolicies - lists all canned policies.

func (*IAMSys) ListPolicyDocs

func (sys *IAMSys) ListPolicyDocs(ctx context.Context, bucketName string) (map[string]PolicyDoc, error)

ListPolicyDocs - lists all canned policy docs.

func (*IAMSys) ListServiceAccounts

func (sys *IAMSys) ListServiceAccounts(ctx context.Context, accessKey string) ([]auth.Credentials, error)

ListServiceAccounts - lists all services accounts associated to a specific user

func (*IAMSys) ListTempAccounts

func (sys *IAMSys) ListTempAccounts(ctx context.Context, accessKey string) ([]UserIdentity, error)

ListTempAccounts - lists all services accounts associated to a specific user

func (*IAMSys) ListUsers

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

ListUsers - list all users.

func (*IAMSys) Load

func (sys *IAMSys) Load(ctx context.Context, firstTime bool) error

Load - loads all credentials, policies and policy mappings.

func (*IAMSys) LoadGroup

func (sys *IAMSys) LoadGroup(ctx context.Context, objAPI ObjectLayer, group string) error

LoadGroup - loads a specific group from storage, and updates the memberships cache. If the specified group does not exist in storage, it is removed from in-memory maps as well - this simplifies the implementation for group removal. This is called only via IAM notifications.

func (*IAMSys) LoadPolicy

func (sys *IAMSys) LoadPolicy(ctx context.Context, objAPI ObjectLayer, policyName string) error

LoadPolicy - reloads a specific canned policy from backend disks or etcd.

func (*IAMSys) LoadPolicyMapping

func (sys *IAMSys) LoadPolicyMapping(ctx context.Context, objAPI ObjectLayer, userOrGroup string, userType IAMUserType, isGroup bool) error

LoadPolicyMapping - loads the mapped policy for a user or group from storage into server memory.

func (*IAMSys) LoadServiceAccount

func (sys *IAMSys) LoadServiceAccount(ctx context.Context, accessKey string) error

LoadServiceAccount - reloads a specific service account from backend disks or etcd.

func (*IAMSys) LoadUser

func (sys *IAMSys) LoadUser(ctx context.Context, objAPI ObjectLayer, accessKey string, userType IAMUserType) error

LoadUser - reloads a specific user from backend disks or etcd.

func (*IAMSys) NewServiceAccount

func (sys *IAMSys) NewServiceAccount(ctx context.Context, parentUser string, groups []string, opts newServiceAccountOpts) (auth.Credentials, time.Time, error)

NewServiceAccount - create a new service account

func (*IAMSys) PolicyDBGet

func (sys *IAMSys) PolicyDBGet(name string, isGroup bool, groups ...string) ([]string, error)

PolicyDBGet - gets policy set on a user or group. If a list of groups is given, policies associated with them are included as well.

func (*IAMSys) PolicyDBSet

func (sys *IAMSys) PolicyDBSet(ctx context.Context, name, policy string, userType IAMUserType, isGroup bool) (updatedAt time.Time, err error)

PolicyDBSet - sets a policy for a user or group in the PolicyDB - the user doesn't have to exist since sometimes they are virtuals

func (*IAMSys) PolicyDBUpdateBuiltin

func (sys *IAMSys) PolicyDBUpdateBuiltin(ctx context.Context, isAttach bool,
	r madmin.PolicyAssociationReq,
) (updatedAt time.Time, addedOrRemoved, effectivePolicies []string, err error)

PolicyDBUpdateBuiltin - adds or removes policies from a user or a group verified to be an internal IDP user.

func (*IAMSys) PolicyDBUpdateLDAP

func (sys *IAMSys) PolicyDBUpdateLDAP(ctx context.Context, isAttach bool,
	r madmin.PolicyAssociationReq,
) (updatedAt time.Time, addedOrRemoved, effectivePolicies []string, err error)

PolicyDBUpdateLDAP - adds or removes policies from a user or a group verified to be in the LDAP directory.

func (*IAMSys) QueryLDAPPolicyEntities

func (sys *IAMSys) QueryLDAPPolicyEntities(ctx context.Context, q madmin.PolicyEntitiesQuery) (*madmin.PolicyEntitiesResult, error)

QueryLDAPPolicyEntities - queries policy associations for LDAP users/groups/policies.

func (*IAMSys) QueryPolicyEntities

func (sys *IAMSys) QueryPolicyEntities(ctx context.Context, q madmin.PolicyEntitiesQuery) (*madmin.PolicyEntitiesResult, error)

QueryPolicyEntities - queries policy associations for builtin users/groups/policies.

func (*IAMSys) RemoveUsersFromGroup

func (sys *IAMSys) RemoveUsersFromGroup(ctx context.Context, group string, members []string) (updatedAt time.Time, err error)

RemoveUsersFromGroup - remove users from group. If no users are given, and the group is empty, deletes the group as well.

func (*IAMSys) SetGroupStatus

func (sys *IAMSys) SetGroupStatus(ctx context.Context, group string, enabled bool) (updatedAt time.Time, err error)

SetGroupStatus - enable/disabled a group

func (*IAMSys) SetPolicy

func (sys *IAMSys) SetPolicy(ctx context.Context, policyName string, p policy.Policy) (time.Time, error)

SetPolicy - sets a new named policy.

func (*IAMSys) SetTempUser

func (sys *IAMSys) SetTempUser(ctx context.Context, accessKey string, cred auth.Credentials, policyName string) (time.Time, error)

SetTempUser - set temporary user credentials, these credentials have an expiry. The permissions for these STS credentials is determined in one of the following ways:

- RoleARN - if a role-arn is specified in the request, the STS credential's policy is the role's policy.

- inherited from parent - this is the case for AssumeRole API, where the parent user is an actual real user with their own (permanent) credentials and policy association.

- inherited from "virtual" parent - this is the case for AssumeRoleWithLDAP where the parent user is the DN of the actual LDAP user. The parent user itself cannot login, but the policy associated with them determines the base policy for the STS credential. The policy mapping can be updated by the administrator.

- from `Subject.CommonName` field from the STS request for AssumeRoleWithCertificate. In this case, the policy for the STS credential has the same name as the value of this field.

- from special JWT claim from STS request for AssumeRoleWithOIDC API (when not using RoleARN). The claim value can be a string or a list and refers to the names of access policies.

For all except the RoleARN case, the implementation is the same - the policy for the STS credential is associated with a parent user. For the AssumeRoleWithCertificate case, the "virtual" parent user is the value of the `Subject.CommonName` field. For the OIDC (without RoleARN) case the "virtual" parent is derived as a concatenation of the `sub` and `iss` fields. The policies applicable to the STS credential are associated with this "virtual" parent.

When a policyName is given to this function, the policy association is created and stored in the IAM store. Thus, it should NOT be given for the role-arn case (because the role-to-policy mapping is separately stored elsewhere), the AssumeRole case (because the parent user is real and their policy is associated via policy-set API) and the AssumeRoleWithLDAP case (because the policy association is made via policy-set API).

func (*IAMSys) SetUserSecretKey

func (sys *IAMSys) SetUserSecretKey(ctx context.Context, accessKey string, secretKey string) error

SetUserSecretKey - sets user secret key

func (*IAMSys) SetUserStatus

func (sys *IAMSys) SetUserStatus(ctx context.Context, accessKey string, status madmin.AccountStatus) (updatedAt time.Time, err error)

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

func (*IAMSys) SetUsersSysType

func (sys *IAMSys) SetUsersSysType(t UsersSysType)

SetUsersSysType - sets the users system type, regular or LDAP.

func (*IAMSys) UpdateServiceAccount

func (sys *IAMSys) UpdateServiceAccount(ctx context.Context, accessKey string, opts updateServiceAccountOpts) (updatedAt time.Time, err error)

UpdateServiceAccount - edit a service account

type IAMUserType

type IAMUserType int

IAMUserType represents a user type inside MinIO server

type InQueueMetric

type InQueueMetric struct {
	Curr QStat `json:"curr" msg:"cq"`
	Avg  QStat `json:"avg" msg:"aq"`
	Max  QStat `json:"max" msg:"pq"`
}

InQueueMetric holds queue stats for replication

func (*InQueueMetric) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*InQueueMetric) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*InQueueMetric) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*InQueueMetric) Msgsize

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

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

func (*InQueueMetric) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type InQueueStats

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

InQueueStats holds queue stats for replication

func (*InQueueStats) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (InQueueStats) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (InQueueStats) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (InQueueStats) Msgsize

func (z InQueueStats) Msgsize() (s int)

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

func (*InQueueStats) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type IncompleteBody

type IncompleteBody GenericError

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

func (IncompleteBody) Error

func (e IncompleteBody) Error() string

Error returns string an error formatted as the given text.

type InitiateMultipartUploadResponse

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

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

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

type Initiator

type Initiator Owner

Initiator inherit from Owner struct, fields are same

type InsufficientReadQuorum

type InsufficientReadQuorum GenericError

InsufficientReadQuorum storage cannot satisfy quorum for read operation.

func (InsufficientReadQuorum) Error

func (e InsufficientReadQuorum) Error() string

func (InsufficientReadQuorum) Unwrap

func (e InsufficientReadQuorum) Unwrap() error

Unwrap the error.

type InsufficientWriteQuorum

type InsufficientWriteQuorum GenericError

InsufficientWriteQuorum storage cannot satisfy quorum for write operation.

func (InsufficientWriteQuorum) Error

func (e InsufficientWriteQuorum) Error() string

func (InsufficientWriteQuorum) Unwrap

func (e InsufficientWriteQuorum) Unwrap() error

Unwrap the error.

type InvalidArgument

type InvalidArgument GenericError

InvalidArgument incorrect input argument

func (InvalidArgument) Error

func (e InvalidArgument) Error() string

type InvalidETag

type InvalidETag struct{}

InvalidETag error returned when the etag has changed on disk

func (InvalidETag) Error

func (e InvalidETag) Error() string

type InvalidObjectState

type InvalidObjectState GenericError

InvalidObjectState restore-object doesn't apply for the current state of the object.

func (InvalidObjectState) Error

func (e InvalidObjectState) Error() string

type InvalidPart

type InvalidPart struct {
	PartNumber int
	ExpETag    string
	GotETag    string
}

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

func (InvalidPart) Error

func (e InvalidPart) Error() string

type InvalidRange

type InvalidRange struct {
	OffsetBegin  int64
	OffsetEnd    int64
	ResourceSize int64
}

InvalidRange - invalid range typed error.

func (InvalidRange) Error

func (e InvalidRange) Error() string

type InvalidUploadID

type InvalidUploadID struct {
	Bucket   string
	Object   string
	UploadID string
}

InvalidUploadID invalid upload id.

func (InvalidUploadID) Error

func (e InvalidUploadID) Error() string

type InvalidUploadIDKeyCombination

type InvalidUploadIDKeyCombination struct {
	UploadIDMarker, KeyMarker string
}

InvalidUploadIDKeyCombination - invalid upload id and key marker combination.

func (InvalidUploadIDKeyCombination) Error

type InvalidVersionID

type InvalidVersionID GenericError

InvalidVersionID invalid version id

func (InvalidVersionID) Error

func (e InvalidVersionID) Error() string

type LDAPIdentityResult

type LDAPIdentityResult struct {
	Credentials auth.Credentials `xml:",omitempty"`
}

LDAPIdentityResult - contains credentials for a successful AssumeRoleWithLDAPIdentity request.

type LastMinuteHistogram

type LastMinuteHistogram [sizeLastElemMarker]lastMinuteLatency

LastMinuteHistogram keeps track of last minute sizes added.

func (*LastMinuteHistogram) Add

func (l *LastMinuteHistogram) Add(size int64, t time.Duration)

Add latency t from object with the specified size.

func (*LastMinuteHistogram) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*LastMinuteHistogram) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*LastMinuteHistogram) GetAvgData

func (l *LastMinuteHistogram) GetAvgData() [sizeLastElemMarker]AccElem

GetAvgData will return the average for each bucket from the last time minute. The number of objects is also included.

func (*LastMinuteHistogram) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (LastMinuteHistogram) Merge

Merge safely merges two LastMinuteHistogram structures into one

func (*LastMinuteHistogram) Msgsize

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

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

func (*LastMinuteHistogram) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type LifecycleSys

type LifecycleSys struct{}

LifecycleSys - Bucket lifecycle subsystem.

func NewLifecycleSys

func NewLifecycleSys() *LifecycleSys

NewLifecycleSys - creates new lifecycle system.

func (*LifecycleSys) Get

func (sys *LifecycleSys) Get(bucketName string) (lc *lifecycle.Lifecycle, err error)

Get - gets lifecycle config associated to a given bucket name.

type ListBucketsResponse

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

	Owner Owner

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

ListBucketsResponse - format for list buckets response

type ListMultipartUploadsResponse

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

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

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

	// Delimed common prefixes.
	CommonPrefixes []CommonPrefix
}

ListMultipartUploadsResponse - format for list multipart uploads response.

type ListMultipartsInfo

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

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

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

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

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

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

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

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

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

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

	EncodingType string // Not supported yet.
}

ListMultipartsInfo - represnets bucket resources for incomplete multipart uploads.

func (ListMultipartsInfo) Lookup

func (lm ListMultipartsInfo) Lookup(uploadID string) bool

Lookup - returns if uploadID is valid

type ListObjectVersionsInfo

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

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

	// NextVersionIDMarker may be set of IsTruncated is true
	NextVersionIDMarker string

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

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

ListObjectVersionsInfo - container for list objects versions.

type ListObjectsInfo

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

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

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

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

ListObjectsInfo - container for list objects.

type ListObjectsResponse

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

	Name   string
	Prefix string
	Marker string

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

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

	Contents       []Object
	CommonPrefixes []CommonPrefix

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

ListObjectsResponse - format for list objects response.

type ListObjectsV2Info

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

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

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

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

ListObjectsV2Info - container for list objects version 2.

type ListObjectsV2Response

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

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

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

	Contents       []Object
	CommonPrefixes []CommonPrefix

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

ListObjectsV2Response - format for list objects response.

type ListPartsInfo

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

	// Name of the object.
	Object string

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

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

	// Part number after which listing begins.
	PartNumberMarker int

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

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

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

	// List of all parts.
	Parts []PartInfo

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

	// ChecksumAlgorithm if set
	ChecksumAlgorithm string
}

ListPartsInfo - represents list of all parts.

type ListPartsResponse

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

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

	Initiator Initiator
	Owner     Owner

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

	PartNumberMarker     int
	NextPartNumberMarker int
	MaxParts             int
	IsTruncated          bool

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

ListPartsResponse - format for list parts response.

type ListVersionsResponse

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

	Name      string
	Prefix    string
	KeyMarker string

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

	// When the number of responses exceeds the value of MaxKeys,
	// NextVersionIdMarker specifies the first object version not
	// returned that satisfies the search criteria. Use this value
	// for the version-id-marker request parameter in a subsequent request.
	NextVersionIDMarker string `xml:"NextVersionIdMarker"`

	// Marks the last version of the Key returned in a truncated response.
	VersionIDMarker string `xml:"VersionIdMarker"`

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

	CommonPrefixes []CommonPrefix
	Versions       []ObjectVersion

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

ListVersionsResponse - format for list bucket versions response.

type LocationResponse

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

LocationResponse - format for location response.

type LockContext

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

LockContext lock context holds the lock backed context and canceler for the context.

func (LockContext) Cancel

func (l LockContext) Cancel()

Cancel function calls cancel() function

func (LockContext) Context

func (l LockContext) Context() context.Context

Context returns lock context

type MRFReplicateEntries

type MRFReplicateEntries struct {
	Entries map[string]MRFReplicateEntry `json:"entries" msg:"e"`
	Version int                          `json:"version" msg:"v"`
}

MRFReplicateEntries has the map of MRF entries to save to disk

func (*MRFReplicateEntries) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*MRFReplicateEntries) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*MRFReplicateEntries) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*MRFReplicateEntries) Msgsize

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

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

func (*MRFReplicateEntries) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type MRFReplicateEntry

type MRFReplicateEntry struct {
	Bucket string `json:"bucket" msg:"b"`
	Object string `json:"object" msg:"o"`

	RetryCount int `json:"retryCount" msg:"rc"`
	// contains filtered or unexported fields
}

MRFReplicateEntry mrf entry to save to disk

func (*MRFReplicateEntry) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (MRFReplicateEntry) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (MRFReplicateEntry) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (MRFReplicateEntry) Msgsize

func (z MRFReplicateEntry) Msgsize() (s int)

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

func (*MRFReplicateEntry) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type MakeBucketOptions

type MakeBucketOptions struct {
	LockEnabled       bool
	VersioningEnabled bool
	ForceCreate       bool      // Create buckets even if they are already created.
	CreatedAt         time.Time // only for site replication
	NoLock            bool      // does not lock the make bucket call if set to 'true'
}

MakeBucketOptions represents bucket options for ObjectLayer bucket operations

type MalformedUploadID

type MalformedUploadID struct {
	UploadID string
}

MalformedUploadID malformed upload id.

func (MalformedUploadID) Error

func (e MalformedUploadID) Error() string

type MappedPolicy

type MappedPolicy struct {
	Version   int       `json:"version"`
	Policies  string    `json:"policy"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

MappedPolicy represents a policy name mapped to a user or group

type Metadata

type Metadata struct {
	Items []struct {
		Key   string
		Value string
	}
}

Metadata metadata items implemented to ensure XML marshaling works.

func (*Metadata) MarshalXML

func (s *Metadata) MarshalXML(e *xxml.Encoder, start xxml.StartElement) error

MarshalXML - StringMap marshals into XML.

func (*Metadata) Set

func (s *Metadata) Set(k, v string)

Set add items, duplicate items get replaced.

type MetadataEntry

type MetadataEntry struct {
	Name  string `xml:"Name"`
	Value string `xml:"Value"`
}

MetadataEntry denotes name and value.

type MethodNotAllowed

type MethodNotAllowed GenericError

MethodNotAllowed on the object

func (MethodNotAllowed) Error

func (e MethodNotAllowed) Error() string

type Metric

type Metric struct {
	Description          MetricDescription `json:"Description"`
	StaticLabels         map[string]string `json:"StaticLabels"`
	Value                float64           `json:"Value"`
	VariableLabels       map[string]string `json:"VariableLabels"`
	HistogramBucketLabel string            `json:"HistogramBucketLabel"`
	Histogram            map[string]uint64 `json:"Histogram"`
}

Metric captures the details for a metric

type MetricDescription

type MetricDescription struct {
	Namespace MetricNamespace `json:"MetricNamespace"`
	Subsystem MetricSubsystem `json:"Subsystem"`
	Name      MetricName      `json:"MetricName"`
	Help      string          `json:"Help"`
	Type      MetricType      `json:"Type"`
}

MetricDescription describes the metric

type MetricName

type MetricName string

MetricName are the individual names for the metric.

type MetricNamespace

type MetricNamespace string

MetricNamespace is top level grouping of metrics to create the metric name.

type MetricSubsystem

type MetricSubsystem string

MetricSubsystem is the sub grouping for metrics within a namespace.

type MetricType

type MetricType string

MetricType for the types of metrics supported

type MetricsGroup

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

MetricsGroup are a group of metrics that are initialized together.

func (*MetricsGroup) Get

func (g *MetricsGroup) Get() (metrics []Metric)

Get - returns cached value always upton the configured TTL, once the TTL expires "read()" registered function is called to return the new values and updated.

func (*MetricsGroup) RegisterRead

func (g *MetricsGroup) RegisterRead(read func(ctx context.Context) []Metric)

RegisterRead register the metrics populator function to be used to populate new values upon cache invalidation.

type MultipartInfo

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

	// Name of the object.
	Object string

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

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

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

MultipartInfo captures metadata information about the uploadId this data structure is used primarily for some internal purposes for verifying upload type such as was the upload - encrypted - compressed

func (*MultipartInfo) KMSKeyID

func (o *MultipartInfo) KMSKeyID() string

KMSKeyID returns in AWS compatible KMS KeyID() format.

type NewMultipartUploadResult

type NewMultipartUploadResult struct {
	UploadID     string
	ChecksumAlgo string
}

NewMultipartUploadResult contains information about a newly created multipart upload.

type Node

type Node struct {
	*url.URL
	Pools   []int
	IsLocal bool
}

Node holds information about a node in this cluster

type NotImplemented

type NotImplemented struct {
	Message string
}

NotImplemented If a feature is not implemented

func (NotImplemented) Error

func (e NotImplemented) Error() string

type NotificationGroup

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

A NotificationGroup is a collection of goroutines working on subtasks that are part of the same overall task.

A zero NotificationGroup is valid and does not cancel on error.

func WithNPeers

func WithNPeers(nerrs int) *NotificationGroup

WithNPeers returns a new NotificationGroup with length of errs slice upto nerrs, upon Wait() errors are returned collected from all tasks.

func (*NotificationGroup) Go

func (g *NotificationGroup) Go(ctx context.Context, f func() error, index int, addr xnet.Host)

Go calls the given function in a new goroutine.

The first call to return a non-nil error will be collected in errs slice and returned by Wait().

func (*NotificationGroup) Wait

Wait blocks until all function calls from the Go method have returned, then returns the slice of errors from all function calls.

func (*NotificationGroup) WithRetries

func (g *NotificationGroup) WithRetries(retryCount int) *NotificationGroup

WithRetries sets the retry count for all function calls from the Go method.

type NotificationPeerErr

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

NotificationPeerErr returns error associated for a remote peer.

type NotificationSys

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

NotificationSys - notification system.

func NewNotificationSys

func NewNotificationSys(endpoints EndpointServerPools) *NotificationSys

NewNotificationSys - creates new notification system object.

func (*NotificationSys) BackgroundHealStatus

func (sys *NotificationSys) BackgroundHealStatus() ([]madmin.BgHealState, []NotificationPeerErr)

BackgroundHealStatus - returns background heal status of all peers

func (*NotificationSys) CommitBinary

func (sys *NotificationSys) CommitBinary(ctx context.Context) []NotificationPeerErr

CommitBinary - asks remote peers to overwrite the old binary with the new one

func (*NotificationSys) DeleteBucketMetadata

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

DeleteBucketMetadata - calls DeleteBucketMetadata call on all peers

func (*NotificationSys) DeletePolicy

func (sys *NotificationSys) DeletePolicy(policyName string) []NotificationPeerErr

DeletePolicy - deletes policy across all peers.

func (*NotificationSys) DeleteServiceAccount

func (sys *NotificationSys) DeleteServiceAccount(accessKey string) []NotificationPeerErr

DeleteServiceAccount - deletes a specific service account across all peers

func (*NotificationSys) DeleteUser

func (sys *NotificationSys) DeleteUser(accessKey string) []NotificationPeerErr

DeleteUser - deletes a specific user across all peers

func (*NotificationSys) DownloadProfilingData

func (sys *NotificationSys) DownloadProfilingData(ctx context.Context, writer io.Writer) (profilingDataFound bool)

DownloadProfilingData - download profiling data from all remote peers.

func (*NotificationSys) DriveSpeedTest

func (sys *NotificationSys) DriveSpeedTest(ctx context.Context, opts madmin.DriveSpeedTestOpts) chan madmin.DriveSpeedTestResult

DriveSpeedTest - Drive performance information

func (*NotificationSys) GetBandwidthReports

func (sys *NotificationSys) GetBandwidthReports(ctx context.Context, buckets ...string) bandwidth.BucketBandwidthReport

GetBandwidthReports - gets the bandwidth report from all nodes including self.

func (*NotificationSys) GetBucketMetrics

func (sys *NotificationSys) GetBucketMetrics(ctx context.Context) <-chan Metric

GetBucketMetrics - gets the cluster level bucket metrics from all nodes excluding self.

func (*NotificationSys) GetCPUs

func (sys *NotificationSys) GetCPUs(ctx context.Context) []madmin.CPUs

GetCPUs - Get all CPU information.

func (*NotificationSys) GetClusterAllBucketStats

func (sys *NotificationSys) GetClusterAllBucketStats(ctx context.Context) []BucketStatsMap

GetClusterAllBucketStats - returns bucket stats for all buckets from all remote peers.

func (*NotificationSys) GetClusterBucketStats

func (sys *NotificationSys) GetClusterBucketStats(ctx context.Context, bucketName string) []BucketStats

GetClusterBucketStats - calls GetClusterBucketStats call on all peers for a cluster statistics view.

func (*NotificationSys) GetClusterMetrics

func (sys *NotificationSys) GetClusterMetrics(ctx context.Context) <-chan Metric

GetClusterMetrics - gets the cluster metrics from all nodes excluding self.

func (*NotificationSys) GetClusterSiteMetrics

func (sys *NotificationSys) GetClusterSiteMetrics(ctx context.Context) []SRMetricsSummary

GetClusterSiteMetrics - calls GetClusterSiteMetrics call on all peers for a cluster statistics view.

func (*NotificationSys) GetLastDayTierStats

func (sys *NotificationSys) GetLastDayTierStats(ctx context.Context) DailyAllTierStats

GetLastDayTierStats fetches per-tier stats of the last 24hrs from all peers

func (*NotificationSys) GetLocalDiskIDs

func (sys *NotificationSys) GetLocalDiskIDs(ctx context.Context) (localDiskIDs [][]string)

GetLocalDiskIDs - return disk ids of the local disks of the peers.

func (*NotificationSys) GetLocks

func (sys *NotificationSys) GetLocks(ctx context.Context, r *http.Request) []*PeerLocks

GetLocks - makes GetLocks RPC call on all peers.

func (*NotificationSys) GetMemInfo

func (sys *NotificationSys) GetMemInfo(ctx context.Context) []madmin.MemInfo

GetMemInfo - Memory information

func (*NotificationSys) GetMetrics

func (sys *NotificationSys) GetMetrics(ctx context.Context, t madmin.MetricType, opts collectMetricsOpts) []madmin.RealtimeMetrics

GetMetrics - Get metrics from all peers.

func (*NotificationSys) GetOSInfo

func (sys *NotificationSys) GetOSInfo(ctx context.Context) []madmin.OSInfo

GetOSInfo - Get operating system's information

func (*NotificationSys) GetPartitions

func (sys *NotificationSys) GetPartitions(ctx context.Context) []madmin.Partitions

GetPartitions - Disk partition information

func (*NotificationSys) GetPeerOnlineCount

func (sys *NotificationSys) GetPeerOnlineCount() (nodesOnline, nodesOffline int)

GetPeerOnlineCount gets the count of online and offline nodes.

func (*NotificationSys) GetProcInfo

func (sys *NotificationSys) GetProcInfo(ctx context.Context) []madmin.ProcInfo

GetProcInfo - Process information

func (*NotificationSys) GetReplicationMRF

func (sys *NotificationSys) GetReplicationMRF(ctx context.Context, bucket, node string) (mrfCh chan madmin.ReplicationMRF, err error)

GetReplicationMRF - Get replication MRF from all peers.

func (*NotificationSys) GetResourceMetrics

func (sys *NotificationSys) GetResourceMetrics(ctx context.Context) <-chan Metric

GetResourceMetrics - gets the resource metrics from all nodes excluding self.

func (*NotificationSys) GetSysConfig

func (sys *NotificationSys) GetSysConfig(ctx context.Context) []madmin.SysConfig

GetSysConfig - Get information about system config (only the config that are of concern to minio)

func (*NotificationSys) GetSysErrors

func (sys *NotificationSys) GetSysErrors(ctx context.Context) []madmin.SysErrors

GetSysErrors - Memory information

func (*NotificationSys) GetSysServices

func (sys *NotificationSys) GetSysServices(ctx context.Context) []madmin.SysServices

GetSysServices - Get information about system services (only the services that are of concern to minio)

func (*NotificationSys) LoadBucketMetadata

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

LoadBucketMetadata - calls LoadBucketMetadata call on all peers

func (*NotificationSys) LoadGroup

func (sys *NotificationSys) LoadGroup(group string) []NotificationPeerErr

LoadGroup - loads a specific group on all peers.

func (*NotificationSys) LoadPolicy

func (sys *NotificationSys) LoadPolicy(policyName string) []NotificationPeerErr

LoadPolicy - reloads a specific modified policy across all peers

func (*NotificationSys) LoadPolicyMapping

func (sys *NotificationSys) LoadPolicyMapping(userOrGroup string, userType IAMUserType, isGroup bool) []NotificationPeerErr

LoadPolicyMapping - reloads a policy mapping across all peers

func (*NotificationSys) LoadRebalanceMeta

func (sys *NotificationSys) LoadRebalanceMeta(ctx context.Context, startRebalance bool)

LoadRebalanceMeta notifies all peers to load rebalance.bin from object layer. Note: Only peers participating in rebalance operation, namely the first node in each pool will load rebalance.bin.

func (*NotificationSys) LoadServiceAccount

func (sys *NotificationSys) LoadServiceAccount(accessKey string) []NotificationPeerErr

LoadServiceAccount - reloads a specific service account across all peers

func (*NotificationSys) LoadTransitionTierConfig

func (sys *NotificationSys) LoadTransitionTierConfig(ctx context.Context)

LoadTransitionTierConfig notifies remote peers to load their remote tier configs from config store.

func (*NotificationSys) LoadUser

func (sys *NotificationSys) LoadUser(accessKey string, temp bool) []NotificationPeerErr

LoadUser - reloads a specific user across all peers

func (*NotificationSys) Netperf

func (sys *NotificationSys) Netperf(ctx context.Context, duration time.Duration) []madmin.NetperfNodeResult

Netperf - perform mesh style network throughput test

func (*NotificationSys) ReloadPoolMeta

func (sys *NotificationSys) ReloadPoolMeta(ctx context.Context)

ReloadPoolMeta reloads on disk updates on pool metadata

func (*NotificationSys) ReloadSiteReplicationConfig

func (sys *NotificationSys) ReloadSiteReplicationConfig(ctx context.Context) []error

ReloadSiteReplicationConfig - tells all peer minio nodes to reload the site-replication configuration.

func (*NotificationSys) ServerInfo

func (sys *NotificationSys) ServerInfo() []madmin.ServerProperties

ServerInfo - calls ServerInfo RPC call on all peers.

func (*NotificationSys) ServiceFreeze

func (sys *NotificationSys) ServiceFreeze(ctx context.Context, freeze bool) []NotificationPeerErr

ServiceFreeze freezes all S3 API calls when 'freeze' is true, 'freeze' is 'false' would resume all S3 API calls again. NOTE: once a tenant is frozen either two things needs to happen before resuming normal operations.

  • Server needs to be restarted 'mc admin service restart'
  • 'freeze' should be set to 'false' for this call to resume normal operations.

func (*NotificationSys) SignalConfigReload

func (sys *NotificationSys) SignalConfigReload(subSys string) []NotificationPeerErr

SignalConfigReload reloads requested sub-system on a remote peer dynamically.

func (*NotificationSys) SignalService

func (sys *NotificationSys) SignalService(sig serviceSignal) []NotificationPeerErr

SignalService - calls signal service RPC call on all peers.

func (*NotificationSys) SpeedTest

func (sys *NotificationSys) SpeedTest(ctx context.Context, sopts speedTestOpts) []SpeedTestResult

SpeedTest run GET/PUT tests at input concurrency for requested object size, optionally you can extend the tests longer with time.Duration.

func (*NotificationSys) StartProfiling

func (sys *NotificationSys) StartProfiling(profiler string) []NotificationPeerErr

StartProfiling - start profiling on remote peers, by initiating a remote RPC.

func (*NotificationSys) StopRebalance

func (sys *NotificationSys) StopRebalance(ctx context.Context)

StopRebalance notifies all MinIO nodes to signal any ongoing rebalance goroutine to stop.

func (*NotificationSys) StorageInfo

func (sys *NotificationSys) StorageInfo(objLayer ObjectLayer) StorageInfo

StorageInfo returns disk information across all peers

func (*NotificationSys) VerifyBinary

func (sys *NotificationSys) VerifyBinary(ctx context.Context, u *url.URL, sha256Sum []byte, releaseInfo string, reader []byte) []NotificationPeerErr

VerifyBinary - asks remote peers to verify the checksum

type ObjReaderFn

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

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

func NewGetObjectReader

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

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

type Object

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

	// Owner of the object.
	Owner *Owner `xml:"Owner,omitempty"`

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

	// UserMetadata user-defined metadata
	UserMetadata *Metadata `xml:"UserMetadata,omitempty"`
	UserTags     string    `xml:"UserTags,omitempty"`

	Internal *ObjectInternalInfo `xml:"Internal,omitempty"`
}

Object container for object metadata

type ObjectAlreadyExists

type ObjectAlreadyExists GenericError

ObjectAlreadyExists object already exists.

func (ObjectAlreadyExists) Error

func (e ObjectAlreadyExists) Error() string

type ObjectExistsAsDirectory

type ObjectExistsAsDirectory GenericError

ObjectExistsAsDirectory object already exists as a directory.

func (ObjectExistsAsDirectory) Error

func (e ObjectExistsAsDirectory) Error() string

type ObjectInfo

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

	// Name of the object.
	Name string

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

	// Total object size.
	Size int64

	// Actual size is the real size of the object uploaded by client.
	ActualSize *int64

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

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

	// Version ID of this object.
	VersionID string

	// IsLatest indicates if this is the latest current version
	// latest can be true for delete marker or a version.
	IsLatest bool

	// DeleteMarker indicates if the versionId corresponds
	// to a delete marker on an object.
	DeleteMarker bool

	// Transitioned object information
	TransitionedObject TransitionedObject

	// RestoreExpires indicates date a restored object expires
	RestoreExpires time.Time

	// RestoreOngoing indicates if a restore is in progress
	RestoreOngoing bool

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

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

	// Date and time at which the object is no longer able to be cached
	Expires time.Time

	// Specify object storage class
	StorageClass string

	ReplicationStatusInternal string
	ReplicationStatus         replication.StatusType
	// User-Defined metadata
	UserDefined map[string]string

	// User-Defined object tags
	UserTags string

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

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

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

	Legacy bool // indicates object on disk is in legacy data format

	// internal representation of version purge status
	VersionPurgeStatusInternal string
	VersionPurgeStatus         VersionPurgeStatusType

	// The total count of all versions of this object
	NumVersions int
	//  The modtime of the successor object version if any
	SuccessorModTime time.Time

	// Checksums added on upload.
	// Encoded, maybe encrypted.
	Checksum []byte

	// Inlined
	Inlined bool

	DataBlocks   int
	ParityBlocks int
	// contains filtered or unexported fields
}

ObjectInfo - represents object metadata.

func (*ObjectInfo) ArchiveInfo

func (o *ObjectInfo) ArchiveInfo() []byte

ArchiveInfo returns any saved zip archive meta information. It will be decrypted if needed.

func (*ObjectInfo) Clone

func (o *ObjectInfo) Clone() (cinfo ObjectInfo)

Clone - Returns a cloned copy of current objectInfo

func (ObjectInfo) DecryptedSize

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

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

func (*ObjectInfo) EncryptedSize

func (o *ObjectInfo) EncryptedSize() int64

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

func (ObjectInfo) GetActualSize

func (o ObjectInfo) GetActualSize() (int64, error)

GetActualSize - returns the actual size of the stored object

func (*ObjectInfo) GetDecryptedRange

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

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

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

func (*ObjectInfo) IsCompressed

func (o *ObjectInfo) IsCompressed() bool

IsCompressed returns true if the object is marked as compressed.

func (*ObjectInfo) IsCompressedOK

func (o *ObjectInfo) IsCompressedOK() (bool, error)

IsCompressedOK returns whether the object is compressed and can be decompressed.

func (ObjectInfo) IsRemote

func (oi ObjectInfo) IsRemote() bool

IsRemote returns true if this object version's contents are in its remote tier.

func (*ObjectInfo) KMSKeyID

func (o *ObjectInfo) KMSKeyID() string

KMSKeyID returns in AWS compatible KMS KeyID() format.

func (ObjectInfo) ReplicationState

func (o ObjectInfo) ReplicationState() ReplicationState

ReplicationState - returns replication state using other internal replication metadata in ObjectInfo

func (ObjectInfo) TargetReplicationStatus

func (o ObjectInfo) TargetReplicationStatus(arn string) (status replication.StatusType)

TargetReplicationStatus - returns replication status of a target

func (ObjectInfo) ToLifecycleOpts

func (oi ObjectInfo) ToLifecycleOpts() lifecycle.ObjectOpts

ToLifecycleOpts returns lifecycle.ObjectOpts value for oi.

type ObjectInternalInfo

type ObjectInternalInfo struct {
	K int // Data blocks
	M int // Parity blocks
}

ObjectInternalInfo contains some internal information about a given object, it will printed in listing calls with enabled metadata.

type ObjectLayer

type ObjectLayer interface {
	// Locking operations on object.
	NewNSLock(bucket string, objects ...string) RWLocker

	// Storage operations.
	Shutdown(context.Context) error
	NSScanner(ctx context.Context, updates chan<- DataUsageInfo, wantCycle uint32, scanMode madmin.HealScanMode) error
	BackendInfo() madmin.BackendInfo
	StorageInfo(ctx context.Context) StorageInfo
	LocalStorageInfo(ctx context.Context) StorageInfo

	// Bucket operations.
	MakeBucket(ctx context.Context, bucket string, opts MakeBucketOptions) error
	GetBucketInfo(ctx context.Context, bucket string, opts BucketOptions) (bucketInfo BucketInfo, err error)
	ListBuckets(ctx context.Context, opts BucketOptions) (buckets []BucketInfo, err error)
	DeleteBucket(ctx context.Context, bucket string, opts DeleteBucketOptions) error
	ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (result ListObjectsInfo, err error)
	ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error)
	ListObjectVersions(ctx context.Context, bucket, prefix, marker, versionMarker, delimiter string, maxKeys int) (result ListObjectVersionsInfo, err error)
	// Walk lists all objects including versions, delete markers.
	Walk(ctx context.Context, bucket, prefix string, results chan<- ObjectInfo, opts ObjectOptions) error

	// GetObjectNInfo returns a GetObjectReader that satisfies the
	// ReadCloser interface. The Close method runs any cleanup
	// functions, so it must always be called after reading till EOF
	//
	// IMPORTANTLY, when implementations return err != nil, this
	// function MUST NOT return a non-nil ReadCloser.
	GetObjectNInfo(ctx context.Context, bucket, object string, rs *HTTPRangeSpec, h http.Header, opts ObjectOptions) (reader *GetObjectReader, err error)
	GetObjectInfo(ctx context.Context, bucket, object string, opts ObjectOptions) (objInfo ObjectInfo, err error)
	PutObject(ctx context.Context, bucket, object string, data *PutObjReader, opts ObjectOptions) (objInfo ObjectInfo, err error)
	CopyObject(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, srcInfo ObjectInfo, srcOpts, dstOpts ObjectOptions) (objInfo ObjectInfo, err error)
	DeleteObject(ctx context.Context, bucket, object string, opts ObjectOptions) (ObjectInfo, error)
	DeleteObjects(ctx context.Context, bucket string, objects []ObjectToDelete, opts ObjectOptions) ([]DeletedObject, []error)
	TransitionObject(ctx context.Context, bucket, object string, opts ObjectOptions) error
	RestoreTransitionedObject(ctx context.Context, bucket, object string, opts ObjectOptions) error

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

	GetDisks(poolIdx, setIdx int) ([]StorageAPI, error) // return the disks belonging to pool and set.
	SetDriveCounts() []int                              // list of erasure stripe size for each pool in order.

	// Healing operations.
	HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)
	HealBucket(ctx context.Context, bucket string, opts madmin.HealOpts) (madmin.HealResultItem, error)
	HealObject(ctx context.Context, bucket, object, versionID string, opts madmin.HealOpts) (madmin.HealResultItem, error)
	HealObjects(ctx context.Context, bucket, prefix string, opts madmin.HealOpts, fn HealObjectFn) error
	CheckAbandonedParts(ctx context.Context, bucket, object string, opts madmin.HealOpts) error

	// Returns health of the backend
	Health(ctx context.Context, opts HealthOptions) HealthResult
	ReadHealth(ctx context.Context) bool

	// Metadata operations
	PutObjectMetadata(context.Context, string, string, ObjectOptions) (ObjectInfo, error)
	DecomTieredObject(context.Context, string, string, FileInfo, ObjectOptions) error

	// ObjectTagging operations
	PutObjectTags(context.Context, string, string, string, ObjectOptions) (ObjectInfo, error)
	GetObjectTags(context.Context, string, string, ObjectOptions) (*tags.Tags, error)
	DeleteObjectTags(context.Context, string, string, ObjectOptions) (ObjectInfo, error)
}

ObjectLayer implements primitives for object API layer.

type ObjectLocked

type ObjectLocked GenericError

ObjectLocked object is currently WORM protected.

func (ObjectLocked) Error

func (e ObjectLocked) Error() string

type ObjectNameInvalid

type ObjectNameInvalid GenericError

ObjectNameInvalid - object name provided is invalid.

func (ObjectNameInvalid) Error

func (e ObjectNameInvalid) Error() string

Error returns string an error formatted as the given text.

type ObjectNamePrefixAsSlash

type ObjectNamePrefixAsSlash GenericError

ObjectNamePrefixAsSlash - object name has a slash as prefix.

func (ObjectNamePrefixAsSlash) Error

func (e ObjectNamePrefixAsSlash) Error() string

Error returns string an error formatted as the given text.

type ObjectNameTooLong

type ObjectNameTooLong GenericError

ObjectNameTooLong - object name too long.

func (ObjectNameTooLong) Error

func (e ObjectNameTooLong) Error() string

Error returns string an error formatted as the given text.

type ObjectNotFound

type ObjectNotFound GenericError

ObjectNotFound object does not exist.

func (ObjectNotFound) Error

func (e ObjectNotFound) Error() string

type ObjectOptions

type ObjectOptions struct {
	ServerSideEncryption encrypt.ServerSide
	VersionSuspended     bool      // indicates if the bucket was previously versioned but is currently suspended.
	Versioned            bool      // indicates if the bucket is versioned
	VersionID            string    // Specifies the versionID which needs to be overwritten or read
	MTime                time.Time // Is only set in POST/PUT operations
	Expires              time.Time // Is only used in POST/PUT operations

	DeleteMarker            bool // Is only set in DELETE operations for delete marker replication
	CheckDMReplicationReady bool // Is delete marker ready to be replicated - set only during HEAD
	Tagging                 bool // Is only in GET/HEAD operations to return tagging metadata along with regular metadata and body.

	UserDefined         map[string]string   // only set in case of POST/PUT operations
	PartNumber          int                 // only useful in case of GetObject/HeadObject
	CheckPrecondFn      CheckPreconditionFn // only set during GetObject/HeadObject/CopyObjectPart preconditional valuation
	EvalMetadataFn      EvalMetadataFn      // only set for retention settings, meant to be used only when updating metadata in-place.
	DeleteReplication   ReplicationState    // Represents internal replication state needed for Delete replication
	Transition          TransitionOptions
	Expiration          ExpirationOptions
	LifecycleAuditEvent lcAuditEvent

	WantChecksum *hash.Checksum // x-amz-checksum-XXX checksum sent to PutObject/ CompleteMultipartUpload.

	NoDecryption                        bool      // indicates if the stream must be decrypted.
	PreserveETag                        string    // preserves this etag during a PUT call.
	NoLock                              bool      // indicates to lower layers if the caller is expecting to hold locks.
	ProxyRequest                        bool      // only set for GET/HEAD in active-active replication scenario
	ProxyHeaderSet                      bool      // only set for GET/HEAD in active-active replication scenario
	ReplicationRequest                  bool      // true only if replication request
	ReplicationSourceTaggingTimestamp   time.Time // set if MinIOSourceTaggingTimestamp received
	ReplicationSourceLegalholdTimestamp time.Time // set if MinIOSourceObjectLegalholdTimestamp received
	ReplicationSourceRetentionTimestamp time.Time // set if MinIOSourceObjectRetentionTimestamp received
	DeletePrefix                        bool      // set true to enforce a prefix deletion, only application for DeleteObject API,
	DeletePrefixObject                  bool      // set true when object's erasure set is resolvable by object name (using getHashedSetIndex)

	Speedtest bool // object call specifically meant for SpeedTest code, set to 'true' when invoked by SpeedtestHandler.

	// Use the maximum parity (N/2), used when saving server configuration files
	MaxParity bool

	// Provides a per object encryption function, allowing metadata encryption.
	EncryptFn objectMetaEncryptFn

	// SkipDecommissioned set to 'true' if the call requires skipping the pool being decommissioned.
	// mainly set for certain WRITE operations.
	SkipDecommissioned bool
	// SkipRebalancing should be set to 'true' if the call should skip pools
	// participating in a rebalance operation. Typically set for 'write' operations.
	SkipRebalancing bool

	WalkFilter      func(info FileInfo) bool // return WalkFilter returns 'true/false'
	WalkMarker      string                   // set to skip until this object
	WalkLatestOnly  bool                     // returns only latest versions for all matching objects
	WalkAskDisks    string                   // dictates how many disks are being listed
	PrefixEnabledFn func(prefix string) bool // function which returns true if versioning is enabled on prefix

	// IndexCB will return any index created but the compression.
	// Object must have been read at this point.
	IndexCB func() []byte

	InclFreeVersions bool

	MetadataChg           bool                  // is true if it is a metadata update operation.
	EvalRetentionBypassFn EvalRetentionBypassFn // only set for enforcing retention bypass on DeleteObject.
}

ObjectOptions represents object options for ObjectLayer object operations

func (*ObjectOptions) DeleteMarkerReplicationStatus

func (o *ObjectOptions) DeleteMarkerReplicationStatus() replication.StatusType

DeleteMarkerReplicationStatus - returns replication status of delete marker from DeleteReplication state in ObjectOptions

func (*ObjectOptions) PutReplicationState

func (o *ObjectOptions) PutReplicationState() (r ReplicationState)

PutReplicationState gets ReplicationState for PUT operation from ObjectOptions

func (*ObjectOptions) SetDeleteReplicationState

func (o *ObjectOptions) SetDeleteReplicationState(dsc ReplicateDecision, vID string)

SetDeleteReplicationState sets the delete replication options.

func (*ObjectOptions) SetEvalMetadataFn

func (o *ObjectOptions) SetEvalMetadataFn(f EvalMetadataFn)

SetEvalMetadataFn sets the metadata evaluation function

func (*ObjectOptions) SetEvalRetentionBypassFn

func (o *ObjectOptions) SetEvalRetentionBypassFn(f EvalRetentionBypassFn)

SetEvalRetentionBypassFn sets the retention bypass function

func (*ObjectOptions) SetReplicaStatus

func (o *ObjectOptions) SetReplicaStatus(st replication.StatusType)

SetReplicaStatus sets replica status and timestamp for delete operations in ObjectOptions

func (*ObjectOptions) VersionPurgeStatus

func (o *ObjectOptions) VersionPurgeStatus() VersionPurgeStatusType

VersionPurgeStatus - returns version purge status from DeleteReplication state in ObjectOptions

type ObjectPartInfo

type ObjectPartInfo struct {
	ETag       string            `json:"etag,omitempty"`
	Number     int               `json:"number"`
	Size       int64             `json:"size"`       // Size of the part on the disk.
	ActualSize int64             `json:"actualSize"` // Original size of the part without compression or encryption bytes.
	ModTime    time.Time         `json:"modTime"`    // Date and time at which the part was uploaded.
	Index      []byte            `json:"index,omitempty" msg:"index,omitempty"`
	Checksums  map[string]string `json:"crc,omitempty" msg:"crc,omitempty"` // Content Checksums
}

ObjectPartInfo Info of each part kept in the multipart metadata file after CompleteMultipartUpload() is called.

func (*ObjectPartInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ObjectPartInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ObjectPartInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ObjectPartInfo) Msgsize

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

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

func (*ObjectPartInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ObjectTagSet

type ObjectTagSet struct {
	Tags []tags.Tag `xml:"Tag"`
}

ObjectTagSet key value tags

type ObjectToDelete

type ObjectToDelete struct {
	ObjectV
	// Replication status of DeleteMarker
	DeleteMarkerReplicationStatus string `xml:"DeleteMarkerReplicationStatus"`
	// Status of versioned delete (of object or DeleteMarker)
	VersionPurgeStatus VersionPurgeStatusType `xml:"VersionPurgeStatus"`
	// VersionPurgeStatuses holds the internal
	VersionPurgeStatuses string `xml:"VersionPurgeStatuses"`
	// ReplicateDecisionStr stringified representation of replication decision
	ReplicateDecisionStr string `xml:"-"`
}

ObjectToDelete carries key name for the object to delete.

func (ObjectToDelete) ReplicationState

func (o ObjectToDelete) ReplicationState() ReplicationState

ReplicationState returns replication state using other internal replication metadata in ObjectToDelete

type ObjectTooLarge

type ObjectTooLarge GenericError

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

func (ObjectTooLarge) Error

func (e ObjectTooLarge) Error() string

type ObjectTooSmall

type ObjectTooSmall GenericError

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

func (ObjectTooSmall) Error

func (e ObjectTooSmall) Error() string

type ObjectV

type ObjectV struct {
	ObjectName string `xml:"Key"`
	VersionID  string `xml:"VersionId"`
}

ObjectV object version key/versionId

type ObjectVersion

type ObjectVersion struct {
	Object
	IsLatest  bool
	VersionID string `xml:"VersionId"`
	// contains filtered or unexported fields
}

ObjectVersion container for object version metadata

func (ObjectVersion) MarshalXML

func (o ObjectVersion) MarshalXML(e *xxml.Encoder, start xxml.StartElement) error

MarshalXML - marshal ObjectVersion

type OpenIDClientAppParams

type OpenIDClientAppParams struct {
	ClientID, ClientSecret, ProviderURL, RedirectURL string
}

OpenIDClientAppParams - contains openID client application params, used in testing.

type OperationTimedOut

type OperationTimedOut struct{}

OperationTimedOut - a timeout occurred.

func (OperationTimedOut) Error

func (e OperationTimedOut) Error() string

type OutputLocation

type OutputLocation struct {
	S3 S3Location `xml:"S3,omitempty"`
}

OutputLocation specifies bucket where object needs to be restored

func (*OutputLocation) IsEmpty

func (o *OutputLocation) IsEmpty() bool

IsEmpty returns true if output location not specified.

type Owner

type Owner struct {
	ID          string
	DisplayName string
}

Owner - bucket owner/principal

type ParentUserInfo

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

ParentUserInfo contains extra info about a the parent user.

type Part

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

	// Checksum values
	ChecksumCRC32  string `xml:"ChecksumCRC32,omitempty"`
	ChecksumCRC32C string `xml:"ChecksumCRC32C,omitempty"`
	ChecksumSHA1   string `xml:"ChecksumSHA1,omitempty"`
	ChecksumSHA256 string `xml:"ChecksumSHA256,omitempty"`
}

Part container for part metadata.

type PartInfo

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

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

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

	// Size in bytes of the part.
	Size int64

	// Real size of the object uploaded by client.
	ActualSize int64

	// Checksum values
	ChecksumCRC32  string
	ChecksumCRC32C string
	ChecksumSHA1   string
	ChecksumSHA256 string
}

PartInfo - represents individual part metadata.

type PartTooBig

type PartTooBig struct{}

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

func (PartTooBig) Error

func (e PartTooBig) Error() string

type PartTooSmall

type PartTooSmall struct {
	PartSize   int64
	PartNumber int
	PartETag   string
}

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

func (PartTooSmall) Error

func (e PartTooSmall) Error() string

type PeerLocks

type PeerLocks struct {
	Addr  string
	Locks map[string][]lockRequesterInfo
}

PeerLocks holds server information result of one node

type PeerResourceMetrics

type PeerResourceMetrics struct {
	Metrics map[MetricSubsystem]ResourceMetrics
	Errors  []string
}

PeerResourceMetrics represents the resource metrics retrieved from a peer, along with errors if any

type PeerSiteInfo

type PeerSiteInfo struct {
	madmin.PeerSite

	DeploymentID string
	Replicated   bool // true if already participating in site replication
	Empty        bool // true if cluster has no buckets
	// contains filtered or unexported fields
}

PeerSiteInfo is a wrapper struct around madmin.PeerSite with extra info on site status

type PolicyDoc

type PolicyDoc struct {
	Version    int `json:",omitempty"`
	Policy     policy.Policy
	CreateDate time.Time `json:",omitempty"`
	UpdateDate time.Time `json:",omitempty"`
}

PolicyDoc represents an IAM policy with some metadata.

type PolicyStatus

type PolicyStatus struct {
	XMLName  xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PolicyStatus" json:"-"`
	IsPublic string
}

PolicyStatus captures information returned by GetBucketPolicyStatusHandler

type PolicySys

type PolicySys struct{}

PolicySys - policy subsystem.

func NewPolicySys

func NewPolicySys() *PolicySys

NewPolicySys - creates new policy system.

func (*PolicySys) Get

func (sys *PolicySys) Get(bucket string) (*policy.BucketPolicy, error)

Get returns stored bucket policy

func (*PolicySys) IsAllowed

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

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

type PoolDecommissionInfo

type PoolDecommissionInfo struct {
	StartTime   time.Time `json:"startTime" msg:"st"`
	StartSize   int64     `json:"startSize" msg:"ss"`
	TotalSize   int64     `json:"totalSize" msg:"ts"`
	CurrentSize int64     `json:"currentSize" msg:"cs"`

	Complete bool `json:"complete" msg:"cmp"`
	Failed   bool `json:"failed" msg:"fl"`
	Canceled bool `json:"canceled" msg:"cnl"`

	// Internal information.
	QueuedBuckets         []string `json:"-" msg:"bkts"`
	DecommissionedBuckets []string `json:"-" msg:"dbkts"`

	// Last bucket/object decommissioned.
	Bucket string `json:"-" msg:"bkt"`
	// Captures prefix that is currently being
	// decommissioned inside the 'Bucket'
	Prefix string `json:"-" msg:"pfx"`
	Object string `json:"-" msg:"obj"`

	// Verbose information
	ItemsDecommissioned     int64 `json:"objectsDecommissioned" msg:"id"`
	ItemsDecommissionFailed int64 `json:"objectsDecommissionedFailed" msg:"idf"`
	BytesDone               int64 `json:"bytesDecommissioned" msg:"bd"`
	BytesFailed             int64 `json:"bytesDecommissionedFailed" msg:"bf"`
}

PoolDecommissionInfo currently decommissioning information

func (*PoolDecommissionInfo) Clone

Clone make a copy of PoolDecommissionInfo

func (*PoolDecommissionInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*PoolDecommissionInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*PoolDecommissionInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*PoolDecommissionInfo) Msgsize

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

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

func (*PoolDecommissionInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type PoolEndpointList

type PoolEndpointList []Endpoints

PoolEndpointList is a temporary type to holds the list of endpoints

func (PoolEndpointList) UpdateIsLocal

func (p PoolEndpointList) UpdateIsLocal() error

UpdateIsLocal - resolves all hosts and discovers which are local

type PoolEndpoints

type PoolEndpoints struct {
	// indicates if endpoints are provided in non-ellipses style
	Legacy       bool
	SetCount     int
	DrivesPerSet int
	Endpoints    Endpoints
	CmdLine      string
	Platform     string
}

PoolEndpoints represent endpoints in a given pool along with its setCount and setDriveCount.

type PoolObjInfo

type PoolObjInfo struct {
	Index   int
	ObjInfo ObjectInfo
	Err     error
}

PoolObjInfo represents the state of current object version per pool

type PoolStatus

type PoolStatus struct {
	ID           int                   `json:"id" msg:"id"`
	CmdLine      string                `json:"cmdline" msg:"cl"`
	LastUpdate   time.Time             `json:"lastUpdate" msg:"lu"`
	Decommission *PoolDecommissionInfo `json:"decommissionInfo,omitempty" msg:"dec"`
}

PoolStatus captures current pool status

func (PoolStatus) Clone

func (ps PoolStatus) Clone() PoolStatus

Clone returns a copy of PoolStatus

func (*PoolStatus) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*PoolStatus) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*PoolStatus) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*PoolStatus) Msgsize

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

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

func (*PoolStatus) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type PostPolicyForm

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

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

type PostResponse

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

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

type PreConditionFailed

type PreConditionFailed struct{}

PreConditionFailed - Check if copy precondition failed

func (PreConditionFailed) Error

func (e PreConditionFailed) Error() string

type PrefixAccessDenied

type PrefixAccessDenied GenericError

PrefixAccessDenied object access is denied.

func (PrefixAccessDenied) Error

func (e PrefixAccessDenied) Error() string

type ProxyEndpoint

type ProxyEndpoint struct {
	Endpoint
	Transport http.RoundTripper
}

ProxyEndpoint - endpoint used for proxy redirects See proxyRequest() for details.

func GetProxyEndpoints

func GetProxyEndpoints(endpointServerPools EndpointServerPools) []ProxyEndpoint

GetProxyEndpoints - get all endpoints that can be used to proxy list request.

type PutObjReader

type PutObjReader struct {
	*hash.Reader // actual data stream
	// contains filtered or unexported fields
}

PutObjReader is a type that wraps sio.EncryptReader and underlying hash.Reader in a struct

func NewPutObjReader

func NewPutObjReader(rawReader *hash.Reader) *PutObjReader

NewPutObjReader returns a new PutObjReader. It uses given hash.Reader's MD5Current method to construct md5sum when requested downstream.

func (*PutObjReader) MD5CurrentHexString

func (p *PutObjReader) MD5CurrentHexString() string

MD5CurrentHexString returns the current MD5Sum or encrypted MD5Sum as a hex encoded string

func (*PutObjReader) Size

func (p *PutObjReader) Size() int64

Size returns the absolute number of bytes the Reader will return during reading. It returns -1 for unlimited data.

func (*PutObjReader) WithEncryption

func (p *PutObjReader) WithEncryption(encReader *hash.Reader, objEncKey *crypto.ObjectKey) (*PutObjReader, error)

WithEncryption sets up encrypted reader and the sealing for content md5sum using objEncKey. Unsealed md5sum is computed from the rawReader setup when NewPutObjReader was called. It returns an error if called on an uninitialized PutObjReader.

type QStat

type QStat struct {
	Count float64 `json:"count"`
	Bytes float64 `json:"bytes"`
}

QStat holds queue stats for replication

func (*QStat) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (QStat) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (QStat) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (QStat) Msgsize

func (z QStat) Msgsize() (s int)

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

func (*QStat) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RMetricName

type RMetricName string

RMetricName - name of replication metric

const (
	// Large - objects larger than 128MiB
	Large RMetricName = "Large"
	// Small - objects smaller than 128MiB
	Small RMetricName = "Small"
	// Total - metric pertaining to totals
	Total RMetricName = "Total"
)

func (*RMetricName) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RMetricName) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (RMetricName) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RMetricName) Msgsize

func (z RMetricName) Msgsize() (s int)

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

func (*RMetricName) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RStat

type RStat struct {
	Count int64 `json:"count"`
	Bytes int64 `json:"bytes"`
}

RStat has replication error stats

func (*RStat) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RStat) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (RStat) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RStat) Msgsize

func (z RStat) Msgsize() (s int)

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

func (*RStat) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RTimedMetrics

type RTimedMetrics struct {
	LastHour    ReplicationLastHour `json:"lastHour"`
	SinceUptime RStat               `json:"sinceUptime"`
	LastMinute  ReplicationLastMinute
	// Error counts
	ErrCounts map[string]int `json:"errCounts"` // Count of credential errors
}

RTimedMetrics has replication error stats for various time windows

func (*RTimedMetrics) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*RTimedMetrics) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RTimedMetrics) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*RTimedMetrics) Msgsize

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

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

func (*RTimedMetrics) String

func (rt *RTimedMetrics) String() string

func (*RTimedMetrics) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RWLocker

type RWLocker interface {
	GetLock(ctx context.Context, timeout *dynamicTimeout) (lkCtx LockContext, timedOutErr error)
	Unlock(lkCtx LockContext)
	GetRLock(ctx context.Context, timeout *dynamicTimeout) (lkCtx LockContext, timedOutErr error)
	RUnlock(lkCtx LockContext)
}

RWLocker - locker interface to introduce GetRLock, RUnlock.

type RawFileInfo

type RawFileInfo struct {
	// Content of entire xl.meta (may contain data depending on what was requested by the caller.
	Buf []byte `msg:"b"`

	// DiskMTime indicates the mtime of the xl.meta on disk
	// This is mainly used for detecting a particular issue
	// reported in https://gitlab.com/t6085/minio/pull/13803
	DiskMTime time.Time `msg:"dmt"`
}

RawFileInfo - represents raw file stat information as byte array. The above means that any added/deleted fields are incompatible. Make sure to bump the internode version at storage-rest-common.go

func (*RawFileInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*RawFileInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawFileInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*RawFileInfo) Msgsize

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

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

func (*RawFileInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReadMultipleReq

type ReadMultipleReq struct {
	Bucket       string   // Bucket. Can be empty if multiple buckets.
	Prefix       string   // Shared prefix of all files. Can be empty. Will be joined to filename without modification.
	Files        []string // Individual files to read.
	MaxSize      int64    // Return error if size is exceed.
	MetadataOnly bool     // Read as XL meta and truncate data.
	AbortOn404   bool     // Stop reading after first file not found.
	MaxResults   int      // Stop after this many successful results. <= 0 means all.
}

ReadMultipleReq contains information of multiple files to read from disk.

func (*ReadMultipleReq) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReadMultipleReq) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReadMultipleReq) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReadMultipleReq) Msgsize

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

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

func (*ReadMultipleReq) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReadMultipleResp

type ReadMultipleResp struct {
	Bucket  string    // Bucket as given by request.
	Prefix  string    // Prefix as given by request.
	File    string    // File name as given in request.
	Exists  bool      // Returns whether the file existed on disk.
	Error   string    // Returns any error when reading.
	Data    []byte    // Contains all data of file.
	Modtime time.Time // Modtime of file on disk.
}

ReadMultipleResp contains a single response from a ReadMultipleReq.

func (*ReadMultipleResp) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReadMultipleResp) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReadMultipleResp) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReadMultipleResp) Msgsize

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

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

func (*ReadMultipleResp) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RemoteTargetConnectionErr

type RemoteTargetConnectionErr struct {
	Err       error
	Bucket    string
	Endpoint  string
	AccessKey string
}

RemoteTargetConnectionErr remote target connection failure.

func (RemoteTargetConnectionErr) Error

type RenameDataResp

type RenameDataResp struct {
	Signature uint64
	Err       error
}

RenameDataResp - RenameData()'s response.

type ReplQNodeStats

type ReplQNodeStats struct {
	NodeName      string                               `json:"nodeName"`
	Uptime        int64                                `json:"uptime"`
	ActiveWorkers ActiveWorkerStat                     `json:"activeWorkers"`
	XferStats     map[RMetricName]XferStats            `json:"transferSummary"`
	TgtXferStats  map[string]map[RMetricName]XferStats `json:"tgtTransferStats"`
	QStats        InQueueMetric                        `json:"queueStats"`
	MRFStats      ReplicationMRFStats                  `json:"mrfStats"`
}

ReplQNodeStats holds queue stats for replication per node

func (*ReplQNodeStats) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReplQNodeStats) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReplQNodeStats) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReplQNodeStats) Msgsize

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

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

func (*ReplQNodeStats) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicateDecision

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

ReplicateDecision represents replication decision for each target

func (*ReplicateDecision) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ReplicateDecision) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ReplicateDecision) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ReplicateDecision) Msgsize

func (z ReplicateDecision) Msgsize() (s int)

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

func (ReplicateDecision) PendingStatus

func (d ReplicateDecision) PendingStatus() string

PendingStatus returns a stringified representation of internal replication status with all targets marked as `PENDING`

func (ReplicateDecision) ReplicateAny

func (d ReplicateDecision) ReplicateAny() bool

ReplicateAny returns true if atleast one target qualifies for replication

func (*ReplicateDecision) Set

func (d *ReplicateDecision) Set(t replicateTargetDecision)

Set updates ReplicateDecision with target's replication decision

func (ReplicateDecision) String

func (d ReplicateDecision) String() string

func (ReplicateDecision) Synchronous

func (d ReplicateDecision) Synchronous() bool

Synchronous returns true if atleast one target qualifies for synchronous replication

func (*ReplicateDecision) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicateObjectInfo

type ReplicateObjectInfo struct {
	Name                       string
	Bucket                     string
	VersionID                  string
	ETag                       string
	Size                       int64
	ActualSize                 int64
	ModTime                    time.Time
	UserTags                   string
	SSEC                       bool
	ReplicationStatus          replication.StatusType
	ReplicationStatusInternal  string
	VersionPurgeStatusInternal string
	VersionPurgeStatus         VersionPurgeStatusType
	ReplicationState           ReplicationState
	DeleteMarker               bool

	OpType               replication.Type
	EventType            string
	RetryCount           uint32
	ResetID              string
	Dsc                  ReplicateDecision
	ExistingObjResync    ResyncDecision
	TargetArn            string
	TargetStatuses       map[string]replication.StatusType
	TargetPurgeStatuses  map[string]VersionPurgeStatusType
	ReplicationTimestamp time.Time
}

ReplicateObjectInfo represents object info to be replicated

func (ReplicateObjectInfo) TargetReplicationStatus

func (ri ReplicateObjectInfo) TargetReplicationStatus(arn string) (status replication.StatusType)

TargetReplicationStatus - returns replication status of a target

func (ReplicateObjectInfo) ToMRFEntry

func (ri ReplicateObjectInfo) ToMRFEntry() MRFReplicateEntry

ToMRFEntry returns the relevant info needed by MRF

func (ReplicateObjectInfo) ToObjectInfo

func (ri ReplicateObjectInfo) ToObjectInfo() ObjectInfo

ToObjectInfo converts a replication object info to a partial ObjectInfo do not rely on this function to give you correct ObjectInfo, this function is merely and optimization.

type ReplicationLastHour

type ReplicationLastHour struct {
	Totals  [60]AccElem
	LastMin int64
}

ReplicationLastHour keeps track of replication counts over the last hour

func (*ReplicationLastHour) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReplicationLastHour) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReplicationLastHour) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReplicationLastHour) Msgsize

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

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

func (*ReplicationLastHour) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicationLastMinute

type ReplicationLastMinute struct {
	LastMinute lastMinuteLatency
}

ReplicationLastMinute has last minute replication counters

func (*ReplicationLastMinute) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReplicationLastMinute) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReplicationLastMinute) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReplicationLastMinute) Msgsize

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

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

func (*ReplicationLastMinute) String

func (rl *ReplicationLastMinute) String() string

func (*ReplicationLastMinute) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicationLatency

type ReplicationLatency struct {
	// Single & Multipart PUTs latency
	UploadHistogram LastMinuteHistogram
}

ReplicationLatency holds information of bucket operations latency, such us uploads

func (*ReplicationLatency) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReplicationLatency) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReplicationLatency) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReplicationLatency) Msgsize

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

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

func (*ReplicationLatency) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicationMRFStats

type ReplicationMRFStats struct {
	LastFailedCount uint64 `json:"failedCount_last5min"`
	// Count of unreplicated entries that were dropped after MRF retry limit reached since cluster start.
	TotalDroppedCount uint64 `json:"droppedCount_since_uptime"`
	// Bytes of unreplicated entries that were dropped after MRF retry limit reached since cluster start.
	TotalDroppedBytes uint64 `json:"droppedBytes_since_uptime"`
}

ReplicationMRFStats holds stats of MRF backlog saved to disk in the last 5 minutes and number of entries that failed replication after 3 retries

func (*ReplicationMRFStats) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ReplicationMRFStats) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ReplicationMRFStats) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ReplicationMRFStats) Msgsize

func (z ReplicationMRFStats) Msgsize() (s int)

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

func (*ReplicationMRFStats) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicationPermissionCheck

type ReplicationPermissionCheck struct{}

ReplicationPermissionCheck - Check if error type is ReplicationPermissionCheck.

func (ReplicationPermissionCheck) Error

type ReplicationPool

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

ReplicationPool describes replication pool

func NewReplicationPool

func NewReplicationPool(ctx context.Context, o ObjectLayer, opts replicationPoolOpts) *ReplicationPool

NewReplicationPool creates a pool of replication workers of specified size

func (*ReplicationPool) ActiveMRFWorkers

func (p *ReplicationPool) ActiveMRFWorkers() int

ActiveMRFWorkers returns the number of active workers handling replication failures.

func (*ReplicationPool) ActiveWorkers

func (p *ReplicationPool) ActiveWorkers() int

ActiveWorkers returns the number of active workers handling replication traffic.

func (*ReplicationPool) AddLargeWorker

func (p *ReplicationPool) AddLargeWorker(input <-chan ReplicationWorkerOperation)

AddLargeWorker adds a replication worker to the static pool for large uploads.

func (*ReplicationPool) AddLargeWorkers

func (p *ReplicationPool) AddLargeWorkers()

AddLargeWorkers adds a static number of workers to handle large uploads

func (*ReplicationPool) AddMRFWorker

func (p *ReplicationPool) AddMRFWorker()

AddMRFWorker adds a pending/failed replication worker to handle requests that could not be queued to the other workers

func (*ReplicationPool) AddWorker

func (p *ReplicationPool) AddWorker(input <-chan ReplicationWorkerOperation, opTracker *int32)

AddWorker adds a replication worker to the pool. An optional pointer to a tracker that will be atomically incremented when operations are running can be provided.

func (*ReplicationPool) ResizeFailedWorkers

func (p *ReplicationPool) ResizeFailedWorkers(n int)

ResizeFailedWorkers sets replication failed workers pool size

func (*ReplicationPool) ResizeWorkerPriority

func (p *ReplicationPool) ResizeWorkerPriority(pri string)

ResizeWorkerPriority sets replication failed workers pool size

func (*ReplicationPool) ResizeWorkers

func (p *ReplicationPool) ResizeWorkers(n, checkOld int)

ResizeWorkers sets replication workers pool to new size. checkOld can be set to an expected value. If the worker count changed

type ReplicationQueueStats

type ReplicationQueueStats struct {
	Nodes  []ReplQNodeStats `json:"nodes"`
	Uptime int64            `json:"uptime"`
}

ReplicationQueueStats holds overall queue stats for replication

func (*ReplicationQueueStats) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReplicationQueueStats) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReplicationQueueStats) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReplicationQueueStats) Msgsize

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

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

func (*ReplicationQueueStats) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicationState

type ReplicationState struct {
	ReplicaTimeStamp          time.Time              // timestamp when last replica update was received
	ReplicaStatus             replication.StatusType // replica statusstringis
	DeleteMarker              bool                   // represents DeleteMarker replication state
	ReplicationTimeStamp      time.Time              // timestamp when last replication activity happened
	ReplicationStatusInternal string                 // stringified representation of all replication activity
	// VersionPurgeStatusInternal is internally in the format "arn1=PENDING;arn2=COMMPLETED;"
	VersionPurgeStatusInternal string                            // stringified representation of all version purge statuses
	ReplicateDecisionStr       string                            // stringified representation of replication decision for each target
	Targets                    map[string]replication.StatusType // map of ARN->replication status for ongoing replication activity
	PurgeTargets               map[string]VersionPurgeStatusType // map of ARN->VersionPurgeStatus for all the targets
	ResetStatusesMap           map[string]string                 // map of ARN-> stringified reset id and timestamp for all the targets
}

ReplicationState represents internal replication state

func GetInternalReplicationState

func GetInternalReplicationState(m map[string][]byte) ReplicationState

GetInternalReplicationState is a wrapper method to fetch internal replication state from the map m

func (*ReplicationState) CompositeReplicationStatus

func (rs *ReplicationState) CompositeReplicationStatus() (st replication.StatusType)

CompositeReplicationStatus returns overall replication status for the object version being replicated.

func (*ReplicationState) CompositeVersionPurgeStatus

func (rs *ReplicationState) CompositeVersionPurgeStatus() VersionPurgeStatusType

CompositeVersionPurgeStatus returns overall replication purge status for the permanent delete being replicated.

func (*ReplicationState) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ReplicationState) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ReplicationState) Equal

func (rs *ReplicationState) Equal(o ReplicationState) bool

Equal returns true if replication state is identical for version purge statuses and (replica)tion statuses.

func (*ReplicationState) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ReplicationState) Msgsize

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

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

func (*ReplicationState) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ReplicationStats

type ReplicationStats struct {

	// for bucket replication, continue to use existing cache
	Cache map[string]*BucketReplicationStats

	sync.RWMutex // mutex for Cache
	// contains filtered or unexported fields
}

ReplicationStats holds the global in-memory replication stats

func NewReplicationStats

func NewReplicationStats(ctx context.Context, objectAPI ObjectLayer) *ReplicationStats

NewReplicationStats initialize in-memory replication statistics

func (*ReplicationStats) ActiveWorkers

func (r *ReplicationStats) ActiveWorkers() ActiveWorkerStat

ActiveWorkers returns worker stats

func (*ReplicationStats) Delete

func (r *ReplicationStats) Delete(bucket string)

Delete deletes in-memory replication statistics for a bucket.

func (*ReplicationStats) Get

Get replication metrics for a bucket from this node since this node came up.

func (*ReplicationStats) GetAll

GetAll returns replication metrics for all buckets at once.

func (*ReplicationStats) Update

func (r *ReplicationStats) Update(bucket string, ri replicatedTargetInfo, status, prevStatus replication.StatusType)

Update updates in-memory replication statistics with new values.

func (*ReplicationStats) UpdateReplicaStat

func (r *ReplicationStats) UpdateReplicaStat(bucket string, n int64)

UpdateReplicaStat updates in-memory replica statistics with new values.

type ReplicationWorkerOperation

type ReplicationWorkerOperation interface {
	ToMRFEntry() MRFReplicateEntry
}

ReplicationWorkerOperation is a shared interface of replication operations.

type ResourceMetric

type ResourceMetric struct {
	Name   MetricName
	Labels map[string]string

	// value captured in current cycle
	Current float64

	// Used when system provides cumulative (since uptime) values
	// helps in calculating the current value by comparing the new
	// cumulative value with previous one
	Cumulative float64

	Max   float64
	Avg   float64
	Sum   float64
	Count uint64
}

ResourceMetric represents a single resource metric The metrics are collected from all servers periodically and stored in the resource metrics map. It also maintains the count of number of times this metric was collected since the server started, and the sum, average and max values across the same.

type ResourceMetrics

type ResourceMetrics map[string]ResourceMetric

ResourceMetrics is a map of unique key identifying a resource metric (e.g. reads_per_sec_{node}_{drive}) to its data

type RestoreObjectRequest

type RestoreObjectRequest struct {
	XMLName          xml.Name           `xml:"http://s3.amazonaws.com/doc/2006-03-01/ RestoreRequest" json:"-"`
	Days             int                `xml:"Days,omitempty"`
	Type             RestoreRequestType `xml:"Type,omitempty"`
	Tier             string             `xml:"Tier"`
	Description      string             `xml:"Description,omitempty"`
	SelectParameters *SelectParameters  `xml:"SelectParameters,omitempty"`
	OutputLocation   OutputLocation     `xml:"OutputLocation,omitempty"`
}

RestoreObjectRequest - xml to restore a transitioned object

type RestoreRequestType

type RestoreRequestType string

RestoreRequestType represents type of restore.

const (
	// SelectRestoreRequest specifies select request. This is the only valid value
	SelectRestoreRequest RestoreRequestType = "SELECT"
)

type ResyncDecision

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

ResyncDecision is a struct representing a map with target's individual resync decisions

func (*ResyncDecision) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ResyncDecision) Empty

func (r ResyncDecision) Empty() bool

Empty returns true if no targets with resync decision present

func (ResyncDecision) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ResyncDecision) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ResyncDecision) Msgsize

func (z ResyncDecision) Msgsize() (s int)

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

func (*ResyncDecision) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ResyncStatusType

type ResyncStatusType int

ResyncStatusType status of resync operation

const (
	// NoResync - no resync in progress
	NoResync ResyncStatusType = iota
	// ResyncPending - resync pending
	ResyncPending
	// ResyncCanceled - resync canceled
	ResyncCanceled
	// ResyncStarted -  resync in progress
	ResyncStarted
	// ResyncCompleted -  resync finished
	ResyncCompleted
	// ResyncFailed -  resync failed
	ResyncFailed
)

func (*ResyncStatusType) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ResyncStatusType) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ResyncStatusType) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ResyncStatusType) Msgsize

func (z ResyncStatusType) Msgsize() (s int)

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

func (ResyncStatusType) String

func (rt ResyncStatusType) String() string

func (*ResyncStatusType) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ResyncTarget

type ResyncTarget struct {
	Arn       string    `json:"arn"`
	ResetID   string    `json:"resetid"`
	StartTime time.Time `json:"startTime"`
	EndTime   time.Time `json:"endTime"`
	// Status of resync operation
	ResyncStatus string `json:"resyncStatus,omitempty"`
	// Completed size in bytes
	ReplicatedSize int64 `json:"completedReplicationSize"`
	// Failed size in bytes
	FailedSize int64 `json:"failedReplicationSize"`
	// Total number of failed operations
	FailedCount int64 `json:"failedReplicationCount"`
	// Total number of failed operations
	ReplicatedCount int64 `json:"replicationCount"`
	// Last bucket/object replicated.
	Bucket string `json:"bucket,omitempty"`
	Object string `json:"object,omitempty"`
}

ResyncTarget is a struct representing the Target reset ID where target is identified by its Arn

func (*ResyncTarget) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ResyncTarget) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ResyncTarget) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ResyncTarget) Msgsize

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

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

func (*ResyncTarget) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ResyncTargetDecision

type ResyncTargetDecision struct {
	Replicate       bool
	ResetID         string
	ResetBeforeDate time.Time
}

ResyncTargetDecision is struct that represents resync decision for this target

func (*ResyncTargetDecision) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ResyncTargetDecision) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ResyncTargetDecision) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ResyncTargetDecision) Msgsize

func (z ResyncTargetDecision) Msgsize() (s int)

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

func (*ResyncTargetDecision) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ResyncTargetsInfo

type ResyncTargetsInfo struct {
	Targets []ResyncTarget `json:"target,omitempty"`
}

ResyncTargetsInfo holds a slice of targets with resync info per target

func (*ResyncTargetsInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ResyncTargetsInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ResyncTargetsInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ResyncTargetsInfo) Msgsize

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

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

func (*ResyncTargetsInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type S3Location

type S3Location struct {
	BucketName   string          `xml:"BucketName,omitempty"`
	Encryption   Encryption      `xml:"Encryption,omitempty"`
	Prefix       string          `xml:"Prefix,omitempty"`
	StorageClass string          `xml:"StorageClass,omitempty"`
	Tagging      *tags.Tags      `xml:"Tagging,omitempty"`
	UserMetadata []MetadataEntry `xml:"UserMetadata"`
}

S3Location specifies s3 location that receives result of a restore object request

type S3PeerSys

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

S3PeerSys - S3 peer call system.

func NewS3PeerSys

func NewS3PeerSys(endpoints EndpointServerPools) *S3PeerSys

NewS3PeerSys - creates new S3 peer calls.

func (*S3PeerSys) DeleteBucket

func (sys *S3PeerSys) DeleteBucket(ctx context.Context, bucket string, opts DeleteBucketOptions) error

DeleteBucket deletes bucket across all peers

func (*S3PeerSys) GetBucketInfo

func (sys *S3PeerSys) GetBucketInfo(ctx context.Context, bucket string, opts BucketOptions) (binfo BucketInfo, err error)

GetBucketInfo returns bucket stat info about bucket on disk across all peers

func (*S3PeerSys) ListBuckets

func (sys *S3PeerSys) ListBuckets(ctx context.Context, opts BucketOptions) ([]BucketInfo, error)

ListBuckets lists buckets across all nodes and returns a consistent view:

  • Return an error when a pool cannot return N/2+1 valid bucket information
  • For each pool, check if the bucket exists in N/2+1 nodes before including it in the final result

func (*S3PeerSys) MakeBucket

func (sys *S3PeerSys) MakeBucket(ctx context.Context, bucket string, opts MakeBucketOptions) error

MakeBucket creates bucket across all peers

type SMA

type SMA struct {
	CAvg float64 // cumulative average
	// contains filtered or unexported fields
}

SMA struct for calculating simple moving average

func (*SMA) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (SMA) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (SMA) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (SMA) Msgsize

func (z SMA) Msgsize() (s int)

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

func (*SMA) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SRBucketDeleteOp

type SRBucketDeleteOp string

SRBucketDeleteOp - type of delete op

const (
	// MarkDelete creates .minio.sys/buckets/.deleted/<bucket> vol entry to hold onto deleted bucket's state
	// until peers are synced in site replication setup.
	MarkDelete SRBucketDeleteOp = "MarkDelete"

	// Purge deletes the .minio.sys/buckets/.deleted/<bucket> vol entry
	Purge SRBucketDeleteOp = "Purge"
	// NoOp no action needed
	NoOp SRBucketDeleteOp = "NoOp"
)

func (SRBucketDeleteOp) Empty

func (s SRBucketDeleteOp) Empty() bool

Empty returns true if this Op is not set

type SRError

type SRError struct {
	Cause error
	Code  APIErrorCode
}

SRError - wrapped error for site replication.

func (SRError) Error

func (c SRError) Error() string

func (SRError) Unwrap

func (c SRError) Unwrap() error

type SRMetric

type SRMetric struct {
	DeploymentID  string             `json:"deploymentID"`
	Endpoint      string             `json:"endpoint"`
	TotalDowntime time.Duration      `json:"totalDowntime"`
	LastOnline    time.Time          `json:"lastOnline"`
	Online        bool               `json:"isOnline"`
	Latency       madmin.LatencyStat `json:"latency"`

	// replication metrics across buckets roll up
	ReplicatedSize int64 `json:"replicatedSize"`
	// Total number of completed operations
	ReplicatedCount int64 `json:"replicatedCount"`

	Failed madmin.TimedErrStats `json:"failed,omitempty"`

	XferStats map[RMetricName]XferStats `json:"transferSummary"`
}

SRMetric captures replication metrics for a deployment

func (*SRMetric) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SRMetric) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SRMetric) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SRMetric) Msgsize

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

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

func (*SRMetric) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SRMetricsSummary

type SRMetricsSummary struct {
	// op metrics roll up
	ActiveWorkers ActiveWorkerStat `json:"activeWorkers"`

	// Total Replica size in bytes
	ReplicaSize int64 `json:"replicaSize"`

	// Total number of replica received
	ReplicaCount int64 `json:"replicaCount"`
	// Queued operations
	Queued InQueueMetric `json:"queued"`
	// replication metrics summary for each site replication peer
	Metrics map[string]SRMetric `json:"replMetrics"`
	// uptime of node being queried for site replication metrics
	Uptime int64 `json:"uptime"`
}

SRMetricsSummary captures summary of replication counts across buckets on site along with op metrics rollup.

func (*SRMetricsSummary) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SRMetricsSummary) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SRMetricsSummary) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SRMetricsSummary) Msgsize

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

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

func (*SRMetricsSummary) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SRStats

type SRStats struct {
	// Total Replica size in bytes
	ReplicaSize int64 `json:"replicaSize"`
	// Total Replica received
	ReplicaCount int64                `json:"replicaCount"`
	M            map[string]*SRStatus `json:"srStatusMap"`
	// contains filtered or unexported fields
}

SRStats has replication stats at site level

func (*SRStats) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SRStats) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SRStats) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SRStats) Msgsize

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

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

func (*SRStats) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SRStatus

type SRStatus struct {
	ReplicatedSize int64 `json:"completedReplicationSize"`
	// Total number of failed operations including metadata updates in the last minute
	Failed RTimedMetrics `json:"failedReplication"`
	// Total number of completed operations
	ReplicatedCount int64 `json:"replicationCount"`
	// Replication latency information
	Latency ReplicationLatency `json:"replicationLatency"`
	// transfer rate for large uploads
	XferRateLrg *XferStats `json:"largeTransferRate" msg:"lt"`
	// transfer rate for small uploads
	XferRateSml *XferStats `json:"smallTransferRate" msg:"st"`
	// Endpoint is the replication target endpoint
	Endpoint string `json:"-"`
	// Secure is true if the replication target endpoint is secure
	Secure bool `json:"-"`
}

SRStatus has replication stats at deployment level

func (*SRStatus) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SRStatus) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SRStatus) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SRStatus) Msgsize

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

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

func (*SRStatus) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type STSError

type STSError struct {
	Code           string
	Description    string
	HTTPStatusCode int
}

STSError structure

type STSErrorCode

type STSErrorCode int

STSErrorCode type of error status.

const (
	ErrSTSNone STSErrorCode = iota
	ErrSTSAccessDenied
	ErrSTSMissingParameter
	ErrSTSInvalidParameterValue
	ErrSTSWebIdentityExpiredToken
	ErrSTSClientGrantsExpiredToken
	ErrSTSInvalidClientGrantsToken
	ErrSTSMalformedPolicyDocument
	ErrSTSInsecureConnection
	ErrSTSInvalidClientCertificate
	ErrSTSNotInitialized
	ErrSTSIAMNotInitialized
	ErrSTSUpstreamError
	ErrSTSInternalError
)

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

func (STSErrorCode) String

func (i STSErrorCode) String() string

type STSErrorResponse

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

STSErrorResponse - error response format

type SealMD5CurrFn

type SealMD5CurrFn func([]byte) []byte

SealMD5CurrFn seals md5sum with object encryption key and returns sealed md5sum

type SelectParameters

type SelectParameters struct {
	s3select.S3Select
}

SelectParameters specifies sql select parameters

func (*SelectParameters) IsEmpty

func (sp *SelectParameters) IsEmpty() bool

IsEmpty returns true if no select parameters set

func (*SelectParameters) UnmarshalXML

func (sp *SelectParameters) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML - decodes XML data.

type ServerHTTPAPIStats

type ServerHTTPAPIStats struct {
	APIStats map[string]int `json:"apiStats"`
}

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

type ServerHTTPStats

type ServerHTTPStats struct {
	S3RequestsInQueue      int32              `json:"s3RequestsInQueue"`
	S3RequestsIncoming     uint64             `json:"s3RequestsIncoming"`
	CurrentS3Requests      ServerHTTPAPIStats `json:"currentS3Requests"`
	TotalS3Requests        ServerHTTPAPIStats `json:"totalS3Requests"`
	TotalS3Errors          ServerHTTPAPIStats `json:"totalS3Errors"`
	TotalS35xxErrors       ServerHTTPAPIStats `json:"totalS35xxErrors"`
	TotalS34xxErrors       ServerHTTPAPIStats `json:"totalS34xxErrors"`
	TotalS3Canceled        ServerHTTPAPIStats `json:"totalS3Canceled"`
	TotalS3RejectedAuth    uint64             `json:"totalS3RejectedAuth"`
	TotalS3RejectedTime    uint64             `json:"totalS3RejectedTime"`
	TotalS3RejectedHeader  uint64             `json:"totalS3RejectedHeader"`
	TotalS3RejectedInvalid uint64             `json:"totalS3RejectedInvalid"`
}

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

type ServerProperties

type ServerProperties struct {
	Uptime       int64    `json:"uptime"`
	Version      string   `json:"version"`
	CommitID     string   `json:"commitID"`
	DeploymentID string   `json:"deploymentID"`
	Region       string   `json:"region"`
	SQSARN       []string `json:"sqsARN"`
}

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

type ServerSystemConfig

type ServerSystemConfig struct {
	MinioEndpoints EndpointServerPools
	MinioEnv       map[string]string
}

ServerSystemConfig - captures information about server configuration.

func (ServerSystemConfig) Diff

Diff - returns error on first difference found in two configs.

type SetupType

type SetupType int

SetupType - enum for setup type.

const (
	// UnknownSetupType - starts with unknown setup type.
	UnknownSetupType SetupType = iota

	// FSSetupType - FS setup type enum.
	FSSetupType

	// ErasureSDSetupType - Erasure single drive setup enum.
	ErasureSDSetupType

	// ErasureSetupType - Erasure setup type enum.
	ErasureSetupType

	// DistErasureSetupType - Distributed Erasure setup type enum.
	DistErasureSetupType
)

func (SetupType) String

func (setupType SetupType) String() string

type SignatureDoesNotMatch

type SignatureDoesNotMatch struct{}

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

func (SignatureDoesNotMatch) Error

func (e SignatureDoesNotMatch) Error() string

type SiteReplicationSys

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

SiteReplicationSys - manages cluster-level replication.

func (*SiteReplicationSys) AddPeerClusters

func (c *SiteReplicationSys) AddPeerClusters(ctx context.Context, psites []madmin.PeerSite) (madmin.ReplicateAddStatus, error)

AddPeerClusters - add cluster sites for replication configuration.

func (*SiteReplicationSys) BucketMetaHook

func (c *SiteReplicationSys) BucketMetaHook(ctx context.Context, item madmin.SRBucketMeta) error

BucketMetaHook - called when bucket meta changes happen and need to be replicated to peer clusters.

func (*SiteReplicationSys) DeleteBucketHook

func (c *SiteReplicationSys) DeleteBucketHook(ctx context.Context, bucket string, forceDelete bool) error

DeleteBucketHook - called during a regular delete bucket call when cluster replication is enabled. It is responsible for the deletion of the same bucket on remote clusters.

func (*SiteReplicationSys) EditPeerCluster

func (c *SiteReplicationSys) EditPeerCluster(ctx context.Context, peer madmin.PeerInfo) (madmin.ReplicateEditStatus, error)

EditPeerCluster - edits replication configuration and updates peer endpoint.

func (*SiteReplicationSys) GetClusterInfo

func (c *SiteReplicationSys) GetClusterInfo(ctx context.Context) (info madmin.SiteReplicationInfo, err error)

GetClusterInfo - returns site replication information.

func (*SiteReplicationSys) GetIDPSettings

func (c *SiteReplicationSys) GetIDPSettings(ctx context.Context) madmin.IDPSettings

GetIDPSettings returns info about the configured identity provider. It is used to validate that all peers have the same IDP.

func (*SiteReplicationSys) IAMChangeHook

func (c *SiteReplicationSys) IAMChangeHook(ctx context.Context, item madmin.SRIAMItem) error

IAMChangeHook - called when IAM items need to be replicated to peer clusters. This includes named policy creation, policy mapping changes and service account changes.

All policies are replicated.

Policy mappings are only replicated when they are for LDAP users or groups (as an external IDP is always assumed when SR is used). In the case of OpenID, such mappings are provided from the IDP directly and so are not applicable here.

Service accounts are replicated as long as they are not meant for the root user.

STS accounts are replicated, but only if the session token is verifiable using the local cluster's root credential.

func (*SiteReplicationSys) Init

func (c *SiteReplicationSys) Init(ctx context.Context, objAPI ObjectLayer) error

Init - initialize the site replication manager.

func (*SiteReplicationSys) InternalRemoveReq

func (c *SiteReplicationSys) InternalRemoveReq(ctx context.Context, objectAPI ObjectLayer, rreq madmin.SRRemoveReq) error

InternalRemoveReq - sends an unlink request to peer cluster to remove one or more sites from the site replication configuration.

func (*SiteReplicationSys) MakeBucketHook

func (c *SiteReplicationSys) MakeBucketHook(ctx context.Context, bucket string, opts MakeBucketOptions) error

MakeBucketHook - called during a regular make bucket call when cluster replication is enabled. It is responsible for the creation of the same bucket on remote clusters, and creating replication rules on local and peer clusters.

func (*SiteReplicationSys) Netperf

func (c *SiteReplicationSys) Netperf(ctx context.Context, duration time.Duration) (results madmin.SiteNetPerfResult, err error)

Netperf for site-replication net perf

func (*SiteReplicationSys) PeerAddPolicyHandler

func (c *SiteReplicationSys) PeerAddPolicyHandler(ctx context.Context, policyName string, p *policy.Policy, updatedAt time.Time) error

PeerAddPolicyHandler - copies IAM policy to local. A nil policy argument, causes the named policy to be deleted.

func (*SiteReplicationSys) PeerBucketConfigureReplHandler

func (c *SiteReplicationSys) PeerBucketConfigureReplHandler(ctx context.Context, bucket string) error

PeerBucketConfigureReplHandler - configures replication remote and replication rules to all other peers for the local bucket.

func (*SiteReplicationSys) PeerBucketDeleteHandler

func (c *SiteReplicationSys) PeerBucketDeleteHandler(ctx context.Context, bucket string, opts DeleteBucketOptions) error

PeerBucketDeleteHandler - deletes bucket on local in response to a delete bucket request from a peer.

func (*SiteReplicationSys) PeerBucketMakeWithVersioningHandler

func (c *SiteReplicationSys) PeerBucketMakeWithVersioningHandler(ctx context.Context, bucket string, opts MakeBucketOptions) error

PeerBucketMakeWithVersioningHandler - creates bucket and enables versioning.

func (*SiteReplicationSys) PeerBucketMetadataUpdateHandler

func (c *SiteReplicationSys) PeerBucketMetadataUpdateHandler(ctx context.Context, item madmin.SRBucketMeta) error

PeerBucketMetadataUpdateHandler - merges the bucket metadata, save and ping other nodes

func (*SiteReplicationSys) PeerBucketObjectLockConfigHandler

func (c *SiteReplicationSys) PeerBucketObjectLockConfigHandler(ctx context.Context, bucket string, objectLockData *string, updatedAt time.Time) error

PeerBucketObjectLockConfigHandler - sets object lock on local bucket.

func (*SiteReplicationSys) PeerBucketPolicyHandler

func (c *SiteReplicationSys) PeerBucketPolicyHandler(ctx context.Context, bucket string, policy *policy.BucketPolicy, updatedAt time.Time) error

PeerBucketPolicyHandler - copies/deletes policy to local cluster.

func (*SiteReplicationSys) PeerBucketQuotaConfigHandler

func (c *SiteReplicationSys) PeerBucketQuotaConfigHandler(ctx context.Context, bucket string, quota *madmin.BucketQuota, updatedAt time.Time) error

PeerBucketQuotaConfigHandler - copies/deletes policy to local cluster.

func (*SiteReplicationSys) PeerBucketSSEConfigHandler

func (c *SiteReplicationSys) PeerBucketSSEConfigHandler(ctx context.Context, bucket string, sseConfig *string, updatedAt time.Time) error

PeerBucketSSEConfigHandler - copies/deletes SSE config to local cluster.

func (*SiteReplicationSys) PeerBucketTaggingHandler

func (c *SiteReplicationSys) PeerBucketTaggingHandler(ctx context.Context, bucket string, tags *string, updatedAt time.Time) error

PeerBucketTaggingHandler - copies/deletes tags to local cluster.

func (*SiteReplicationSys) PeerBucketVersioningHandler

func (c *SiteReplicationSys) PeerBucketVersioningHandler(ctx context.Context, bucket string, versioning *string, updatedAt time.Time) error

PeerBucketVersioningHandler - updates versioning config to local cluster.

func (*SiteReplicationSys) PeerEditReq

func (c *SiteReplicationSys) PeerEditReq(ctx context.Context, arg madmin.PeerInfo) error

PeerEditReq - internal API handler to respond to a peer cluster's request to edit endpoint.

func (*SiteReplicationSys) PeerGroupInfoChangeHandler

func (c *SiteReplicationSys) PeerGroupInfoChangeHandler(ctx context.Context, change *madmin.SRGroupInfo, updatedAt time.Time) error

PeerGroupInfoChangeHandler - copies group changes to local.

func (*SiteReplicationSys) PeerIAMUserChangeHandler

func (c *SiteReplicationSys) PeerIAMUserChangeHandler(ctx context.Context, change *madmin.SRIAMUser, updatedAt time.Time) error

PeerIAMUserChangeHandler - copies IAM user to local.

func (*SiteReplicationSys) PeerJoinReq

func (c *SiteReplicationSys) PeerJoinReq(ctx context.Context, arg madmin.SRPeerJoinReq) error

PeerJoinReq - internal API handler to respond to a peer cluster's request to join.

func (*SiteReplicationSys) PeerPolicyMappingHandler

func (c *SiteReplicationSys) PeerPolicyMappingHandler(ctx context.Context, mapping *madmin.SRPolicyMapping, updatedAt time.Time) error

PeerPolicyMappingHandler - copies policy mapping to local.

func (*SiteReplicationSys) PeerSTSAccHandler

func (c *SiteReplicationSys) PeerSTSAccHandler(ctx context.Context, stsCred *madmin.SRSTSCredential, updatedAt time.Time) error

PeerSTSAccHandler - replicates STS credential locally.

func (*SiteReplicationSys) PeerSvcAccChangeHandler

func (c *SiteReplicationSys) PeerSvcAccChangeHandler(ctx context.Context, change *madmin.SRSvcAccChange, updatedAt time.Time) error

PeerSvcAccChangeHandler - copies service-account change to local.

func (*SiteReplicationSys) RemovePeerCluster

func (c *SiteReplicationSys) RemovePeerCluster(ctx context.Context, objectAPI ObjectLayer, rreq madmin.SRRemoveReq) (st madmin.ReplicateRemoveStatus, err error)

RemovePeerCluster - removes one or more clusters from site replication configuration.

func (*SiteReplicationSys) RemoveRemoteTargetsForEndpoint

func (c *SiteReplicationSys) RemoveRemoteTargetsForEndpoint(ctx context.Context, objectAPI ObjectLayer, endpoints []string, unlinkSelf bool) (err error)

RemoveRemoteTargetsForEndpoint removes replication targets corresponding to endpoint

func (*SiteReplicationSys) SiteReplicationMetaInfo

func (c *SiteReplicationSys) SiteReplicationMetaInfo(ctx context.Context, objAPI ObjectLayer, opts madmin.SRStatusOptions) (info madmin.SRInfo, err error)

SiteReplicationMetaInfo returns the metadata info on buckets, policies etc for the replicated site

func (*SiteReplicationSys) SiteReplicationStatus

func (c *SiteReplicationSys) SiteReplicationStatus(ctx context.Context, objAPI ObjectLayer, opts madmin.SRStatusOptions) (info madmin.SRStatusInfo, err error)

SiteReplicationStatus returns the site replication status across clusters participating in site replication.

type SiteResyncStatus

type SiteResyncStatus struct {
	Version int `json:"version" msg:"v"`
	// Overall site status
	Status                        ResyncStatusType            `json:"st" msg:"ss"`
	DeplID                        string                      `json:"dId" msg:"did"`
	BucketStatuses                map[string]ResyncStatusType `json:"buckets" msg:"bkts"`
	TotBuckets                    int                         `json:"totbuckets" msg:"tb"`
	TargetReplicationResyncStatus `json:"currSt" msg:"cst"`
}

SiteResyncStatus captures current replication resync status for a target site

func (*SiteResyncStatus) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SiteResyncStatus) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SiteResyncStatus) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SiteResyncStatus) Msgsize

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

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

func (*SiteResyncStatus) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SlowDown

type SlowDown struct{}

SlowDown too many file descriptors open or backend busy .

func (SlowDown) Error

func (e SlowDown) Error() string

type SpeedTestResult

type SpeedTestResult struct {
	Endpoint      string
	Uploads       uint64
	Downloads     uint64
	UploadTimes   madmin.TimeDurations
	DownloadTimes madmin.TimeDurations
	DownloadTTFB  madmin.TimeDurations
	Error         string
}

SpeedTestResult return value of the speedtest function

type StartProfilingResult

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

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

type StatInfo

type StatInfo struct {
	Size    int64     `json:"size"`    // Size of the object `xl.meta`.
	ModTime time.Time `json:"modTime"` // ModTime of the object `xl.meta`.
	Name    string    `json:"name"`
	Dir     bool      `json:"dir"`
	Mode    uint32    `json:"mode"`
}

StatInfo - carries stat information of the object.

func (*StatInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*StatInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*StatInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*StatInfo) Msgsize

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

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

func (*StatInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type StorageAPI

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

	// Returns true if disk is online and its valid i.e valid format.json.
	// This has nothing to do with if the drive is hung or not responding.
	// For that individual storage API calls will fail properly. The purpose
	// of this function is to know if the "drive" has "format.json" or not
	// if it has a "format.json" then is it correct "format.json" or not.
	IsOnline() bool

	// Returns the last time this disk (re)-connected
	LastConn() time.Time

	// Indicates if disk is local or not.
	IsLocal() bool

	// Returns hostname if disk is remote.
	Hostname() string

	// Returns the entire endpoint.
	Endpoint() Endpoint

	// Close the disk, mark it purposefully closed, only implemented for remote disks.
	Close() error

	// Returns the unique 'uuid' of this disk.
	GetDiskID() (string, error)

	// Set a unique 'uuid' for this disk, only used when
	// disk is replaced and formatted.
	SetDiskID(id string)

	// Returns healing information for a newly replaced disk,
	// returns 'nil' once healing is complete or if the disk
	// has never been replaced.
	Healing() *healingTracker
	DiskInfo(ctx context.Context, metrics bool) (info DiskInfo, err error)
	NSScanner(ctx context.Context, cache dataUsageCache, updates chan<- dataUsageEntry, scanMode madmin.HealScanMode) (dataUsageCache, error)

	// Volume operations.
	MakeVol(ctx context.Context, volume string) (err error)
	MakeVolBulk(ctx context.Context, volumes ...string) (err error)
	ListVols(ctx context.Context) (vols []VolInfo, err error)
	StatVol(ctx context.Context, volume string) (vol VolInfo, err error)
	DeleteVol(ctx context.Context, volume string, forceDelete bool) (err error)

	// WalkDir will walk a directory on disk and return a metacache stream on wr.
	WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) error

	// Metadata operations
	DeleteVersion(ctx context.Context, volume, path string, fi FileInfo, forceDelMarker bool) error
	DeleteVersions(ctx context.Context, volume string, versions []FileInfoVersions) []error
	WriteMetadata(ctx context.Context, volume, path string, fi FileInfo) error
	UpdateMetadata(ctx context.Context, volume, path string, fi FileInfo, opts UpdateMetadataOpts) error
	ReadVersion(ctx context.Context, volume, path, versionID string, readData bool) (FileInfo, error)
	ReadXL(ctx context.Context, volume, path string, readData bool) (RawFileInfo, error)
	RenameData(ctx context.Context, srcVolume, srcPath string, fi FileInfo, dstVolume, dstPath string) (uint64, error)

	// File operations.
	ListDir(ctx context.Context, volume, dirPath string, count int) ([]string, error)
	ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error)
	AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error)
	CreateFile(ctx context.Context, volume, path string, size int64, reader io.Reader) error
	ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error)
	RenameFile(ctx context.Context, srcVolume, srcPath, dstVolume, dstPath string) error
	CheckParts(ctx context.Context, volume string, path string, fi FileInfo) error
	Delete(ctx context.Context, volume string, path string, deleteOpts DeleteOptions) (err error)
	VerifyFile(ctx context.Context, volume, path string, fi FileInfo) error
	StatInfoFile(ctx context.Context, volume, path string, glob bool) (stat []StatInfo, err error)
	ReadMultiple(ctx context.Context, req ReadMultipleReq, resp chan<- ReadMultipleResp) error
	CleanAbandonedData(ctx context.Context, volume string, path string) error

	// Write all data, syncs the data to disk.
	// Should be used for smaller payloads.
	WriteAll(ctx context.Context, volume string, path string, b []byte) (err error)

	// Read all.
	ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error)
	GetDiskLoc() (poolIdx, setIdx, diskIdx int) // Retrieve location indexes.
	SetDiskLoc(poolIdx, setIdx, diskIdx int)    // Set location indexes.
}

StorageAPI interface.

var OfflineDisk StorageAPI // zero value is nil

OfflineDisk represents an unavailable disk.

type StorageErr

type StorageErr string

StorageErr represents error generated by xlStorage call.

func (StorageErr) Error

func (h StorageErr) Error() string

type StorageFull

type StorageFull struct{}

StorageFull storage ran out of space.

func (StorageFull) Error

func (e StorageFull) Error() string

type StorageInfo

type StorageInfo = madmin.StorageInfo

StorageInfo - represents total capacity of underlying storage.

type TargetClient

type TargetClient struct {
	*minio.Client

	Bucket string // remote bucket target

	StorageClass string // storage class on remote

	ARN      string // ARN to uniquely identify remote target
	ResetID  string
	Endpoint string
	Secure   bool
	// contains filtered or unexported fields
}

TargetClient is the struct for remote target client.

type TargetReplicationResyncStatus

type TargetReplicationResyncStatus struct {
	StartTime  time.Time `json:"startTime" msg:"st"`
	LastUpdate time.Time `json:"lastUpdated" msg:"lst"`
	// Resync ID assigned to this reset
	ResyncID string `json:"resyncID" msg:"id"`
	// ResyncBeforeDate - resync all objects created prior to this date
	ResyncBeforeDate time.Time `json:"resyncBeforeDate" msg:"rdt"`
	// Status of resync operation
	ResyncStatus ResyncStatusType `json:"resyncStatus" msg:"rst"`
	// Failed size in bytes
	FailedSize int64 `json:"failedReplicationSize"  msg:"fs"`
	// Total number of failed operations
	FailedCount int64 `json:"failedReplicationCount"  msg:"frc"`
	// Completed size in bytes
	ReplicatedSize int64 `json:"completedReplicationSize"  msg:"rs"`
	// Total number of failed operations
	ReplicatedCount int64 `json:"replicationCount"  msg:"rrc"`
	// Last bucket/object replicated.
	Bucket string `json:"-" msg:"bkt"`
	Object string `json:"-" msg:"obj"`
	Error  error  `json:"-" msg:"-"`
}

TargetReplicationResyncStatus status of resync of bucket for a specific target

func (*TargetReplicationResyncStatus) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*TargetReplicationResyncStatus) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*TargetReplicationResyncStatus) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*TargetReplicationResyncStatus) Msgsize

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

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

func (*TargetReplicationResyncStatus) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type TierConfigMgr

type TierConfigMgr struct {
	sync.RWMutex `msg:"-"`

	Tiers map[string]madmin.TierConfig `json:"tiers"`
	// contains filtered or unexported fields
}

TierConfigMgr holds the collection of remote tiers configured in this deployment.

func NewTierConfigMgr

func NewTierConfigMgr() *TierConfigMgr

NewTierConfigMgr - creates new tier configuration manager,

func (*TierConfigMgr) Add

func (config *TierConfigMgr) Add(ctx context.Context, tier madmin.TierConfig, ignoreInUse bool) error

Add adds tier to config if it passes all validations.

func (*TierConfigMgr) Bytes

func (config *TierConfigMgr) Bytes() ([]byte, error)

Bytes returns msgpack encoded config with format and version headers.

func (*TierConfigMgr) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*TierConfigMgr) Edit

func (config *TierConfigMgr) Edit(ctx context.Context, tierName string, creds madmin.TierCreds) error

Edit replaces the credentials of the remote tier specified by tierName with creds.

func (*TierConfigMgr) Empty

func (config *TierConfigMgr) Empty() bool

Empty returns if tier targets are empty

func (*TierConfigMgr) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*TierConfigMgr) Init

func (config *TierConfigMgr) Init(ctx context.Context, objAPI ObjectLayer) error

Init initializes tier configuration reading from objAPI

func (*TierConfigMgr) IsTierValid

func (config *TierConfigMgr) IsTierValid(tierName string) bool

IsTierValid returns true if there exists a remote tier by name tierName, otherwise returns false.

func (*TierConfigMgr) ListTiers

func (config *TierConfigMgr) ListTiers() []madmin.TierConfig

ListTiers lists remote tiers configured in this deployment.

func (*TierConfigMgr) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*TierConfigMgr) Msgsize

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

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

func (*TierConfigMgr) Reload

func (config *TierConfigMgr) Reload(ctx context.Context, objAPI ObjectLayer) error

Reload updates config by reloading remote tier config from config store.

func (*TierConfigMgr) Remove

func (config *TierConfigMgr) Remove(ctx context.Context, tier string) error

Remove removes tier if it is empty.

func (*TierConfigMgr) Reset

func (config *TierConfigMgr) Reset()

Reset clears remote tier configured and clears tier driver cache.

func (*TierConfigMgr) Save

func (config *TierConfigMgr) Save(ctx context.Context, objAPI ObjectLayer) error

Save saves tier configuration onto objAPI

func (*TierConfigMgr) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

func (*TierConfigMgr) Verify

func (config *TierConfigMgr) Verify(ctx context.Context, tier string) error

Verify verifies if tier's config is valid by performing all supported operations on the corresponding warmbackend.

type TierJournal

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

TierJournal holds an in-memory and an on-disk delete journal of tiered content.

func NewTierJournal

func NewTierJournal() *TierJournal

NewTierJournal initializes tier deletion journal

func (TierJournal) AddEntry

func (j TierJournal) AddEntry(je jentry) error

func (TierJournal) Close

func (jd TierJournal) Close() error

Close closes the active journal and renames it to read-only for pending deletes processing. Note: calling Close on a closed journal is a no-op.

func (*TierJournal) Init

func (t *TierJournal) Init(ctx context.Context) error

Init intializes an in-memory journal built using a buffered channel for new journal entries. It also initializes the on-disk journal only to process existing journal entries made from previous versions.

func (TierJournal) JournalPath

func (jd TierJournal) JournalPath() string

func (TierJournal) Open

func (jd TierJournal) Open() error

Open opens a new active journal. Note: calling Open on an opened journal is a no-op.

func (TierJournal) OpenRO

func (jd TierJournal) OpenRO() (io.ReadCloser, error)

func (TierJournal) ReadOnlyPath

func (jd TierJournal) ReadOnlyPath() string

func (TierJournal) WalkEntries

func (jd TierJournal) WalkEntries(ctx context.Context, fn walkFn)

type TransitionOptions

type TransitionOptions struct {
	Status         string
	Tier           string
	ETag           string
	RestoreRequest *RestoreObjectRequest
	RestoreExpiry  time.Time
	ExpireRestored bool
}

TransitionOptions represents object options for transition ObjectLayer operation

type TransitionStorageClassNotFound

type TransitionStorageClassNotFound GenericError

TransitionStorageClassNotFound remote tier not configured.

func (TransitionStorageClassNotFound) Error

type TransitionedObject

type TransitionedObject struct {
	Name        string
	VersionID   string
	Tier        string
	FreeVersion bool
	Status      string
}

TransitionedObject transitioned object tier and status.

type UnsupportedMetadata

type UnsupportedMetadata struct{}

UnsupportedMetadata - unsupported metadata

func (UnsupportedMetadata) Error

func (e UnsupportedMetadata) Error() string

type UpdateMetadataOpts

type UpdateMetadataOpts struct {
	NoPersistence bool
}

UpdateMetadataOpts provides an optional input to indicate if xl.meta updates need to be fully synced to disk.

type Upload

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

Upload container for in progress multipart upload

type UserIdentity

type UserIdentity struct {
	Version     int              `json:"version"`
	Credentials auth.Credentials `json:"credentials"`
	UpdatedAt   time.Time        `json:"updatedAt,omitempty"`
}

UserIdentity represents a user's secret key and their status

type UsersSysType

type UsersSysType string

UsersSysType - defines the type of users and groups system that is active on the server.

const (
	// This mode uses the internal users system in MinIO.
	MinIOUsersSysType UsersSysType = "MinIOUsersSys"

	// This mode uses users and groups from a configured LDAP
	// server.
	LDAPUsersSysType UsersSysType = "LDAPUsersSys"
)

Types of users configured in the server.

type VerifyFileResp

type VerifyFileResp struct {
	Err error
}

VerifyFileResp - VerifyFile()'s response.

type VersionNotFound

type VersionNotFound GenericError

VersionNotFound version does not exist.

func (VersionNotFound) Error

func (e VersionNotFound) Error() string

type VersionPurgeStatusType

type VersionPurgeStatusType string

VersionPurgeStatusType represents status of a versioned delete or permanent delete w.r.t bucket replication

const (
	// Pending - versioned delete replication is pending.
	Pending VersionPurgeStatusType = "PENDING"

	// Complete - versioned delete replication is now complete, erase version on disk.
	Complete VersionPurgeStatusType = "COMPLETE"

	// Failed - versioned delete replication failed.
	Failed VersionPurgeStatusType = "FAILED"
)

func (*VersionPurgeStatusType) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (VersionPurgeStatusType) Empty

func (v VersionPurgeStatusType) Empty() bool

Empty returns true if purge status was not set.

func (VersionPurgeStatusType) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (VersionPurgeStatusType) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (VersionPurgeStatusType) Msgsize

func (z VersionPurgeStatusType) Msgsize() (s int)

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

func (VersionPurgeStatusType) Pending

func (v VersionPurgeStatusType) Pending() bool

Pending returns true if the version is pending purge.

func (*VersionPurgeStatusType) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type VersionType

type VersionType uint8

VersionType defines the type of journal type of the current entry.

const (
	ObjectType VersionType = 1
	DeleteType VersionType = 2
	LegacyType VersionType = 3
)

List of different types of journal type

func (*VersionType) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (VersionType) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (VersionType) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (VersionType) Msgsize

func (z VersionType) Msgsize() (s int)

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

func (VersionType) String

func (i VersionType) String() string

func (*VersionType) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type VolInfo

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

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

VolInfo - represents volume stat information. The above means that any added/deleted fields are incompatible.

The above means that any added/deleted fields are incompatible.

func (*VolInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (VolInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (VolInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (VolInfo) Msgsize

func (z VolInfo) Msgsize() (s int)

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

func (*VolInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type VolsInfo

type VolsInfo []VolInfo

VolsInfo is a collection of volume(bucket) information

func (*VolsInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (VolsInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (VolsInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (VolsInfo) Msgsize

func (z VolsInfo) Msgsize() (s int)

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

func (*VolsInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type WalkDirOptions

type WalkDirOptions struct {
	// Bucket to scanner
	Bucket string

	// Directory inside the bucket.
	BaseDir string

	// Do a full recursive scan.
	Recursive bool

	// ReportNotFound will return errFileNotFound if all disks reports the BaseDir cannot be found.
	ReportNotFound bool

	// FilterPrefix will only return results with given prefix within folder.
	// Should never contain a slash.
	FilterPrefix string

	// ForwardTo will forward to the given object path.
	ForwardTo string

	// Limit the number of returned objects if > 0.
	Limit int
}

WalkDirOptions provides options for WalkDir operations.

type WarmBackend

type WarmBackend interface {
	Put(ctx context.Context, object string, r io.Reader, length int64) (remoteVersionID, error)
	Get(ctx context.Context, object string, rv remoteVersionID, opts WarmBackendGetOpts) (io.ReadCloser, error)
	Remove(ctx context.Context, object string, rv remoteVersionID) error
	InUse(ctx context.Context) (bool, error)
}

WarmBackend provides interface to be implemented by remote tier backends

type WarmBackendGetOpts

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

WarmBackendGetOpts is used to express byte ranges within an object. The zero value represents the entire byte range of an object.

type WebIdentityResult

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

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

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

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

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

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

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

type XferStats

type XferStats struct {
	Curr float64 `json:"currRate" msg:"cr"`
	Avg  float64 `json:"avgRate" msg:"av"`
	Peak float64 `json:"peakRate" msg:"p"`
	N    int64   `json:"n" msg:"n"`
	// contains filtered or unexported fields
}

XferStats has transfer stats for replication

func (*XferStats) Clone

func (rx *XferStats) Clone() *XferStats

Clone returns a copy of XferStats

func (*XferStats) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*XferStats) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*XferStats) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*XferStats) Msgsize

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

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

func (*XferStats) String

func (rx *XferStats) String() string

func (*XferStats) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

Source Files

Jump to

Keyboard shortcuts

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