cmd

package
v0.0.0-...-4f68ee0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: AGPL-3.0 Imports: 139 Imported by: 0

Documentation ΒΆ

Overview ΒΆ

Package cmd provides extended time.Duration implementation

Package cmd contains all the global variables and constants. ONLY TO BE ACCESSED VIA GET/SET FUNCTIONS.

Package cmd - session V8 - Version 8 stores session header and session data in two separate files. Session data contains fully prepared URL list.

Index ΒΆ

Constants ΒΆ

View Source
const (

	// AmzObjectLockMode sets object lock mode
	AmzObjectLockMode = "X-Amz-Object-Lock-Mode"
	// AmzObjectLockRetainUntilDate sets object lock retain until date
	AmzObjectLockRetainUntilDate = "X-Amz-Object-Lock-Retain-Until-Date"
	// AmzObjectLockLegalHold sets object lock legal hold
	AmzObjectLockLegalHold = "X-Amz-Object-Lock-Legal-Hold"
)
View Source
const HelpTmpl = `` /* 464-byte string literal not displayed */

HelpTmpl template used by all sub-systems

View Source
const History = `{{range .}}{{colorYellowBold "RestoreId:"}} {{colorYellowBold .RestoreID}}
Date: {{.CreateTime}}

{{.Targets}}

{{end}}`

History template used by all sub-systems

View Source
const Ping = `` /* 986-byte string literal not displayed */

Ping is the template for ping result

View Source
const PingDist = `` /* 987-byte string literal not displayed */

PingDist is the template for ping result in distributed mode

Variables ΒΆ

View Source
var (
	// 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 = CommitID[:12]
	// CopyrightYear - dynamic value of the copyright end year
	CopyrightYear = "0000"
)
View Source
var (
	// EventTypePut contains the notify events that will cause a put (write)
	EventTypePut = []notify.Event{notify.InCloseWrite | notify.InMovedTo}
	// EventTypeDelete contains the notify events that will cause a delete (remove)
	EventTypeDelete = []notify.Event{notify.InDelete | notify.InDeleteSelf | notify.InMovedFrom}
	// EventTypeGet contains the notify events that will cause a get (read)
	EventTypeGet = []notify.Event{notify.InAccess | notify.InOpen}
)
View Source
var (
	Nanosecond  = Duration(time.Nanosecond)
	Microsecond = Duration(time.Microsecond)
	Millisecond = Duration(time.Millisecond)
	Second      = Duration(time.Second)
	Minute      = Duration(time.Minute)
	Hour        = Duration(time.Hour)
	Day         = Hour * 24
	Week        = Day * 7
	Fortnight   = Week * 2
	Month       = Day * 30    // Approximation
	Year        = Day * 365   // Approximation
	Decade      = Year * 10   // Approximation
	Century     = Year * 100  // Approximation
	Millennium  = Year * 1000 // Approximation
)

Standard unit of time.

View Source
var ErrInvalidFileSystemAttribute = errors.New("Error in parsing file system attribute")

ErrInvalidFileSystemAttribute reflects invalid fily system attribute

View Source
var ErrInvalidMetadata = errors.New("specified metadata should be of form key1=value1;key2=value2;... and so on")

ErrInvalidMetadata reflects invalid metadata format

View Source
var HelpEnvTemplate = template.Must(template.New("config-help-env").Funcs(funcMap).Parse(HelpTmpl))

HelpEnvTemplate - captures config help template

View Source
var HelpTemplate = template.Must(template.New("config-help").Funcs(funcMap).Parse(HelpTmpl))

HelpTemplate - captures config help template

View Source
var HistoryTemplate = template.Must(template.New("history-list").Funcs(funcMap).Parse(History))

HistoryTemplate - captures history list template

View Source
var PingTemplate = template.Must(template.New("ping-list").Funcs(colorMap).Parse(Ping))

PingTemplate - captures ping template

View Source
var PingTemplateDist = template.Must(template.New("ping-list").Funcs(colorMap).Parse(PingDist))

PingTemplateDist - captures ping template

View Source
var S3New = newFactory()

S3New returns an initialized S3Client structure. If debug is enabled, it also enables an internal trace transport.

Functions ΒΆ

func DownloadReleaseData ΒΆ

func DownloadReleaseData(customReleaseURL string, timeout time.Duration) (data string, err *probe.Error)

DownloadReleaseData - downloads release data from mc official server.

func GetCurrentReleaseTime ΒΆ

func GetCurrentReleaseTime() (releaseTime time.Time, err *probe.Error)

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

func IsDCOS ΒΆ

func IsDCOS() bool

IsDCOS returns true if mc is running in DCOS.

func IsDeleteEvent ΒΆ

func IsDeleteEvent(event notify.Event) bool

IsDeleteEvent checks if the event returned is a delete event

func IsDocker ΒΆ

func IsDocker() bool

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

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

"/.dockerenv":      "file",

func IsGetEvent ΒΆ

func IsGetEvent(event notify.Event) bool

IsGetEvent checks if the event return is a get event.

func IsKubernetes ΒΆ

func IsKubernetes() bool

IsKubernetes returns true if MinIO is running in kubernetes.

func IsPutEvent ΒΆ

func IsPutEvent(event notify.Event) bool

IsPutEvent checks if the event returned is a put event

func IsSourceBuild ΒΆ

func IsSourceBuild() bool

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

func Main ΒΆ

func Main(args []string) error

Main starts mc application

func NewAdminFactory ΒΆ

func NewAdminFactory() func(config *Config) (*madmin.AdminClient, *probe.Error)

NewAdminFactory encloses New function with client cache.

func PipeChan ΒΆ

func PipeChan(capacity int) (inputCh chan notify.EventInfo, outputCh chan notify.EventInfo)

PipeChan builds a new dynamically sized channel

func UTCNow ΒΆ

func UTCNow() time.Time

UTCNow - returns current UTC time.

Types ΒΆ

type APINotImplemented ΒΆ

type APINotImplemented struct {
	API     string
	APIType string
}

APINotImplemented - api not implemented

func (APINotImplemented) Error ΒΆ

func (e APINotImplemented) Error() string
type BrokenSymlink GenericFileError

BrokenSymlink (ENOTENT) - file has broken symlink.

func (BrokenSymlink) Error ΒΆ

func (e BrokenSymlink) Error() string

type BucketDoesNotExist ΒΆ

type BucketDoesNotExist GenericBucketError

BucketDoesNotExist - bucket does not exist.

func (BucketDoesNotExist) Error ΒΆ

func (e BucketDoesNotExist) Error() string

type BucketExists ΒΆ

type BucketExists GenericBucketError

BucketExists - bucket exists.

func (BucketExists) Error ΒΆ

func (e BucketExists) Error() string

type BucketInfo ΒΆ

