Documentation ¶
Overview ¶
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
- Variables
- func DownloadReleaseData(timeout time.Duration) (data string, err *probe.Error)
- func GetCurrentReleaseTime() (releaseTime time.Time, err *probe.Error)
- func IsDCOS() bool
- func IsDeleteEvent(event notify.Event) bool
- func IsDocker() bool
- func IsGetEvent(event notify.Event) bool
- func IsKubernetes() bool
- func IsPutEvent(event notify.Event) bool
- func IsSourceBuild() bool
- func Main(args []string)
- func NewAdminFactory() func(config *Config) (*madmin.AdminClient, *probe.Error)
- func PipeChan(capacity int) (inputCh chan notify.EventInfo, outputCh chan notify.EventInfo)
- func UTCNow() time.Time
- type APINotImplemented
- type BrokenSymlink
- type BucketDoesNotExist
- type BucketExists
- type BucketInvalid
- type BucketNameEmpty
- type BucketNameTopLevel
- type Client
- type ClientContent
- type ClientURL
- type ClientURLType
- type Config
- type DirOpt
- type EmptyPath
- type EventInfo
- type EventType
- type Field
- type GenericBucketError
- type GenericFileError
- type NotificationConfig
- type OBDDataTypeFlag
- type OBDDataTypeSlice
- type ObjectAlreadyExists
- type ObjectAlreadyExistsAsDirectory
- type ObjectMissing
- type ObjectNameEmpty
- type ObjectOnGlacier
- type ParallelManager
- type PathInsufficientPermission
- type PathIsNotRegular
- type PathNotFound
- type PrettyRecord
- type PrettyTable
- type Progress
- type ProgressReader
- type ProgressStatus
- func (ps *ProgressStatus) Add(v int64) Status
- func (ps *ProgressStatus) AddCounts(v int64)
- func (ps *ProgressStatus) Finish()
- func (ps *ProgressStatus) Get() int64
- func (ps *ProgressStatus) GetCounts() int64
- func (ps *ProgressStatus) PrintMsg(msg message)
- func (ps *ProgressStatus) Println(data ...interface{})
- func (ps *ProgressStatus) Read(p []byte) (n int, err error)
- func (p ProgressStatus) Set64(length int64) *progressBar
- func (ps *ProgressStatus) SetCaption(s string)
- func (ps *ProgressStatus) SetCounts(v int64)
- func (ps *ProgressStatus) SetTotal(v int64) Status
- func (ps *ProgressStatus) Start()
- func (ps *ProgressStatus) Total() int64
- func (ps *ProgressStatus) Update()
- type PrometheusConfig
- type QuietStatus
- func (qs *QuietStatus) Add(v int64) Status
- func (qs *QuietStatus) AddCounts(v int64)
- func (qs *QuietStatus) Finish()
- func (qs *QuietStatus) Get() int64
- func (qs *QuietStatus) GetCounts() int64
- func (qs *QuietStatus) PrintMsg(msg message)
- func (qs *QuietStatus) Println(data ...interface{})
- func (qs *QuietStatus) Read(p []byte) (n int, err error)
- func (a QuietStatus) Set(n int64) *accounter
- func (qs *QuietStatus) SetCaption(s string)
- func (qs *QuietStatus) SetCounts(v int64)
- func (qs *QuietStatus) SetTotal(v int64) Status
- func (qs *QuietStatus) Start()
- func (a QuietStatus) Stat() accountStat
- func (qs *QuietStatus) Total() int64
- func (qs *QuietStatus) Update()
- type Row
- type S3Client
- func (c *S3Client) AddNotificationConfig(ctx context.Context, arn string, events []string, prefix, suffix string, ...) *probe.Error
- func (c *S3Client) AddUserAgent(app string, version string)
- func (c *S3Client) Copy(ctx context.Context, source string, size int64, progress io.Reader, ...) *probe.Error
- func (c *S3Client) DeleteTags(ctx context.Context) *probe.Error
- func (c *S3Client) Get(ctx context.Context, sse encrypt.ServerSide) (io.ReadCloser, *probe.Error)
- func (c *S3Client) GetAccess(ctx context.Context) (string, string, *probe.Error)
- func (c *S3Client) GetAccessRules(ctx context.Context) (map[string]string, *probe.Error)
- func (c *S3Client) GetLifecycle(ctx context.Context) (ilm.LifecycleConfiguration, *probe.Error)
- func (c *S3Client) GetObjectLockConfig(ctx context.Context) (minio.RetentionMode, uint64, minio.ValidityUnit, *probe.Error)
- func (c *S3Client) GetTags(ctx context.Context) (*tags.Tags, *probe.Error)
- func (c *S3Client) GetURL() ClientURL
- func (c *S3Client) List(ctx context.Context, isRecursive, isIncomplete, isMetadata bool, ...) <-chan *ClientContent
- func (c *S3Client) ListNotificationConfigs(ctx context.Context, arn string) ([]NotificationConfig, *probe.Error)
- func (c *S3Client) MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error
- func (c *S3Client) Put(ctx context.Context, reader io.Reader, size int64, metadata map[string]string, ...) (int64, *probe.Error)
- func (c *S3Client) PutObjectLegalHold(ctx context.Context, lhold minio.LegalHoldStatus) *probe.Error
- func (c *S3Client) PutObjectRetention(ctx context.Context, mode minio.RetentionMode, retainUntilDate time.Time, ...) *probe.Error
- func (c *S3Client) Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass bool, ...) <-chan *probe.Error
- func (c *S3Client) RemoveNotificationConfig(ctx context.Context, arn string, event string, prefix string, suffix string) *probe.Error
- func (c *S3Client) Select(ctx context.Context, expression string, sse encrypt.ServerSide, ...) (io.ReadCloser, *probe.Error)
- func (c *S3Client) SetAccess(ctx context.Context, bucketPolicy string, isJSON bool) *probe.Error
- func (c *S3Client) SetLifecycle(ctx context.Context, ilmCfg ilm.LifecycleConfiguration) *probe.Error
- func (c *S3Client) SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, ...) *probe.Error
- func (c *S3Client) SetTags(ctx context.Context, tagString string) *probe.Error
- func (c *S3Client) ShareDownload(ctx context.Context, expires time.Duration) (string, *probe.Error)
- func (c *S3Client) ShareUpload(isRecursive bool, expires time.Duration, contentType string) (string, map[string]string, *probe.Error)
- func (c *S3Client) Stat(ctx context.Context, isIncomplete, isPreserve bool, sse encrypt.ServerSide) (*ClientContent, *probe.Error)
- func (c *S3Client) Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error)
- type SameFile
- type ScrapeConfig
- type SelectObjectOpts
- type StatConfig
- type Status
- type TooManyLevelsSymlink
- type URLs
- type UnexpectedEOF
- type UnexpectedExcessRead
- type UnexpectedShortWrite
- type WatchObject
- type WatchOptions
- type Watcher
Constants ¶
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" )
const ( // EventCreate notifies when a new object is created EventCreate EventType = "ObjectCreated" // EventCreateCopy notifies when there was a server side copy EventCreateCopy EventType = "ObjectCreated:Copy" // EventRemove notifies when a new object is deleted EventRemove = "ObjectRemoved" // EventCreatePutRetention notifies when a retention configuration is added to an object EventCreatePutRetention EventType = "ObjectCreated:PutRetention" // EventCreatePutLegalHold notifies when a legal hold configuration is added to an object EventCreatePutLegalHold EventType = "ObjectCreated:PutLegalHold" // EventAccessed notifies when an object is accessed. EventAccessed = "ObjectAccessed" // EventAccessedRead notifies when an object is accessed (specifically read/get). EventAccessedRead = "ObjectAccessed:Read" // EventAccessedStat notifies when an object is accessed (specifically stat). EventAccessedStat = "ObjectAccessed:Stat" )
const HelpTmpl = `` /* 464-byte string literal not displayed */
HelpTmpl template used by all sub-systems
const History = `{{range .}}{{colorYellowBold "RestoreId:"}} {{colorYellowBold .RestoreID}}
Date: {{.CreateTime}}
{{.Targets}}
{{end}}`
History template used by all sub-systems
Variables ¶
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] )
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} )
var ErrInvalidFileSystemAttribute = errors.New("Error in parsing file system attribute")
ErrInvalidFileSystemAttribute reflects invalid fily system attribute
var ErrInvalidMetadata = errors.New("specified metadata should be of form key1=value1;key2=value2;... and so on")
ErrInvalidMetadata reflects invalid metadata format
var HelpEnvTemplate = template.Must(template.New("config-help-env").Funcs(funcMap).Parse(HelpTmpl))
HelpEnvTemplate - captures config help template
var HelpTemplate = template.Must(template.New("config-help").Funcs(funcMap).Parse(HelpTmpl))
HelpTemplate - captures config help template
var HistoryTemplate = template.Must(template.New("history-list").Funcs(funcMap).Parse(History))
HistoryTemplate - captures history list template
var S3New = newFactory()
S3New returns an initialized S3Client structure. If debug is enabled, it also enables an internal trace transport.
Functions ¶
func DownloadReleaseData ¶
DownloadReleaseData - downloads release data from mc official server.
func GetCurrentReleaseTime ¶
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 IsDeleteEvent ¶
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 ¶
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 ¶
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 NewAdminFactory ¶
func NewAdminFactory() func(config *Config) (*madmin.AdminClient, *probe.Error)
NewAdminFactory encloses New function with client cache.
Types ¶
type APINotImplemented ¶
APINotImplemented - api not implemented
func (APINotImplemented) Error ¶
func (e APINotImplemented) Error() string
type BrokenSymlink ¶
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 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 BucketNameTopLevel ¶
type BucketNameTopLevel struct{}
BucketNameTopLevel - generic error
func (BucketNameTopLevel) Error ¶
func (e BucketNameTopLevel) Error() string
type Client ¶
type Client interface { // Common operations Stat(ctx context.Context, isIncomplete, isPreserve bool, sse encrypt.ServerSide) (content *ClientContent, err *probe.Error) List(ctx context.Context, isRecursive, isIncomplete, isFetchMeta bool, showDir DirOpt) <-chan *ClientContent // Bucket operations MakeBucket(ctx context.Context, region string, ignoreExisting, withLock bool) *probe.Error // Object lock config SetObjectLockConfig(ctx context.Context, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit) *probe.Error GetObjectLockConfig(ctx context.Context) (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, size int64, progress io.Reader, srcSSE, tgtSSE encrypt.ServerSide, metadata map[string]string, disableMultipart bool) *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, sse encrypt.ServerSide) (reader io.ReadCloser, err *probe.Error) Put(ctx context.Context, reader io.Reader, size int64, metadata map[string]string, progress io.Reader, sse encrypt.ServerSide, md5, disableMultipart bool) (n int64, err *probe.Error) // Object Locking related API PutObjectRetention(ctx context.Context, mode minio.RetentionMode, retainUntilDate time.Time, bypassGovernance bool) *probe.Error PutObjectLegalHold(ctx context.Context, hold minio.LegalHoldStatus) *probe.Error // I/O operations with expiration // Watch events Watch(ctx context.Context, options WatchOptions) (*WatchObject, *probe.Error) // Delete operations Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass bool, contentCh <-chan *ClientContent) (errorCh <-chan *probe.Error) // GetURL returns back internal url GetURL() ClientURL AddUserAgent(app, version string) // Tagging operations GetTags(ctx context.Context) (*tags.Tags, *probe.Error) SetTags(ctx context.Context, tags string) *probe.Error DeleteTags(ctx context.Context) *probe.Error // Lifecycle operations GetLifecycle(ctx context.Context) (ilm.LifecycleConfiguration, *probe.Error) SetLifecycle(ctx context.Context, lfcCfg ilm.LifecycleConfiguration) *probe.Error }
Client - client interface
type ClientContent ¶
type ClientContent struct { URL ClientURL Time time.Time Size int64 Type os.FileMode StorageClass string Metadata map[string]string UserMetadata map[string]string ETag string Expires time.Time RetentionEnabled bool RetentionMode string RetentionDuration string BypassGovernance bool LegalHoldEnabled bool LegalHold string 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
type Config ¶
type Config struct { AccessKey string SecretKey string SessionToken string Signature string HostURL string AppName string AppVersion string AppComments []string Debug bool Insecure bool Lookup minio.BucketLookupType }
Config - see http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html
func BuildS3Config ¶
func BuildS3Config(ctx context.Context, url, accessKey, secretKey, api, lookup string) (*Config, *probe.Error)
BuildS3Config constructs an S3 Config and does signature auto-probe when needed.
func NewS3Config ¶
NewS3Config simply creates a new Config struct using the passed parameters.
type EventInfo ¶
type EventInfo struct { Time string Size int64 UserMetadata map[string]string Path string Type EventType Host string Port string UserAgent string }
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 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 OBDDataTypeFlag ¶
type OBDDataTypeFlag struct { Name string Usage string EnvVar string Hidden bool Value *OBDDataTypeSlice }
OBDDataTypeFlag is a typed flag to represent OBD datatypes
func (OBDDataTypeFlag) Apply ¶
func (f OBDDataTypeFlag) Apply(set *flag.FlagSet)
Apply - applies the flag
func (OBDDataTypeFlag) ApplyWithError ¶
func (f OBDDataTypeFlag) ApplyWithError(set *flag.FlagSet) error
ApplyWithError - applies with error
func (OBDDataTypeFlag) GetName ¶
func (f OBDDataTypeFlag) GetName() string
GetName - returns the name of the flag
func (OBDDataTypeFlag) String ¶
func (f OBDDataTypeFlag) String() string
String - returns the string to be shown in the help message
type OBDDataTypeSlice ¶
type OBDDataTypeSlice []madmin.OBDDataType
OBDDataTypeSlice is a typed list of OBD tests
func GetGlobalOBDDataTypeSlice ¶
func GetGlobalOBDDataTypeSlice(c *cli.Context, name string) *OBDDataTypeSlice
GetGlobalOBDDataTypeSlice - returns the list of set OBD tests set globally
func GetOBDDataTypeSlice ¶
func GetOBDDataTypeSlice(c *cli.Context, name string) *OBDDataTypeSlice
GetOBDDataTypeSlice - returns the list of set OBD tests
func (*OBDDataTypeSlice) Set ¶
func (d *OBDDataTypeSlice) Set(value string) error
Set - sets the flag to the given value
func (*OBDDataTypeSlice) String ¶
func (d *OBDDataTypeSlice) String() string
String - returns the string representation of the OBD datatypes
func (*OBDDataTypeSlice) Value ¶
func (d *OBDDataTypeSlice) Value() []madmin.OBDDataType
Value - returns the value
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 ¶
func (e ObjectAlreadyExistsAsDirectory) Error() string
type ObjectMissing ¶
type ObjectMissing struct{}
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
type PathInsufficientPermission ¶
type PathInsufficientPermission GenericFileError
PathInsufficientPermission (EPERM) - permission denied.
func (PathInsufficientPermission) Error ¶
func (e PathInsufficientPermission) Error() string
type PathIsNotRegular ¶
type PathIsNotRegular GenericFileError
PathIsNotRegular (ENOTREG) - file is not a regular file.
func (PathIsNotRegular) Error ¶
func (e PathIsNotRegular) Error() string
type PathNotFound ¶
type PathNotFound GenericFileError
PathNotFound (ENOENT) - file not found.
func (PathNotFound) Error ¶
func (e PathNotFound) Error() string
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 ProgressReader ¶
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(msg 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) 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) 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 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) 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) Println ¶
func (qs *QuietStatus) Println(data ...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(s 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) 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
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row specifies row description and theme
type S3Client ¶
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 ¶
AddUserAgent - add custom user agent.
func (*S3Client) Copy ¶
func (c *S3Client) Copy(ctx context.Context, source string, size int64, progress io.Reader, srcSSE, tgtSSE encrypt.ServerSide, metadata map[string]string, disableMultipart bool) *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) DeleteTags ¶
DeleteTags - Delete tags of bucket or object
func (*S3Client) Get ¶
func (c *S3Client) Get(ctx context.Context, sse encrypt.ServerSide) (io.ReadCloser, *probe.Error)
Get - get object with metadata.
func (*S3Client) GetAccessRules ¶
GetAccessRules - get configured policies from the server
func (*S3Client) GetLifecycle ¶
GetLifecycle - Get current lifecycle configuration.
func (*S3Client) GetObjectLockConfig ¶
func (c *S3Client) GetObjectLockConfig(ctx context.Context) (minio.RetentionMode, uint64, minio.ValidityUnit, *probe.Error)
GetObjectLockConfig - Get object lock configuration of bucket.
func (*S3Client) List ¶
func (c *S3Client) List(ctx context.Context, isRecursive, isIncomplete, isMetadata bool, showDir DirOpt) <-chan *ClientContent
List - list at delimited path, if not recursive.
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, metadata map[string]string, progress io.Reader, sse encrypt.ServerSide, md5, disableMultipart bool) (int64, *probe.Error)
Put - upload an object with custom metadata.
func (*S3Client) PutObjectLegalHold ¶
func (c *S3Client) PutObjectLegalHold(ctx context.Context, lhold minio.LegalHoldStatus) *probe.Error
PutObjectLegalHold - Set object legal hold for a given object.
func (*S3Client) PutObjectRetention ¶
func (c *S3Client) PutObjectRetention(ctx context.Context, mode minio.RetentionMode, retainUntilDate time.Time, bypassGovernance bool) *probe.Error
PutObjectRetention - Set object retention for a given object.
func (*S3Client) Remove ¶
func (c *S3Client) Remove(ctx context.Context, isIncomplete, isRemoveBucket, isBypass bool, contentCh <-chan *ClientContent) <-chan *probe.Error
Remove - remove object or bucket(s).
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) 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) SetLifecycle ¶
func (c *S3Client) SetLifecycle(ctx context.Context, ilmCfg ilm.LifecycleConfiguration) *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) ShareDownload ¶
ShareDownload - get a usable presigned object url to share.
func (*S3Client) ShareUpload ¶
func (c *S3Client) ShareUpload(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, isIncomplete, isPreserve bool, sse encrypt.ServerSide) (*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.
type ScrapeConfig ¶
type ScrapeConfig struct { JobName string `yaml:"job_name" json:"jobName"` BearerToken string `yaml:"bearer_token" json:"bearerToken"` 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.
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 ¶
NewProgressStatus returns a progress status object
func NewQuietStatus ¶
NewQuietStatus returns a quiet status object
type TooManyLevelsSymlink ¶
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:"-"` // contains filtered or unexported fields }
URLs contains source and target urls
type UnexpectedEOF ¶
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 ¶
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 ¶
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 ¶
NewWatcher creates a new watcher
Source Files ¶
- access-perms.go
- accounting-reader.go
- admin-bucket-quota.go
- admin-bucket.go
- admin-config-export.go
- admin-config-get.go
- admin-config-help.go
- admin-config-history.go
- admin-config-import.go
- admin-config-reset.go
- admin-config-restore.go
- admin-config-set.go
- admin-config.go
- admin-console.go
- admin-group-add.go
- admin-group-disable.go
- admin-group-enable.go
- admin-group-info.go
- admin-group-list.go
- admin-group-remove.go
- admin-group.go
- admin-heal-result-item.go
- admin-heal-ui.go
- admin-heal.go
- admin-info.go
- admin-kms-key-status.go
- admin-kms-key.go
- admin-kms.go
- admin-main.go
- admin-obd.go
- admin-policy-add.go
- admin-policy-info.go
- admin-policy-list.go
- admin-policy-remove.go
- admin-policy-set.go
- admin-policy.go
- admin-profile-start.go
- admin-profile-stop.go
- admin-profile.go
- admin-prometheus-generate.go
- admin-prometheus.go
- admin-service-restart.go
- admin-service-stop.go
- admin-service.go
- admin-top-locks.go
- admin-top.go
- admin-trace.go
- admin-update.go
- admin-user-add.go
- admin-user-disable.go
- admin-user-enable.go
- admin-user-info.go
- admin-user-list.go
- admin-user-remove.go
- admin-user.go
- auto-complete.go
- build-constants.go
- cat-main.go
- certs.go
- client-admin.go
- client-errors.go
- client-fs.go
- client-fs_linux.go
- client-s3-trace_v2.go
- client-s3-trace_v4.go
- client-s3.go
- client-url.go
- client.go
- common-methods.go
- config-fix.go
- config-host-add.go
- config-host-list.go
- config-host-remove.go
- config-host.go
- config-main.go
- config-migrate.go
- config-old.go
- config-utils.go
- config-v9.go
- config-validate.go
- config.go
- cp-main.go
- cp-url-syntax.go
- cp-url.go
- diff-main.go
- difference.go
- du-main.go
- error.go
- event-add.go
- event-list.go
- event-main.go
- event-remove.go
- find-main.go
- find.go
- flags.go
- fs-pathutils_nix.go
- globals.go
- head-main.go
- humanized-duration.go
- ilm-add.go
- ilm-export.go
- ilm-import.go
- ilm-list.go
- ilm-main.go
- ilm-remove.go
- legalhold-main.go
- lock-main.go
- ls-main.go
- ls.go
- main.go
- mb-main.go
- mirror-main.go
- mirror-url.go
- mv-main.go
- parallel-manager.go
- pipe-main.go
- pipechan.go
- policy-main.go
- pretty-record.go
- pretty-table.go
- print.go
- progress-bar.go
- rb-main.go
- retention-main.go
- retry-continous.go
- rm-main.go
- scan-bar.go
- session-migrate.go
- session-old.go
- session-v8.go
- session.go
- share-db-v1.go
- share-download-main.go
- share-list-main.go
- share-main.go
- share-upload-main.go
- share.go
- signals.go
- sql-main.go
- stat-main.go
- stat.go
- status.go
- table-ui.go
- tag-list.go
- tag-main.go
- tag-remove.go
- tag-set.go
- tree-main.go
- typed-errors.go
- update-main.go
- update-notifier.go
- urls.go
- utils.go
- watch-main.go
- watch.go