type BucketInfo struct {
	URL        ClientURL   `json:"-"`
	Key        string      `json:"name"`
	Date       time.Time   `json:"lastModified"`
	Size       int64       `json:"size"`
	Type       os.FileMode `json:"-"`
	Prefix     bool        `json:"-"`
	Versioning struct {
		Status    string `json:"status"`
		MFADelete string `json:"MFADelete"`
	} `json:"Versioning,omitempty"`
	Encryption struct {
		Algorithm string `json:"algorithm,omitempty"`
		KeyID     string `json:"keyId,omitempty"`
	} `json:"Encryption,omitempty"`
	Locking struct {
		Enabled  string              `json:"enabled"`
		Mode     minio.RetentionMode `json:"mode"`
		Validity string              `json:"validity"`
	} `json:"ObjectLock,omitempty"`
	Replication struct {
		Enabled bool               `json:"enabled"`
		Config  replication.Config `json:"config,omitempty"`
	} `json:"Replication"`
	Policy struct {
		Type string `json:"type"`
		Text string `json:"policy,omitempty"`
	} `json:"Policy,omitempty"`
	Location string            `json:"location"`
	Tagging  map[string]string `json:"tagging,omitempty"`
	ILM      struct {
		Config *lifecycle.Configuration `json:"config,omitempty"`
	} `json:"ilm,omitempty"`
	Notification struct {
		Config notification.Configuration `json:"config,omitempty"`
	} `json:"notification,omitempty"`
}

BucketInfo holds info about a bucket

func (BucketInfo) Tags ΒΆ

func (i BucketInfo) Tags() string

Tags returns stringified tag list.

type BucketInvalid ΒΆ

type BucketInvalid struct {
	Bucket string
}

BucketInvalid - bucket name invalid.

func (BucketInvalid) Error ΒΆ

func (e BucketInvalid) Error() string

type BucketNameEmpty ΒΆ

type BucketNameEmpty struct{}

BucketNameEmpty - bucket name empty (http://goo.gl/wJlzDz)

func (BucketNameEmpty) Error ΒΆ

func (e BucketNameEmpty) Error() string

type Client ΒΆ

type Client interface {
	// Common operations
	Stat(ctx context.Context, opts StatOptions) (content *ClientContent, err *probe.Error)
	List(ctx context.Context, opts ListOptions) <-chan *ClientContent

	// Bucket operations
	MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error
	RemoveBucket(ctx context.Context, forceRemove bool) *probe.Error
	ListBuckets(ctx context.Context) ([]*ClientContent, *probe.Error)

	// Object lock config
	SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit) *probe.Error
	GetObjectLockConfig(ctx context.Context) (status string, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit, perr *probe.Error)

	// Access policy operations.
	GetAccess(ctx context.Context) (access string, policyJSON string, error *probe.Error)
	GetAccessRules(ctx context.Context) (policyRules map[string]string, error *probe.Error)
	SetAccess(ctx context.Context, access string, isJSON bool) *probe.Error

	// I/O operations
	Copy(ctx context.Context, source string, opts CopyOptions, progress io.Reader) *probe.Error

	// Runs select expression on object storage on specific files.
	Select(ctx context.Context, expression string, sse encrypt.ServerSide, opts SelectObjectOpts) (io.ReadCloser, *probe.Error)

	// I/O operations with metadata.
	Get(ctx context.Context, opts GetOptions) (reader io.ReadCloser, err *probe.Error)
	Put(ctx context.Context, reader io.Reader, size int64, progress io.Reader, opts PutOptions) (n int64, err *probe.Error)

	// Object Locking related API
	PutObjectRetention(ctx context.Context, versionID string, mode minio.RetentionMode, retainUntilDate time.Time, bypassGovernance bool) *probe.Error
	GetObjectRetention(ctx context.Context, versionID string) (minio.RetentionMode, time.Time, *probe.Error)
	PutObjectLegalHold(ctx context.Context, versionID string, hold minio.LegalHoldStatus) *probe.Error
	GetObjectLegalHold(ctx context.Context, versionID string) (minio.LegalHoldStatus, *probe.Error)

	// I/O operations with expiration
	ShareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error)
	ShareUpload(context.Context, bool, time.Duration, string) (string, map[string]string, *probe.Error)

	// Watch events
	Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error)

	// Delete operations
	Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass, isForceDel bool, contentCh <-chan *ClientContent) (errorCh <-chan RemoveResult)
	// GetURL returns back internal url
	GetURL() ClientURL
	AddUserAgent(app, version string)

	// Tagging operations
	GetTags(ctx context.Context, versionID string) (map[string]string, *probe.Error)
	SetTags(ctx context.Context, versionID, tags string) *probe.Error
	DeleteTags(ctx context.Context, versionID string) *probe.Error

	// Lifecycle operations
	GetLifecycle(ctx context.Context) (*lifecycle.Configuration, *probe.Error)
	SetLifecycle(ctx context.Context, config *lifecycle.Configuration) *probe.Error

	// Versioning operations
	GetVersion(ctx context.Context) (minio.BucketVersioningConfiguration, *probe.Error)
	SetVersion(ctx context.Context, status string, prefixes []string, excludeFolders bool) *probe.Error
	// Replication operations
	GetReplication(ctx context.Context) (replication.Config, *probe.Error)
	SetReplication(ctx context.Context, cfg *replication.Config, opts replication.Options) *probe.Error
	RemoveReplication(ctx context.Context) *probe.Error
	GetReplicationMetrics(ctx context.Context) (replication.Metrics, *probe.Error)
	ResetReplication(ctx context.Context, before time.Duration, arn string) (replication.ResyncTargetsInfo, *probe.Error)
	ReplicationResyncStatus(ctx context.Context, arn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)

	// Encryption operations
	GetEncryption(ctx context.Context) (string, string, *probe.Error)
	SetEncryption(ctx context.Context, algorithm, kmsKeyID string) *probe.Error
	DeleteEncryption(ctx context.Context) *probe.Error
	// Bucket info operation
	GetBucketInfo(ctx context.Context) (BucketInfo, *probe.Error)

	// Restore an object
	Restore(ctx context.Context, versionID string, days int) *probe.Error

	// OD operations
	GetPart(ctx context.Context, part int) (io.ReadCloser, *probe.Error)
	PutPart(ctx context.Context, reader io.Reader, size int64, progress io.Reader, opts PutOptions) (n int64, err *probe.Error)
}

Client - client interface

type ClientContent ΒΆ

type ClientContent struct {
	URL          ClientURL
	BucketName   string // only valid and set for client-type objectStorage
	Time         time.Time
	Size         int64
	Type         os.FileMode
	StorageClass string
	Metadata     map[string]string
	Tags         map[string]string
	UserMetadata map[string]string
	ETag         string
	Expires      time.Time

	Expiration       time.Time
	ExpirationRuleID string

	RetentionEnabled  bool
	RetentionMode     string
	RetentionDuration string
	BypassGovernance  bool
	LegalHoldEnabled  bool
	LegalHold         string
	VersionID         string
	IsDeleteMarker    bool
	IsLatest          bool
	ReplicationStatus string

	Restore *minio.RestoreInfo

	Err *probe.Error
}

ClientContent - Content container for content metadata

type ClientURL ΒΆ

type ClientURL struct {
	Type            ClientURLType
	Scheme          string
	Host            string
	Path            string
	SchemeSeparator string
	Separator       rune
}

ClientURL url client url structure

func (ClientURL) Clone ΒΆ

func (u ClientURL) Clone() ClientURL

Clone the url into a new object.

func (ClientURL) String ΒΆ

func (u ClientURL) String() string

String convert URL into its canonical form.

type ClientURLType ΒΆ

type ClientURLType int

ClientURLType - enum of different url types

type ClusterHealthV1 ΒΆ

type ClusterHealthV1 struct {
	TimeStamp time.Time   `json:"timestamp,omitempty"`
	Status    string      `json:"status"`
	Error     string      `json:"error,omitempty"`
	Hardware  HwServersV1 `json:"hardware,omitempty"`
	Software  SwInfoV1    `json:"software,omitempty"`
}

ClusterHealthV1 - main struct of the health report

func MapHealthInfoToV1 ΒΆ

func MapHealthInfoToV1(healthInfo madmin.HealthInfoV0, err error) ClusterHealthV1

MapHealthInfoToV1 - maps the health info returned by minio server to V1 format

func (ClusterHealthV1) GetError ΒΆ

func (ch ClusterHealthV1) GetError() string

GetError - return error from the health info

func (ClusterHealthV1) GetStatus ΒΆ

func (ch ClusterHealthV1) GetStatus() string

GetStatus - return status of the health info

func (ClusterHealthV1) GetTimestamp ΒΆ

func (ch ClusterHealthV1) GetTimestamp() time.Time

GetTimestamp - return timestamp from the health info

func (ClusterHealthV1) JSON ΒΆ

func (ch ClusterHealthV1) JSON() string

JSON jsonifies service status message.

func (ClusterHealthV1) String ΒΆ

func (ch ClusterHealthV1) String() string

type ClusterInfo ΒΆ

type ClusterInfo struct {
	MinioVersion    string `json:"minio_version"`
	NoOfServerPools int    `json:"no_of_server_pools"`
	NoOfServers     int    `json:"no_of_servers"`
	NoOfDrives      int    `json:"no_of_drives"`
	NoOfBuckets     uint64 `json:"no_of_buckets"`
	NoOfObjects     uint64 `json:"no_of_objects"`
	TotalDriveSpace uint64 `json:"total_drive_space"`
	UsedDriveSpace  uint64 `json:"used_drive_space"`
}

ClusterInfo - The "info" sub-node of the cluster registration information struct Intended to be extensible i.e. more fields will be added as and when required

type ClusterRegistrationInfo ΒΆ

type ClusterRegistrationInfo struct {
	DeploymentID string      `json:"deployment_id"`
	ClusterName  string      `json:"cluster_name"`
	UsedCapacity uint64      `json:"used_capacity"`
	Info         ClusterInfo `json:"info"`
}

ClusterRegistrationInfo - Information stored in the cluster registration token

type ClusterRegistrationReq ΒΆ

type ClusterRegistrationReq struct {
	Token string `json:"token"`
}

ClusterRegistrationReq - JSON payload of the subnet api for cluster registration Contains a registration token created by base64 encoding of the registration info

type Config ΒΆ

type Config struct {
	AccessKey         string
	SecretKey         string
	SessionToken      string
	Signature         string
	HostURL           string
	AppName           string
	AppVersion        string
	Debug             bool
	Insecure          bool
	Lookup            minio.BucketLookupType
	ConnReadDeadline  time.Duration
	ConnWriteDeadline time.Duration
	UploadLimit       int64
	DownloadLimit     int64
	Transport         *http.Transport
}

Config - see http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html

func BuildS3Config ΒΆ

func BuildS3Config(ctx context.Context, url, accessKey, secretKey, api, path string, peerCert *x509.Certificate) (*Config, *probe.Error)

BuildS3Config constructs an S3 Config and does signature auto-probe when needed.

func NewS3Config ΒΆ

func NewS3Config(urlStr string, aliasCfg *aliasConfigV10) *Config

NewS3Config simply creates a new Config struct using the passed parameters.

type ConfigAnyVersion ΒΆ

type ConfigAnyVersion struct {
	Version string
}

ConfigAnyVersion is a generic structure to parse any config.json version file and only extracts its version number

type CopyOptions ΒΆ

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

CopyOptions holds options for copying operation

type DirOpt ΒΆ

type DirOpt int8

DirOpt - list directory option.

const (
	// DirNone - do not include directories in the list.
	DirNone DirOpt = iota
	// DirFirst - include directories before objects in the list.
	DirFirst
	// DirLast - include directories after objects in the list.
	DirLast
)

type DriveTestResult ΒΆ

type DriveTestResult struct {
	Endpoint string             `json:"endpoint"`
	Perf     []madmin.DrivePerf `json:"perf,omitempty"`
	Error    string             `json:"error,omitempty"`
}

DriveTestResult - result of the drive performance test on a given endpoint

type DriveTestResults ΒΆ

type DriveTestResults struct {
	Results []DriveTestResult `json:"servers"`
}

DriveTestResults - results of drive performance test across all endpoints

type Duration ΒΆ

type Duration time.Duration

Duration is a standard unit of time.

func ParseDuration ΒΆ

func ParseDuration(s string) (Duration, error)

ParseDuration parses a duration string. This implementation is similar to Go's https://cs.opensource.google/go/go/+/refs/tags/go1.18.3:src/time/format.go;l=1546;bpv=1;bpt=1 extends it to parse days, weeks and years..

Valid time units are "ns", "us" (or "Β΅s"), "ms", "s", "m", "h", "d", "w", "y".

func (Duration) Days ΒΆ

func (d Duration) Days() float64

Days returns the duration as a floating point number of days.

type EmptyPath ΒΆ

type EmptyPath struct{}

EmptyPath (EINVAL) - invalid argument.

func (EmptyPath) Error ΒΆ

func (e EmptyPath) Error() string

type EndPointStats ΒΆ

type EndPointStats struct {
	Endpoint  *url.URL `json:"endpoint"`
	Min       string   `json:"min"`
	Max       string   `json:"max"`
	Average   string   `json:"average"`
	DNS       string   `json:"dns"`
	CountErr  string   `json:"error-count,omitempty"`
	Error     string   `json:"error,omitempty"`
	Roundtrip string   `json:"roundtrip"`
}

EndPointStats - container to hold server ping stats

type EventInfo ΒΆ

type EventInfo struct {
	Time         string
	Size         int64
	UserMetadata map[string]string
	Path         string
	Host         string
	Port         string
	UserAgent    string
	Type         notification.EventType
}

EventInfo contains the information of the event that occurred and the source IP:PORT of the client which triggerred the event.

type Field ΒΆ

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

Field configuration: color theme and max content length

type GenericBucketError ΒΆ

type GenericBucketError struct {
	Bucket string
}

GenericBucketError - generic bucket operations error

type GenericFileError ΒΆ

type GenericFileError struct {
	Path string
}

GenericFileError - generic file error.

type GetOptions ΒΆ

type GetOptions struct {
	SSE        encrypt.ServerSide
	VersionID  string
	Zip        bool
	RangeStart int64
}

GetOptions holds options of the GET operation

type Health ΒΆ

type Health struct {
	Health SchemaVersion `json:"health"`
}

Health - intermediate struct for subnet health header Just used to achieve the JSON structure we want

type HealthDataTypeFlag ΒΆ

type HealthDataTypeFlag struct {
	Name   string
	Usage  string
	EnvVar string
	Hidden bool
	Value  *HealthDataTypeSlice
}

HealthDataTypeFlag is a typed flag to represent health datatypes

func (HealthDataTypeFlag) Apply οΏ½οΏ½

func (f HealthDataTypeFlag) Apply(set *flag.FlagSet)

Apply - applies the flag

func (HealthDataTypeFlag) ApplyWithError ΒΆ

func (f HealthDataTypeFlag) ApplyWithError(set *flag.FlagSet) error

ApplyWithError - applies with error

func (HealthDataTypeFlag) GetName ΒΆ

func (f HealthDataTypeFlag) GetName() string

GetName - returns the name of the flag

func (HealthDataTypeFlag) String ΒΆ

func (f HealthDataTypeFlag) String() string

String - returns the string to be shown in the help message

type HealthDataTypeSlice ΒΆ

type HealthDataTypeSlice []madmin.HealthDataType

HealthDataTypeSlice is a typed list of health tests

func GetGlobalHealthDataTypeSlice ΒΆ

func GetGlobalHealthDataTypeSlice(c *cli.Context, name string) *HealthDataTypeSlice

GetGlobalHealthDataTypeSlice - returns the list of set health tests set globally

func GetHealthDataTypeSlice ΒΆ

func GetHealthDataTypeSlice(c *cli.Context, name string) *HealthDataTypeSlice

GetHealthDataTypeSlice - returns the list of set health tests

func (*HealthDataTypeSlice) Get ΒΆ

func (d *HealthDataTypeSlice) Get() interface{}

Get - returns the value

func (*HealthDataTypeSlice) Set ΒΆ

func (d *HealthDataTypeSlice) Set(value string) error

Set - sets the flag to the given value

func (*HealthDataTypeSlice) String ΒΆ

func (d *HealthDataTypeSlice) String() string

String - returns the string representation of the health datatypes

func (*HealthDataTypeSlice) Value ΒΆ

Value - returns the value

type HealthReportHeader ΒΆ

type HealthReportHeader struct {
	Subnet Health `json:"subnet"`
}

HealthReportHeader - Header of the subnet health report expected to generate JSON output of the form {"subnet":{"health":{"version":"v1"}}}

type HealthReportInfo ΒΆ

type HealthReportInfo interface {
	GetTimestamp() time.Time
	GetStatus() string
	GetError() string
	// contains filtered or unexported methods
}

HealthReportInfo - interface to be implemented by health report schema struct

type HwCPUV1 ΒΆ

type HwCPUV1 struct {
	CPUStat   []cpu.InfoStat  `json:"cpu,omitempty"`
	TimesStat []cpu.TimesStat `json:"time,omitempty"`
	Error     string          `json:"error,omitempty"`
}

HwCPUV1 - CPU Info

type HwDrivePerfV1 ΒΆ

type HwDrivePerfV1 struct {
	Serial   []madmin.DrivePerfInfoV0 `json:"serial,omitempty"`
	Parallel []madmin.DrivePerfInfoV0 `json:"parallel,omitempty"`
	Error    string                   `json:"error,omitempty"`
}

HwDrivePerfV1 - Network performance info

type HwDriveV1 ΒΆ

type HwDriveV1 struct {
	Counters   map[string]disk.IOCountersStat `json:"counters,omitempty"`
	Partitions []madmin.PartitionStat         `json:"partitions,omitempty"`
	Usage      []*disk.UsageStat              `json:"usage,omitempty"`
	Error      string                         `json:"error,omitempty"`
}

HwDriveV1 - Drive info

type HwMemV1 ΒΆ

type HwMemV1 struct {
	SwapMem    *mem.SwapMemoryStat    `json:"swap,omitempty"`
	VirtualMem *mem.VirtualMemoryStat `json:"virtualmem,omitempty"`
	Error      string                 `json:"error,omitempty"`
}

HwMemV1 - Includes host virtual and swap mem information

type HwNetPerfV1 ΒΆ

type HwNetPerfV1 struct {
	Serial   []madmin.NetPerfInfoV0 `json:"serial,omitempty"`
	Parallel []madmin.NetPerfInfoV0 `json:"parallel,omitempty"`
}

HwNetPerfV1 - Network performance info

type HwPerfV1 ΒΆ

type HwPerfV1 struct {
	Net   HwNetPerfV1   `json:"net,omitempty"`
	Drive HwDrivePerfV1 `json:"drives,omitempty"`
}

HwPerfV1 - hardware performance

type HwServerV1 ΒΆ

type HwServerV1 struct {
	Addr    string      `json:"addr"`
	CPUs    []HwCPUV1   `json:"cpus,omitempty"`
	Drives  []HwDriveV1 `json:"drives,omitempty"`
	MemInfo HwMemV1     `json:"meminfo,omitempty"`
	Perf    HwPerfV1    `json:"perf,omitempty"`
}

HwServerV1 - server health Info

type HwServersV1 ΒΆ

type HwServersV1 struct {
	Servers []HwServerV1 `json:"servers,omitempty"`
}

HwServersV1 - hardware health Info

type InvalidArgument ΒΆ

type InvalidArgument struct{}

InvalidArgument - passed argument is invalid for this operation

func (InvalidArgument) Error ΒΆ

func (e InvalidArgument) Error() string

type ListOptions ΒΆ

type ListOptions struct {
	Recursive         bool
	Incomplete        bool
	WithMetadata      bool
	WithOlderVersions bool
	WithDeleteMarkers bool
	ListZip           bool
	TimeRef           time.Time
	ShowDir           DirOpt
	Count             int
}

ListOptions holds options for listing operation

type MinioHealthInfoV1 ΒΆ

type MinioHealthInfoV1 struct {
	Info     madmin.InfoMessage      `json:"info,omitempty"`
	Config   interface{}             `json:"config,omitempty"`
	ProcInfo []madmin.ServerProcInfo `json:"procinfos,omitempty"`
	Error    string                  `json:"error,omitempty"`
}

MinioHealthInfoV1 - Health info of the MinIO cluster

type NetStats ΒΆ

type NetStats struct {
	TX uint64 `json:"tx"`
	RX uint64 `json:"rx"`
}

NetStats - Network performance stats

type NetTestResult ΒΆ

type NetTestResult struct {
	Endpoint string   `json:"endpoint"`
	Perf     NetStats `json:"perf"`
	Error    string   `json:"error,omitempty"`
}

NetTestResult - result of the network performance test for given endpoint

type NetTestResults ΒΆ

type NetTestResults struct {
	Results []NetTestResult `json:"servers"`
}

NetTestResults - result of the network performance test across all endpoints

type NotificationConfig ΒΆ

type NotificationConfig struct {
	ID     string   `json:"id"`
	Arn    string   `json:"arn"`
	Events []string `json:"events"`
	Prefix string   `json:"prefix"`
	Suffix string   `json:"suffix"`
}

NotificationConfig notification config

type ObjGETPerfResults ΒΆ

type ObjGETPerfResults struct {
	Perf    ObjGETStats     `json:"perf"`
	Servers []ObjStatServer `json:"servers"`
}

ObjGETPerfResults - Object GET performance results

type ObjGETStats ΒΆ

type ObjGETStats struct {
	ObjPUTStats
	TTFB madmin.Timings `json:"ttfb,omitempty"`
}

ObjGETStats - GET stats of all the servers

type ObjPUTPerfResults ΒΆ

type ObjPUTPerfResults struct {
	Perf    ObjPUTStats     `json:"perf"`
	Servers []ObjStatServer `json:"servers"`
}

ObjPUTPerfResults - Object PUT performance results

type ObjPUTStats ΒΆ

type ObjPUTStats struct {
	Throughput    uint64         `json:"throughput"`
	ObjectsPerSec uint64         `json:"objectsPerSec"`
	Response      madmin.Timings `json:"responseTime"`
}

ObjPUTStats - PUT stats of all the servers

type ObjStatServer ΒΆ

type ObjStatServer struct {
	Endpoint string   `json:"endpoint"`
	Perf     ObjStats `json:"perf"`
	Error    string   `json:"error,omitempty"`
}

ObjStatServer - Server level object performance stats

type ObjStats ΒΆ

type ObjStats struct {
	Throughput    uint64 `json:"throughput"`
	ObjectsPerSec uint64 `json:"objectsPerSec"`
}

ObjStats - Object performance stats

type ObjTestResults ΒΆ

type ObjTestResults struct {
	ObjectSize int               `json:"objectSize"`
	Threads    int               `json:"threads"`
	PUTResults ObjPUTPerfResults `json:"PUT"`
	GETResults ObjGETPerfResults `json:"GET"`
}

ObjTestResults - result of the object performance test

type ObjectAlreadyExists ΒΆ

type ObjectAlreadyExists struct {
	Object string
}

ObjectAlreadyExists - typed return for MethodNotAllowed

func (ObjectAlreadyExists) Error ΒΆ

func (e ObjectAlreadyExists) Error() string

type ObjectAlreadyExistsAsDirectory ΒΆ

type ObjectAlreadyExistsAsDirectory struct {
	Object string
}

ObjectAlreadyExistsAsDirectory - typed return for XMinioObjectExistsAsDirectory

func (ObjectAlreadyExistsAsDirectory) Error ΒΆ

type ObjectIsDeleteMarker ΒΆ

type ObjectIsDeleteMarker struct{}

ObjectIsDeleteMarker - object is a delete marker as latest

func (ObjectIsDeleteMarker) Error ΒΆ

func (e ObjectIsDeleteMarker) Error() string

type ObjectMissing ΒΆ

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

ObjectMissing (EINVAL) - object key missing.

func (ObjectMissing) Error ΒΆ

func (e ObjectMissing) Error() string

type ObjectNameEmpty ΒΆ

type ObjectNameEmpty struct{}

ObjectNameEmpty - object name empty.

func (ObjectNameEmpty) Error ΒΆ

func (e ObjectNameEmpty) Error() string

type ObjectOnGlacier ΒΆ

type ObjectOnGlacier struct {
	Object string
}

ObjectOnGlacier - object is of storage class glacier.

func (ObjectOnGlacier) Error ΒΆ

func (e ObjectOnGlacier) Error() string

type ParallelManager ΒΆ

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

ParallelManager - helps manage parallel workers to run tasks

func (*ParallelManager) Read ΒΆ

func (p *ParallelManager) Read(b []byte) (n int, err error)

type PathInsufficientPermission ΒΆ

type PathInsufficientPermission GenericFileError

PathInsufficientPermission (EPERM) - permission denied.

func (PathInsufficientPermission) Error ΒΆ

type PathIsNotRegular ΒΆ

type PathIsNotRegular GenericFileError

PathIsNotRegular (ENOTREG) - file is not a regular file.

func (PathIsNotRegular) Error ΒΆ

func (e PathIsNotRegular) Error() string

type PathNotADirectory ΒΆ

type PathNotADirectory GenericFileError

PathNotADirectory - this path does not correspond to a directory

func (PathNotADirectory) Error ΒΆ

func (e PathNotADirectory) Error() string

type PathNotFound ΒΆ

type PathNotFound GenericFileError

PathNotFound (ENOENT) - file not found.

func (PathNotFound) Error ΒΆ

func (e PathNotFound) Error() string

type PerfTestOutput ΒΆ

type PerfTestOutput struct {
	ObjectResults *ObjTestResults   `json:"object,omitempty"`
	NetResults    *NetTestResults   `json:"network,omitempty"`
	DriveResults  *DriveTestResults `json:"drive,omitempty"`
	Error         string            `json:"error,omitempty"`
}

PerfTestOutput - stores the final output of performance test(s)

func (PerfTestOutput) JSON ΒΆ

func (p PerfTestOutput) JSON() string

JSON - jsonified output of the perf tests

func (PerfTestOutput) String ΒΆ

func (p PerfTestOutput) String() string

String - dummy function to confirm to the 'message' interface. Not used.

type PerfTestResult ΒΆ

type PerfTestResult struct {
	Type         PerfTestType                  `json:"type"`
	ObjectResult *madmin.SpeedTestResult       `json:"object,omitempty"`
	NetResult    *madmin.NetperfResult         `json:"network,omitempty"`
	DriveResult  []madmin.DriveSpeedTestResult `json:"drive,omitempty"`
	Err          string                        `json:"err,omitempty"`
	Final        bool                          `json:"final,omitempty"`
}

PerfTestResult - stores the result of a performance test

type PerfTestType ΒΆ

type PerfTestType byte

PerfTestType - The type of performance test (net/drive/object)

const (
	NetPerfTest PerfTestType = 1 << iota
	DrivePerfTest
	ObjectPerfTest
)

Constants for performance test type

func (PerfTestType) Name ΒΆ

func (p PerfTestType) Name() string

Name - returns name of the performance test

type PingResult ΒΆ

type PingResult struct {
	Status         string          `json:"status"`
	Counter        string          `json:"counter"`
	EndPointsStats []EndPointStats `json:"servers"`
}

PingResult contains ping output

func (PingResult) JSON ΒΆ

func (pr PingResult) JSON() string

JSON jsonified ping result message.

func (PingResult) String ΒΆ

func (pr PingResult) String() string

String colorized service status message.

type PrettyRecord ΒΆ

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

PrettyRecord - an easy struct to format a set of key-value pairs into a record

type PrettyTable ΒΆ

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

PrettyTable - an easy struct to format a set of line

type Progress ΒΆ

type Progress interface {
	Get() int64
	SetTotal(int64)
}

Progress - an interface which describes current amount of data written.

type ProgressReader ΒΆ

type ProgressReader interface {
	io.Reader
	Progress
}

ProgressReader can be used to update the progress of an on-going transfer progress.

type ProgressStatus ΒΆ

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

ProgressStatus shows a progressbar

func (*ProgressStatus) Add ΒΆ

func (ps *ProgressStatus) Add(v int64) Status

Add bytes to current number of bytes

func (*ProgressStatus) AddCounts ΒΆ

func (ps *ProgressStatus) AddCounts(v int64)

AddCounts adds 'v' number of files uploaded.

func (*ProgressStatus) Finish ΒΆ

func (ps *ProgressStatus) Finish()

Finish displays the accounting summary

func (*ProgressStatus) Get ΒΆ

func (ps *ProgressStatus) Get() int64

Get returns the current number of bytes

func (*ProgressStatus) GetCounts ΒΆ

func (ps *ProgressStatus) GetCounts() int64

GetCounts returns number of files uploaded

func (*ProgressStatus) PrintMsg ΒΆ

func (ps *ProgressStatus) PrintMsg(_ message)

PrintMsg prints message

func (*ProgressStatus) Println ΒΆ

func (ps *ProgressStatus) Println(data ...interface{})

Println prints line, ignored for quietstatus

func (*ProgressStatus) Read ΒΆ

func (ps *ProgressStatus) Read(p []byte) (n int, err error)

Read implements the io.Reader interface

func (ProgressStatus) Set64 ΒΆ

func (p ProgressStatus) Set64(length int64) *progressBar

func (*ProgressStatus) SetCaption ΒΆ

func (ps *ProgressStatus) SetCaption(s string)

SetCaption sets the caption of the progressbar

func (*ProgressStatus) SetCounts ΒΆ

func (ps *ProgressStatus) SetCounts(v int64)

SetCounts sets number of files uploaded

func (*ProgressStatus) SetTotal ΒΆ

func (ps *ProgressStatus) SetTotal(v int64) Status

SetTotal sets the total of the progressbar

func (*ProgressStatus) Start ΒΆ

func (ps *ProgressStatus) Start()

Start is ignored for quietstatus

func (*ProgressStatus) Total ΒΆ

func (ps *ProgressStatus) Total() int64

Total returns the total number of bytes

func (*ProgressStatus) Update ΒΆ

func (ps *ProgressStatus) Update()

Update is ignored for quietstatus

type PrometheusConfig ΒΆ

type PrometheusConfig struct {
	ScrapeConfigs []ScrapeConfig `yaml:"scrape_configs,omitempty"`
}

PrometheusConfig - container to hold the top level scrape config.

func (PrometheusConfig) JSON ΒΆ

func (c PrometheusConfig) JSON() string

JSON jsonified prometheus config.

func (PrometheusConfig) String ΒΆ

func (c PrometheusConfig) String() string

String colorized prometheus config yaml.

type PutOptions ΒΆ

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

PutOptions holds options for PUT operation

type QuietStatus ΒΆ

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

QuietStatus will only show the progress and summary

func (*QuietStatus) Add ΒΆ

func (qs *QuietStatus) Add(v int64) Status

Add bytes to current number of bytes

func (*QuietStatus) AddCounts ΒΆ

func (qs *QuietStatus) AddCounts(v int64)

AddCounts adds 'v' number of files uploaded.

func (*QuietStatus) Finish ΒΆ

func (qs *QuietStatus) Finish()

Finish displays the accounting summary

func (*QuietStatus) Get ΒΆ

func (qs *QuietStatus) Get() int64

Get returns the current number of bytes

func (*QuietStatus) GetCounts ΒΆ

func (qs *QuietStatus) GetCounts() int64

GetCounts returns number of files uploaded

func (*QuietStatus) PrintMsg ΒΆ

func (qs *QuietStatus) PrintMsg(msg message)

PrintMsg prints message

func (*QuietStatus) Println ΒΆ

func (qs *QuietStatus) Println(_ ...interface{})

Println prints line, ignored for quietstatus

func (*QuietStatus) Read ΒΆ

func (qs *QuietStatus) Read(p []byte) (n int, err error)

Read implements the io.Reader interface

func (QuietStatus) Set ΒΆ

func (a QuietStatus) Set(n int64) *accounter

Set sets the current value atomically.

func (*QuietStatus) SetCaption ΒΆ

func (qs *QuietStatus) SetCaption(_ string)

SetCaption sets the caption of the progressbar, ignored for quietstatus

func (*QuietStatus) SetCounts ΒΆ

func (qs *QuietStatus) SetCounts(v int64)

SetCounts sets number of files uploaded

func (*QuietStatus) SetTotal ΒΆ

func (qs *QuietStatus) SetTotal(v int64) Status

SetTotal sets the total of the progressbar, ignored for quietstatus

func (*QuietStatus) Start ΒΆ

func (qs *QuietStatus) Start()

Start is ignored for quietstatus

func (QuietStatus) Stat ΒΆ

func (a QuietStatus) Stat() accountStat

Stat provides current stats captured.

func (*QuietStatus) Total ΒΆ

func (qs *QuietStatus) Total() int64

Total returns the total number of bytes

func (*QuietStatus) Update ΒΆ

func (qs *QuietStatus) Update()

Update is ignored for quietstatus

type RemoveResult ΒΆ

type RemoveResult struct {
	minio.RemoveObjectResult
	BucketName string
	Err        *probe.Error
}

RemoveResult returns the error or result of the removed objects.

type Row ΒΆ

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

Row specifies row description and theme

type S3Client ΒΆ

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

S3Client construct

func (*S3Client) AddNotificationConfig ΒΆ

func (c *S3Client) AddNotificationConfig(ctx context.Context, arn string, events []string, prefix, suffix string, ignoreExisting bool) *probe.Error

AddNotificationConfig - Add bucket notification

func (*S3Client) AddUserAgent ΒΆ

func (c *S3Client) AddUserAgent(app string, version string)

AddUserAgent - add custom user agent.

func (*S3Client) Copy ΒΆ

func (c *S3Client) Copy(ctx context.Context, source string, opts CopyOptions, progress io.Reader) *probe.Error

Copy - copy object, uses server side copy API. Also uses an abstracted API such that large file sizes will be copied in multipart manner on server side.

func (*S3Client) DeleteEncryption ΒΆ

func (c *S3Client) DeleteEncryption(ctx context.Context) *probe.Error

DeleteEncryption - removes encryption configuration on a bucket

func (*S3Client) DeleteTags ΒΆ

func (c *S3Client) DeleteTags(ctx context.Context, versionID string) *probe.Error

DeleteTags - Delete tags of bucket or object

func (*S3Client) Get ΒΆ

func (c *S3Client) Get(ctx context.Context, opts GetOptions) (io.ReadCloser, *probe.Error)

Get - get object with GET options.

func (*S3Client) GetAccess ΒΆ

func (c *S3Client) GetAccess(ctx context.Context) (string, string, *probe.Error)

GetAccess get access policy permissions.

func (*S3Client) GetAccessRules ΒΆ

func (c *S3Client) GetAccessRules(ctx context.Context) (map[string]string, *probe.Error)

GetAccessRules - get configured policies from the server

func (*S3Client) GetBucketInfo ΒΆ

func (c *S3Client) GetBucketInfo(ctx context.Context) (BucketInfo, *probe.Error)

GetBucketInfo gets info about a bucket

func (*S3Client) GetEncryption ΒΆ

func (c *S3Client) GetEncryption(ctx context.Context) (algorithm, keyID string, err *probe.Error)

GetEncryption - gets bucket encryption info.

func (*S3Client) GetLifecycle ΒΆ

func (c *S3Client) GetLifecycle(ctx context.Context) (*lifecycle.Configuration, *probe.Error)

GetLifecycle - Get current lifecycle configuration.

func (*S3Client) GetObjectLegalHold ΒΆ

func (c *S3Client) GetObjectLegalHold(ctx context.Context, versionID string) (minio.LegalHoldStatus, *probe.Error)

GetObjectLegalHold - Get object legal hold for a given object.

func (*S3Client) GetObjectLockConfig ΒΆ

func (c *S3Client) GetObjectLockConfig(ctx context.Context) (string, minio.RetentionMode, uint64, minio.ValidityUnit, *probe.Error)

GetObjectLockConfig - Get object lock configuration of bucket.

func (*S3Client) GetObjectRetention ΒΆ

func (c *S3Client) GetObjectRetention(ctx context.Context, versionID string) (minio.RetentionMode, time.Time, *probe.Error)

GetObjectRetention - Get object retention for a given object.

func (*S3Client) GetPart ΒΆ

func (c *S3Client) GetPart(ctx context.Context, part int) (io.ReadCloser, *probe.Error)

GetPart gets an object in a given number of parts

func (*S3Client) GetReplication ΒΆ

func (c *S3Client) GetReplication(ctx context.Context) (replication.Config, *probe.Error)

GetReplication - gets replication configuration for a given bucket.

func (*S3Client) GetReplicationMetrics ΒΆ

func (c *S3Client) GetReplicationMetrics(ctx context.Context) (replication.Metrics, *probe.Error)

GetReplicationMetrics - Get replication metrics for a given bucket.

func (*S3Client) GetTags ΒΆ

func (c *S3Client) GetTags(ctx context.Context, versionID string) (map[string]string, *probe.Error)

GetTags - Get tags of bucket or object.

func (*S3Client) GetURL ΒΆ

func (c *S3Client) GetURL() ClientURL

GetURL get url.

func (*S3Client) GetVersion ΒΆ

func (c *S3Client) GetVersion(ctx context.Context) (config minio.BucketVersioningConfiguration, err *probe.Error)

GetVersion - gets bucket version info.

func (*S3Client) List ΒΆ

func (c *S3Client) List(ctx context.Context, opts ListOptions) <-chan *ClientContent

List - list at delimited path, if not recursive.

func (*S3Client) ListBuckets ΒΆ

func (c *S3Client) ListBuckets(ctx context.Context) ([]*ClientContent, *probe.Error)

ListBuckets - list buckets

func (*S3Client) ListNotificationConfigs ΒΆ

func (c *S3Client) ListNotificationConfigs(ctx context.Context, arn string) ([]NotificationConfig, *probe.Error)

ListNotificationConfigs - List notification configs

func (*S3Client) MakeBucket ΒΆ

func (c *S3Client) MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error

MakeBucket - make a new bucket.

func (*S3Client) Put ΒΆ

func (c *S3Client) Put(ctx context.Context, reader io.Reader, size int64, progress io.Reader, putOpts PutOptions) (int64, *probe.Error)

Put - upload an object with custom metadata.

func (*S3Client) PutObjectLegalHold ΒΆ

func (c *S3Client) PutObjectLegalHold(ctx context.Context, versionID string, lhold minio.LegalHoldStatus) *probe.Error

PutObjectLegalHold - Set object legal hold for a given object.

func (*S3Client) PutObjectRetention ΒΆ

func (c *S3Client) PutObjectRetention(ctx context.Context, versionID string, mode minio.RetentionMode, retainUntilDate time.Time, bypassGovernance bool) *probe.Error

PutObjectRetention - Set object retention for a given object.

func (*S3Client) PutPart ΒΆ

func (c *S3Client) PutPart(ctx context.Context, reader io.Reader, size int64, progress io.Reader, putOpts PutOptions) (int64, *probe.Error)

PutPart - upload an object with custom metadata. (Same as Put)

func (*S3Client) Remove ΒΆ

func (c *S3Client) Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass, isForceDel bool, contentCh <-chan *ClientContent) <-chan RemoveResult

Remove - remove object or bucket(s).

func (*S3Client) RemoveBucket ΒΆ

func (c *S3Client) RemoveBucket(ctx context.Context, forceRemove bool) *probe.Error

RemoveBucket removes a bucket, forcibly if asked

func (*S3Client) RemoveNotificationConfig ΒΆ

func (c *S3Client) RemoveNotificationConfig(ctx context.Context, arn string, event string, prefix string, suffix string) *probe.Error

RemoveNotificationConfig - Remove bucket notification

func (*S3Client) RemoveReplication ΒΆ

func (c *S3Client) RemoveReplication(ctx context.Context) *probe.Error

RemoveReplication - removes replication configuration for a given bucket.

func (*S3Client) ReplicationResyncStatus ΒΆ

func (c *S3Client) ReplicationResyncStatus(ctx context.Context, arn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)

ReplicationResyncStatus - gets status of replication resync for this target arn

func (*S3Client) ResetReplication ΒΆ

func (c *S3Client) ResetReplication(ctx context.Context, before time.Duration, tgtArn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error)

ResetReplication - kicks off replication again on previously replicated objects if existing object replication is enabled in the replication config.Optional to provide a timestamp

func (*S3Client) Restore ΒΆ

func (c *S3Client) Restore(ctx context.Context, versionID string, days int) *probe.Error

Restore gets a copy of an archived object

func (*S3Client) Select ΒΆ

func (c *S3Client) Select(ctx context.Context, expression string, sse encrypt.ServerSide, selOpts SelectObjectOpts) (io.ReadCloser, *probe.Error)

Select - select object content wrapper.

func (*S3Client) SetAccess ΒΆ

func (c *S3Client) SetAccess(ctx context.Context, bucketPolicy string, isJSON bool) *probe.Error

SetAccess set access policy permissions.

func (*S3Client) SetEncryption ΒΆ

func (c *S3Client) SetEncryption(ctx context.Context, encType string, kmsKeyID string) *probe.Error

SetEncryption - Set encryption configuration on a bucket

func (*S3Client) SetLifecycle ΒΆ

func (c *S3Client) SetLifecycle(ctx context.Context, config *lifecycle.Configuration) *probe.Error

SetLifecycle - Set lifecycle configuration on a bucket

func (*S3Client) SetObjectLockConfig ΒΆ

func (c *S3Client) SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit) *probe.Error

SetObjectLockConfig - Set object lock configurataion of bucket.

func (*S3Client) SetReplication ΒΆ

func (c *S3Client) SetReplication(ctx context.Context, cfg *replication.Config, opts replication.Options) *probe.Error

SetReplication sets replication configuration for a given bucket.

func (*S3Client) SetTags ΒΆ

func (c *S3Client) SetTags(ctx context.Context, versionID, tagString string) *probe.Error

SetTags - Set tags of bucket or object.

func (*S3Client) SetVersion ΒΆ

func (c *S3Client) SetVersion(ctx context.Context, status string, prefixes []string, excludeFolders bool) *probe.Error

SetVersion - Set version configuration on a bucket

func (*S3Client) ShareDownload ΒΆ

func (c *S3Client) ShareDownload(ctx context.Context, versionID string, expires time.Duration) (string, *probe.Error)

ShareDownload - get a usable presigned object url to share.

func (*S3Client) ShareUpload ΒΆ

func (c *S3Client) ShareUpload(ctx context.Context, isRecursive bool, expires time.Duration, contentType string) (string, map[string]string, *probe.Error)

ShareUpload - get data for presigned post http form upload.

func (*S3Client) Stat ΒΆ

func (c *S3Client) Stat(ctx context.Context, opts StatOptions) (*ClientContent, *probe.Error)

Stat - send a 'HEAD' on a bucket or object to fetch its metadata. It also returns a DIR type content if a prefix does exist in the server.

func (*S3Client) Watch ΒΆ

func (c *S3Client) Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error)

Watch - Start watching on all bucket events for a given account ID.

type SameFile ΒΆ

type SameFile struct {
	Source, Destination string
}

SameFile - source and destination are same files.

func (SameFile) Error ΒΆ

func (e SameFile) Error() string

type SchemaVersion ΒΆ

type SchemaVersion struct {
	Version string `json:"version"`
}

SchemaVersion - version of the health report schema

type ScrapeConfig ΒΆ

type ScrapeConfig struct {
	JobName       string       `yaml:"job_name" json:"jobName"`
	BearerToken   string       `yaml:"bearer_token,omitempty" json:"bearerToken,omitempty"`
	MetricsPath   string       `yaml:"metrics_path,omitempty" json:"metricsPath"`
	Scheme        string       `yaml:"scheme,omitempty" json:"scheme"`
	StaticConfigs []StatConfig `yaml:"static_configs,omitempty" json:"staticConfigs"`
}

ScrapeConfig configures a scraping unit for Prometheus.

type SelectObjectOpts ΒΆ

type SelectObjectOpts struct {
	InputSerOpts    map[string]map[string]string
	OutputSerOpts   map[string]map[string]string
	CompressionType minio.SelectCompressionType
}

SelectObjectOpts - opts entered for select API

type StatConfig ΒΆ

type StatConfig struct {
	Targets []string `yaml:",flow" json:"targets"`
}

StatConfig - container to hold the targets config.

func (StatConfig) JSON ΒΆ

func (t StatConfig) JSON() string

JSON jsonified stat config.

func (StatConfig) String ΒΆ

func (t StatConfig) String() string

String colorized stat config yaml.

type StatOptions ΒΆ

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

StatOptions holds options of the HEAD operation

type Status ΒΆ

type Status interface {
	Println(data ...interface{})
	AddCounts(int64)
	SetCounts(int64)
	GetCounts() int64
	Add(int64) Status
	Get() int64
	Start()
	Finish()
	PrintMsg(msg message)
	Update()
	Total() int64
	SetTotal(int64) Status
	SetCaption(string)
	Read(p []byte) (n int, err error)
	// contains filtered or unexported methods
}

Status implements a interface that can be used in quit mode or with progressbar.

func NewProgressStatus ΒΆ

func NewProgressStatus(hook io.Reader) Status

NewProgressStatus returns a progress status object

func NewQuietStatus ΒΆ

func NewQuietStatus(hook io.Reader) Status

NewQuietStatus returns a quiet status object

type SubnetLoginReq ΒΆ

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

SubnetLoginReq - JSON payload of the SUBNET login api

type SubnetMFAReq ΒΆ

type SubnetMFAReq struct {
	Username string `json:"username"`
	OTP      string `json:"otp"`
	Token    string `json:"token"`
}

SubnetMFAReq - JSON payload of the SUBNET mfa api

type SwInfoV1 ΒΆ

type SwInfoV1 struct {
	Minio  MinioHealthInfoV1     `json:"minio,omitempty"`
	OsInfo []madmin.ServerOsInfo `json:"osinfos,omitempty"`
}

SwInfoV1 - software health Info

type TooManyLevelsSymlink GenericFileError

TooManyLevelsSymlink (ELOOP) - file has too many levels of symlinks.

func (TooManyLevelsSymlink) Error ΒΆ

func (e TooManyLevelsSymlink) Error() string

type URLs ΒΆ

type URLs struct {
	SourceAlias      string
	SourceContent    *ClientContent
	TargetAlias      string
	TargetContent    *ClientContent
	TotalCount       int64
	TotalSize        int64
	MD5              bool
	DisableMultipart bool

	Error     *probe.Error `json:"-"`
	ErrorCond differType   `json:"-"`
	// contains filtered or unexported fields
}

URLs contains source and target urls

func (URLs) Equal ΒΆ

func (m URLs) Equal(n URLs) bool

Equal tests if both urls are equal

func (URLs) WithError ΒΆ

func (m URLs) WithError(err *probe.Error) URLs

WithError sets the error and returns object

type UnexpectedEOF ΒΆ

type UnexpectedEOF struct {
	TotalSize    int64
	TotalWritten int64
}

UnexpectedEOF (EPIPE) - reader closed prematurely.

func (UnexpectedEOF) Error ΒΆ

func (e UnexpectedEOF) Error() string

type UnexpectedExcessRead ΒΆ

type UnexpectedExcessRead UnexpectedEOF

UnexpectedExcessRead - reader wrote more data than requested.

func (UnexpectedExcessRead) Error ΒΆ

func (e UnexpectedExcessRead) Error() string

type UnexpectedShortWrite ΒΆ

type UnexpectedShortWrite struct {
	InputSize int
	WriteSize int
}

UnexpectedShortWrite - write wrote less bytes than expected.

func (UnexpectedShortWrite) Error ΒΆ

func (e UnexpectedShortWrite) Error() string

type WatchObject ΒΆ

type WatchObject struct {
	// eventInfo will be put on this chan
	EventInfoChan chan []EventInfo
	// errors will be put on this chan
	ErrorChan chan *probe.Error
	// will stop the watcher goroutines
	DoneChan chan struct{}
}

WatchObject captures watch channels to read and listen on.

func (*WatchObject) Errors ΒΆ

func (w *WatchObject) Errors() chan *probe.Error

Errors returns the chan receiving errors

func (*WatchObject) Events ΒΆ

func (w *WatchObject) Events() chan []EventInfo

Events returns the chan receiving events

type WatchOptions ΒΆ

type WatchOptions struct {
	Prefix    string
	Suffix    string
	Events    []string
	Recursive bool
}

WatchOptions contains watch configuration options

type Watcher ΒΆ

type Watcher struct {

	// all error will be added to this chan
	ErrorChan chan *probe.Error
	// all events will be added to this chan
	EventInfoChan chan []EventInfo
	// contains filtered or unexported fields
}

Watcher can be used to have one or multiple clients watch for notifications

func NewWatcher ΒΆ

func NewWatcher(sessionStartTime time.Time) *Watcher

NewWatcher creates a new watcher

func (*Watcher) Errors ΒΆ

func (w *Watcher) Errors() chan *probe.Error

Errors returns a channel which will receive errors

func (*Watcher) Events ΒΆ

func (w *Watcher) Events() chan []EventInfo

Events returns a channel which will receive events

func (*Watcher) Join ΒΆ

func (w *Watcher) Join(ctx context.Context, client Client, recursive bool) *probe.Error

Join the watcher with client

func (*Watcher) Stop ΒΆ

func (w *Watcher) Stop()

Stop all watchers

Source Files ΒΆ

Directories ΒΆ

Path Synopsis