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
- Variables
- func AnonErrToObjectErr(statusCode int, params ...string) error
- func BucketAccessPolicyToPolicy(policyInfo *miniogopolicy.BucketAccessPolicy) (*policy.Policy, error)
- func CheckLocalServerAddr(serverAddr string) error
- func CreateEndpoints(serverAddr string, args ...[]string) (string, EndpointList, SetupType, error)
- func DecryptAllBlocksCopyRequest(client io.Writer, r *http.Request, objInfo ObjectInfo) (io.WriteCloser, int64, error)
- func DecryptBlocksRequest(client io.Writer, r *http.Request, startOffset, length int64, ...) (io.WriteCloser, int64, int64, error)
- func DecryptCopyRequest(client io.Writer, r *http.Request, metadata map[string]string) (io.WriteCloser, error)
- func DecryptRequest(client io.Writer, r *http.Request, metadata map[string]string) (io.WriteCloser, error)
- func DecryptRequestWithSequenceNumber(client io.Writer, r *http.Request, seqNumber uint32, ...) (io.WriteCloser, error)
- func DownloadReleaseData(timeout time.Duration, mode string) (data string, err error)
- func EncryptRequest(content io.Reader, r *http.Request, metadata map[string]string) (io.Reader, error)
- func ErrorRespToObjectError(err error, params ...string) error
- func Fallocate(fd int, offset int64, len int64) error
- func FromMinioClientMetadata(metadata map[string][]string) map[string]string
- func GenETag() string
- func GetCurrentReleaseTime() (releaseTime time.Time, err error)
- func GetLocalPeer(endpoints EndpointList) (localPeer string)
- func GetRemotePeers(endpoints EndpointList) []string
- func GetVersion(configFile string) (string, error)
- func IsBOSH() bool
- func IsDCOS() bool
- func IsDocker() bool
- func IsErr(err error, errs ...error) bool
- func IsErrIgnored(err error, ignoredErrs ...error) bool
- func IsKubernetes() bool
- func IsSourceBuild() bool
- func IsValidBucketName(bucket string) bool
- func IsValidObjectName(object string) bool
- func IsValidObjectPrefix(object string) bool
- func LivenessCheckHandler(w http.ResponseWriter, r *http.Request)
- func Load(configFile string, data interface{}) (quick.Config, error)
- func Main(args []string)
- func NewAdminRPCServer() (*xrpc.Server, error)
- func NewCustomHTTPTransport() *http.Transport
- func NewLockRPCServer() (*xrpc.Server, error)
- func NewPeerRPCServer() (*xrpc.Server, error)
- func NewStorageRPCServer(endpointPath string) (*xrpc.Server, error)
- func ParseGatewayEndpoint(arg string) (endPoint string, secure bool, err error)
- func ParseSSECopyCustomerRequest(r *http.Request) (key []byte, err error)
- func ParseSSECustomerHeader(header http.Header) (key []byte, err error)
- func ParseSSECustomerRequest(r *http.Request) (key []byte, err error)
- func PolicyToBucketAccessPolicy(bucketPolicy *policy.Policy) (*miniogopolicy.BucketAccessPolicy, error)
- func ReadinessCheckHandler(w http.ResponseWriter, r *http.Request)
- func RegisterGatewayCommand(cmd cli.Command) error
- func RemoveListener(objAPI ObjectLayer, bucketName string, targetID event.TargetID, addr xnet.Host) error
- func Save(configFile string, data interface{}) error
- func SaveListener(objAPI ObjectLayer, bucketName string, eventNames []event.Name, pattern string, ...) error
- func StartGateway(ctx *cli.Context, gw Gateway)
- func StorageReader(storage StorageAPI, volume, path string, offset int64) io.Reader
- func StorageWriter(storage StorageAPI, volume, path string) io.Writer
- func ToMinioClientCompletePart(part CompletePart) minio.CompletePart
- func ToMinioClientCompleteParts(parts []CompletePart) []minio.CompletePart
- func ToMinioClientMetadata(metadata map[string]string) map[string]string
- func ToS3ETag(etag string) string
- func UTCNow() time.Time
- func ValidateGatewayArguments(serverAddr, endpointAddr string) error
- type APIError
- type APIErrorCode
- type APIErrorResponse
- type AdminRPCClient
- func (rpcClient *AdminRPCClient) CommitConfig(tmpFileName string) error
- func (rpcClient *AdminRPCClient) GetConfig() ([]byte, error)
- func (rpcClient *AdminRPCClient) ListLocks(bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error)
- func (rpcClient *AdminRPCClient) ReInitFormat(dryRun bool) error
- func (rpcClient *AdminRPCClient) ServerInfo() (sid ServerInfoData, err error)
- func (rpcClient *AdminRPCClient) SignalService(signal serviceSignal) (err error)
- func (rpcClient *AdminRPCClient) WriteTmpConfig(tmpFileName string, configBytes []byte) error
- type AllAccessDisabled
- type AppendFileArgs
- type AuthArgs
- type BackendDown
- type BackendType
- type BitrotAlgorithm
- type BitrotVerifier
- type BoolFlag
- type Bucket
- type BucketAccessPolicy
- type BucketAlreadyExists
- type BucketAlreadyOwnedByYou
- type BucketExists
- type BucketInfo
- type BucketNameInvalid
- type BucketNotEmpty
- type BucketNotFound
- type BucketPolicyNotFound
- type CacheConfig
- type CacheObjectLayer
- type CacheStorageInfo
- type ChecksumInfo
- type CommitConfigArgs
- type CommonPrefix
- type CompleteMultipartUpload
- type CompleteMultipartUploadResponse
- type CompletePart
- type CompletedParts
- type ConfigDir
- func (config *ConfigDir) Create() error
- func (config *ConfigDir) Get() string
- func (config *ConfigDir) GetCADir() string
- func (config *ConfigDir) GetMinioConfigFile() string
- func (config *ConfigDir) GetPrivateKeyFile() string
- func (config *ConfigDir) GetPublicCertFile() string
- func (config *ConfigDir) Set(dir string)
- type ConnStats
- type ConsoleLogger
- type CopyObjectPartResponse
- type CopyObjectResponse
- type DecryptBlocksWriter
- type DeleteBucketArgs
- type DeleteError
- type DeleteFileArgs
- type DeleteObjectsRequest
- type DeleteObjectsResponse
- type DiskInfo
- type DownloadZipArgs
- type Endpoint
- type EndpointList
- type EndpointType
- type ErasureFileInfo
- type ErasureInfo
- type ErasureStorage
- func (s *ErasureStorage) CreateFile(ctx context.Context, src io.Reader, volume, path string, buffer []byte, ...) (f ErasureFileInfo, err error)
- func (s *ErasureStorage) ErasureDecodeDataAndParityBlocks(ctx context.Context, data [][]byte) error
- func (s *ErasureStorage) ErasureDecodeDataBlocks(data [][]byte) error
- func (s *ErasureStorage) ErasureEncode(ctx context.Context, data []byte) ([][]byte, error)
- func (s ErasureStorage) HealFile(ctx context.Context, staleDisks []StorageAPI, volume, path string, ...) (f ErasureFileInfo, err error)
- func (s ErasureStorage) ReadFile(ctx context.Context, writer io.Writer, volume, path string, ...) (f ErasureFileInfo, err error)
- type FSChecksumInfoV1
- type FSObjects
- func (fs *FSObjects) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error
- func (fs *FSObjects) ClearLocks(ctx context.Context, info []VolumeLockInfo) error
- func (fs *FSObjects) CompleteMultipartUpload(ctx context.Context, bucket string, object string, uploadID string, ...) (oi ObjectInfo, e error)
- func (fs *FSObjects) CopyObject(ctx context.Context, srcBucket, srcObject, dstBucket, dstObject string, ...) (oi ObjectInfo, e error)
- func (fs *FSObjects) CopyObjectPart(ctx context.Context, ...) (pi PartInfo, e error)
- func (fs *FSObjects) DeleteBucket(ctx context.Context, bucket string) error
- func (fs *FSObjects) DeleteBucketPolicy(ctx context.Context, bucket string) error
- func (fs *FSObjects) DeleteObject(ctx context.Context, bucket, object string) error
- func (fs *FSObjects) GetBucketInfo(ctx context.Context, bucket string) (bi BucketInfo, e error)
- func (fs *FSObjects) GetBucketPolicy(ctx context.Context, bucket string) (*policy.Policy, error)
- func (fs *FSObjects) GetObject(ctx context.Context, bucket, object string, offset int64, length int64, ...) (err error)
- func (fs *FSObjects) GetObjectInfo(ctx context.Context, bucket, object string) (oi ObjectInfo, e error)
- func (fs *FSObjects) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error)
- func (fs *FSObjects) HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)
- func (fs *FSObjects) HealObject(ctx context.Context, bucket, object string, dryRun bool) (res madmin.HealResultItem, err error)
- func (fs *FSObjects) IsEncryptionSupported() bool
- func (fs *FSObjects) IsNotificationSupported() bool
- func (fs *FSObjects) ListBuckets(ctx context.Context) ([]BucketInfo, error)
- func (fs *FSObjects) ListBucketsHeal(ctx context.Context) ([]BucketInfo, error)
- func (fs *FSObjects) ListLocks(ctx context.Context, bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error)
- func (fs *FSObjects) ListMultipartUploads(ctx context.Context, ...) (result ListMultipartsInfo, e error)
- func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, uploadID string, ...) (result ListPartsInfo, e error)
- func (fs *FSObjects) ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)
- func (fs *FSObjects) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)
- func (fs *FSObjects) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, ...) (result ListObjectsV2Info, err error)
- func (fs *FSObjects) MakeBucketWithLocation(ctx context.Context, bucket, location string) error
- func (fs *FSObjects) NewMultipartUpload(ctx context.Context, bucket, object string, meta map[string]string) (string, error)
- func (fs *FSObjects) PutObject(ctx context.Context, bucket string, object string, data *hash.Reader, ...) (objInfo ObjectInfo, retErr error)
- func (fs *FSObjects) PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, ...) (pi PartInfo, e error)
- func (fs *FSObjects) ReloadFormat(ctx context.Context, dryRun bool) error
- func (fs *FSObjects) SetBucketPolicy(ctx context.Context, bucket string, policy *policy.Policy) error
- func (fs *FSObjects) Shutdown(ctx context.Context) error
- func (fs *FSObjects) StorageInfo(ctx context.Context) StorageInfo
- type FileInfo
- type FileLogger
- type Gateway
- type GatewayUnsupported
- func (a GatewayUnsupported) AbortMultipartUpload(ctx context.Context, bucket string, object string, uploadID string) error
- func (a GatewayUnsupported) ClearLocks(ctx context.Context, info []VolumeLockInfo) error
- func (a GatewayUnsupported) CompleteMultipartUpload(ctx context.Context, bucket string, object string, uploadID string, ...) (oi ObjectInfo, err error)
- func (a GatewayUnsupported) CopyObject(ctx context.Context, srcBucket string, srcObject string, destBucket string, ...) (objInfo ObjectInfo, err error)
- func (a GatewayUnsupported) CopyObjectPart(ctx context.Context, ...) (pi PartInfo, err error)
- func (a GatewayUnsupported) DeleteBucketPolicy(ctx context.Context, bucket string) error
- func (a GatewayUnsupported) GetBucketPolicy(ctx context.Context, bucket string) (bucketPolicy *policy.Policy, err error)
- func (a GatewayUnsupported) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error)
- func (a GatewayUnsupported) HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)
- func (a GatewayUnsupported) HealObject(ctx context.Context, bucket, object string, dryRun bool) (h madmin.HealResultItem, e error)
- func (a GatewayUnsupported) IsEncryptionSupported() bool
- func (a GatewayUnsupported) IsNotificationSupported() bool
- func (a GatewayUnsupported) ListBucketsHeal(ctx context.Context) (buckets []BucketInfo, err error)
- func (a GatewayUnsupported) ListLocks(ctx context.Context, bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error)
- func (a GatewayUnsupported) ListMultipartUploads(ctx context.Context, bucket string, prefix string, keyMarker string, ...) (lmi ListMultipartsInfo, err error)
- func (a GatewayUnsupported) ListObjectParts(ctx context.Context, bucket string, object string, uploadID string, ...) (lpi ListPartsInfo, err error)
- func (a GatewayUnsupported) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)
- func (a GatewayUnsupported) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, ...) (result ListObjectsV2Info, err error)
- func (a GatewayUnsupported) NewMultipartUpload(ctx context.Context, bucket string, object string, metadata map[string]string) (uploadID string, err error)
- func (a GatewayUnsupported) PutObjectPart(ctx context.Context, bucket string, object string, uploadID string, partID int, ...) (pi PartInfo, err error)
- func (a GatewayUnsupported) RefreshBucketPolicy(ctx context.Context, bucket string) error
- func (a GatewayUnsupported) ReloadFormat(ctx context.Context, dryRun bool) error
- func (a GatewayUnsupported) SetBucketPolicy(ctx context.Context, bucket string, bucketPolicy *policy.Policy) error
- type GenerateAuthReply
- type GenericError
- type GetAuthReply
- type GetBucketPolicyArgs
- type GetBucketPolicyRep
- type HTTPMethodStats
- type HTTPStats
- type HandlerFunc
- type IncompleteBody
- type InitiateMultipartUploadResponse
- type Initiator
- type InsufficientReadQuorum
- type InsufficientWriteQuorum
- type InvalidETag
- type InvalidMarkerPrefixCombination
- type InvalidPart
- type InvalidRange
- type InvalidUploadID
- type InvalidUploadIDKeyCombination
- type ListAllBucketPoliciesArgs
- type ListAllBucketPoliciesRep
- type ListBucketsRep
- type ListBucketsResponse
- type ListDirArgs
- type ListLocksQuery
- type ListMultipartUploadsResponse
- type ListMultipartsInfo
- type ListObjectsArgs
- type ListObjectsInfo
- type ListObjectsRep
- type ListObjectsResponse
- type ListObjectsV2Info
- type ListObjectsV2Response
- type ListPartsInfo
- type ListPartsResponse
- type ListenBucketNotificationArgs
- type LocationResponse
- type LockArgs
- type LockInfoOpsIDNotFound
- type LockInfoOriginMismatch
- type LockInfoStateNotBlocked
- type LockInfoVolPathMissing
- type LockRPCClient
- func (lockRPC *LockRPCClient) Expired(args dsync.LockArgs) (reply bool, err error)
- func (lockRPC *LockRPCClient) ForceUnlock(args dsync.LockArgs) (reply bool, err error)
- func (lockRPC *LockRPCClient) Lock(args dsync.LockArgs) (reply bool, err error)
- func (lockRPC *LockRPCClient) RLock(args dsync.LockArgs) (reply bool, err error)
- func (lockRPC *LockRPCClient) RUnlock(args dsync.LockArgs) (reply bool, err error)
- func (lockRPC *LockRPCClient) ServerAddr() string
- func (lockRPC *LockRPCClient) ServiceEndpoint() string
- func (lockRPC *LockRPCClient) Unlock(args dsync.LockArgs) (reply bool, err error)
- type LoginArgs
- type LoginRep
- type MakeBucketArgs
- type MalformedUploadID
- type MultipartInfo
- type NotImplemented
- type NotificationPeerErr
- type NotificationSys
- func (sys *NotificationSys) AddRemoteTarget(bucketName string, target event.Target, rulesMap event.RulesMap) error
- func (sys *NotificationSys) AddRulesMap(bucketName string, rulesMap event.RulesMap)
- func (sys *NotificationSys) DeleteBucket(bucketName string) <-chan NotificationPeerErr
- func (sys *NotificationSys) GetARNList() []string
- func (sys *NotificationSys) GetPeerRPCClient(addr xnet.Host) *PeerRPCClient
- func (sys *NotificationSys) Init(objAPI ObjectLayer) error
- func (sys *NotificationSys) ListenBucketNotification(bucketName string, eventNames []event.Name, pattern string, ...) <-chan NotificationPeerErr
- func (sys *NotificationSys) PutBucketNotification(bucketName string, rulesMap event.RulesMap) <-chan NotificationPeerErr
- func (sys *NotificationSys) RemoteTargetExist(bucketName string, targetID event.TargetID) bool
- func (sys *NotificationSys) RemoveAllRemoteTargets()
- func (sys *NotificationSys) RemoveBucketPolicy(bucketName string) <-chan NotificationPeerErr
- func (sys *NotificationSys) RemoveNotification(bucketName string)
- func (sys *NotificationSys) RemoveRemoteTarget(bucketName string, targetID event.TargetID)
- func (sys *NotificationSys) RemoveRulesMap(bucketName string, rulesMap event.RulesMap)
- func (sys *NotificationSys) Send(args eventArgs) []event.TargetIDErr
- func (sys *NotificationSys) SetBucketPolicy(bucketName string, bucketPolicy *policy.Policy) <-chan NotificationPeerErr
- func (sys *NotificationSys) SetCredentials(credentials auth.Credentials) map[xnet.Host]error
- type Object
- type ObjectAlreadyExists
- type ObjectExistsAsDirectory
- type ObjectIdentifier
- type ObjectInfo
- type ObjectLayer
- type ObjectNameInvalid
- type ObjectNotFound
- type ObjectTooLarge
- type ObjectTooSmall
- type OperationTimedOut
- type OpsLockState
- type Owner
- type Part
- type PartInfo
- type PartTooBig
- type PartTooSmall
- type PartsSizeUnequal
- type PeerRPCClient
- func (rpcClient *PeerRPCClient) DeleteBucket(bucketName string) error
- func (rpcClient *PeerRPCClient) ListenBucketNotification(bucketName string, eventNames []event.Name, pattern string, ...) error
- func (rpcClient *PeerRPCClient) PutBucketNotification(bucketName string, rulesMap event.RulesMap) error
- func (rpcClient *PeerRPCClient) RemoteTargetExist(bucketName string, targetID event.TargetID) (bool, error)
- func (rpcClient *PeerRPCClient) RemoveBucketPolicy(bucketName string) error
- func (rpcClient *PeerRPCClient) SendEvent(bucketName string, targetID, remoteTargetID event.TargetID, ...) error
- func (rpcClient *PeerRPCClient) SetBucketPolicy(bucketName string, bucketPolicy *policy.Policy) error
- func (rpcClient *PeerRPCClient) SetCredentials(credentials auth.Credentials) error
- type PeerRPCClientTarget
- type PolicyNesting
- type PolicySys
- type PostPolicyForm
- type PostResponse
- type PrefixAccessDenied
- type PrepareFileArgs
- type PresignedGetArgs
- type PresignedGetRep
- type PutBucketNotificationArgs
- type RPCClient
- type RPCClientArgs
- type RPCVersion
- type RWLocker
- type RWLockerSync
- type ReInitFormatArgs
- type ReadAllArgs
- type ReadFileArgs
- type RemoteTargetExistArgs
- type RemoveBucketArgs
- type RemoveBucketPolicyArgs
- type RemoveObjectArgs
- type RenameFileArgs
- type SendEventArgs
- type ServerConnStats
- type ServerHTTPMethodStats
- type ServerHTTPStats
- type ServerInfo
- type ServerInfoData
- type ServerInfoRep
- type ServerProperties
- type SetAuthArgs
- type SetAuthReply
- type SetBucketPolicyArgs
- type SetBucketPolicyWebArgs
- type SetCredentialsArgs
- type SetupType
- type SignalServiceArgs
- type SignatureDoesNotMatch
- type StatFileArgs
- type StorageAPI
- type StorageFull
- type StorageInfo
- type StorageInfoRep
- type StorageRPCClient
- func (client *StorageRPCClient) AppendFile(volume, path string, buffer []byte) (err error)
- func (client *StorageRPCClient) Close() error
- func (client *StorageRPCClient) DeleteFile(volume, path string) (err error)
- func (client *StorageRPCClient) DeleteVol(volume string) (err error)
- func (client *StorageRPCClient) DiskInfo() (info DiskInfo, err error)
- func (client *StorageRPCClient) IsOnline() bool
- func (client *StorageRPCClient) ListDir(volume, path string, count int) (entries []string, err error)
- func (client *StorageRPCClient) ListVols() ([]VolInfo, error)
- func (client *StorageRPCClient) MakeVol(volume string) (err error)
- func (client *StorageRPCClient) PrepareFile(volume, path string, length int64) (err error)
- func (client *StorageRPCClient) ReadAll(volume, path string) (buf []byte, err error)
- func (client *StorageRPCClient) ReadFile(volume string, path string, offset int64, buffer []byte, ...) (m int64, err error)
- func (client *StorageRPCClient) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) (err error)
- func (client *StorageRPCClient) StatFile(volume, path string) (fileInfo FileInfo, err error)
- func (client *StorageRPCClient) StatVol(volume string) (volInfo VolInfo, err error)
- func (client *StorageRPCClient) String() string
- type SystemLockState
- type URLTokenReply
- type UnsupportedDelimiter
- type UnsupportedMetadata
- type Upload
- type VoidReply
- type VolArgs
- type VolInfo
- type VolumeLockInfo
- type WebBucketInfo
- type WebGenericArgs
- type WebGenericRep
- type WebObjectInfo
- type WriteConfigArgs
Constants ¶
const ( // SSECustomerAlgorithm is the AWS SSE-C algorithm HTTP header key. SSECustomerAlgorithm = "X-Amz-Server-Side-Encryption-Customer-Algorithm" // SSECustomerKey is the AWS SSE-C encryption key HTTP header key. SSECustomerKey = "X-Amz-Server-Side-Encryption-Customer-Key" // SSECustomerKeyMD5 is the AWS SSE-C encryption key MD5 HTTP header key. SSECustomerKeyMD5 = "X-Amz-Server-Side-Encryption-Customer-Key-MD5" // SSECopyCustomerAlgorithm is the AWS SSE-C algorithm HTTP header key for CopyObject API. SSECopyCustomerAlgorithm = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm" // SSECopyCustomerKey is the AWS SSE-C encryption key HTTP header key for CopyObject API. SSECopyCustomerKey = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key" // SSECopyCustomerKeyMD5 is the AWS SSE-C encryption key MD5 HTTP header key for CopyObject API. SSECopyCustomerKeyMD5 = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-MD5" )
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 // SSECustomerAlgorithmAES256 the only valid S3 SSE-C encryption algorithm identifier. SSECustomerAlgorithmAES256 = "AES256" )
const ( // ServerSideEncryptionIV is a 32 byte randomly generated IV used to derive an // unique key encryption key from the client provided key. The combination of this value // and the client-provided key MUST be unique. ServerSideEncryptionIV = ReservedMetadataPrefix + "Server-Side-Encryption-Iv" // ServerSideEncryptionSealAlgorithm identifies a combination of a cryptographic hash function and // an authenticated en/decryption scheme to seal the object encryption key. ServerSideEncryptionSealAlgorithm = ReservedMetadataPrefix + "Server-Side-Encryption-Seal-Algorithm" // ServerSideEncryptionSealedKey is the sealed object encryption key. The sealed key can be decrypted // by the key encryption key derived from the client provided key and the server-side-encryption IV. ServerSideEncryptionSealedKey = ReservedMetadataPrefix + "Server-Side-Encryption-Sealed-Key" )
const DefaultSkewTime = 15 * time.Minute
DefaultSkewTime - skew time is 15 minutes between minio peers.
const GatewayMinioSysTmp = "minio.sys.tmp/"
GatewayMinioSysTmp prefix is used in Azure/GCS gateway for save metadata sent by Initialize Multipart Upload API.
const MaxJitter = 1.0
MaxJitter will randomize over the full exponential backoff time
const NoJitter = 0.0
NoJitter disables the use of jitter for randomizing the exponential backoff time
const ReservedMetadataPrefix = "X-Minio-Internal-"
ReservedMetadataPrefix is the prefix of a metadata key which is reserved and for internal use only.
const SSESealAlgorithmDareSha256 = "DARE-SHA256"
SSESealAlgorithmDareSha256 specifies DARE as authenticated en/decryption scheme and SHA256 as cryptographic hash function.
const TLSPrivateKeyPassword = "MINIO_CERT_PASSWD"
TLSPrivateKeyPassword is the environment variable which contains the password used to decrypt the TLS private key. It must be set if the TLS private key is password protected.
Variables ¶
var ( // GOPATH - GOPATH value at the time of build. GOPATH = "" // GOROOT - GOROOT value at the time of build. GOROOT = "" // Version - version time.RFC3339. Version = goGetTag // ReleaseTag - release tag in TAG.%Y-%m-%dT%H-%M-%SZ. ReleaseTag = goGetTag // CommitID - latest commit id. CommitID = goGetTag // ShortCommitID - first 12 characters from CommitID. ShortCommitID = CommitID[:12] )
DO NOT EDIT THIS FILE DIRECTLY. These are build-time constants set through ‘buildscripts/gen-ldflags.go’.
var ( // CanonicalizeETag provides canonicalizeETag function alias. CanonicalizeETag = canonicalizeETag // MustGetUUID function alias. MustGetUUID = mustGetUUID )
var DefaultBitrotAlgorithm = HighwayHash256
DefaultBitrotAlgorithm is the default algorithm used for bitrot protection.
Functions ¶
func AnonErrToObjectErr ¶
AnonErrToObjectErr - converts standard http codes into meaningful object layer errors.
func BucketAccessPolicyToPolicy ¶
func BucketAccessPolicyToPolicy(policyInfo *miniogopolicy.BucketAccessPolicy) (*policy.Policy, error)
BucketAccessPolicyToPolicy - converts minio-go/policy.BucketAccessPolicy to policy.Policy.
func CheckLocalServerAddr ¶
CheckLocalServerAddr - checks if serverAddr is valid and local host.
func CreateEndpoints ¶
CreateEndpoints - validates and creates new endpoints for given args.
func DecryptAllBlocksCopyRequest ¶
func DecryptAllBlocksCopyRequest(client io.Writer, r *http.Request, objInfo ObjectInfo) (io.WriteCloser, int64, error)
DecryptAllBlocksCopyRequest - setup a struct which can decrypt many concatenated encrypted data parts information helps to know the boundaries of each encrypted data block, this function decrypts all parts starting from part-1.
func DecryptBlocksRequest ¶
func DecryptBlocksRequest(client io.Writer, r *http.Request, startOffset, length int64, objInfo ObjectInfo, copySource bool) (io.WriteCloser, int64, int64, error)
DecryptBlocksRequest - setup a struct which can decrypt many concatenated encrypted data parts information helps to know the boundaries of each encrypted data block.
func DecryptCopyRequest ¶
func DecryptCopyRequest(client io.Writer, r *http.Request, metadata map[string]string) (io.WriteCloser, error)
DecryptCopyRequest decrypts the object with the client provided key. It also removes the client-side-encryption metadata from the object and sets the correct headers.
func DecryptRequest ¶
func DecryptRequest(client io.Writer, r *http.Request, metadata map[string]string) (io.WriteCloser, error)
DecryptRequest decrypts the object with the client provided key. It also removes the client-side-encryption metadata from the object and sets the correct headers.
func DecryptRequestWithSequenceNumber ¶
func DecryptRequestWithSequenceNumber(client io.Writer, r *http.Request, seqNumber uint32, metadata map[string]string) (io.WriteCloser, error)
DecryptRequestWithSequenceNumber decrypts the object with the client provided key. It also removes the client-side-encryption metadata from the object and sets the correct headers.
func DownloadReleaseData ¶
DownloadReleaseData - downloads release data from minio official server.
func EncryptRequest ¶
func EncryptRequest(content io.Reader, r *http.Request, metadata map[string]string) (io.Reader, error)
EncryptRequest takes the client provided content and encrypts the data with the client provided key. It also marks the object as client-side-encrypted and sets the correct headers.
func ErrorRespToObjectError ¶
ErrorRespToObjectError converts Minio errors to minio object layer errors.
func Fallocate ¶
Fallocate uses the linux Fallocate syscall, which helps us to be sure that subsequent writes on a file just created will not fail, in addition, file allocation will be contigous on the disk
func FromMinioClientMetadata ¶
FromMinioClientMetadata converts minio metadata to map[string]string
func GetCurrentReleaseTime ¶
GetCurrentReleaseTime - returns this process's release time. If it is official minio version, parsed version is returned else minio binary's mod time is returned.
func GetLocalPeer ¶
func GetLocalPeer(endpoints EndpointList) (localPeer string)
GetLocalPeer - returns local peer value, returns globalMinioAddr for FS and Erasure mode. In case of distributed server return the first element from the set of peers which indicate that they are local. There is always one entry that is local even with repeated server endpoints.
func GetRemotePeers ¶
func GetRemotePeers(endpoints EndpointList) []string
GetRemotePeers - get hosts information other than this minio service.
func GetVersion ¶
GetVersion gets config version from backend
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#L25
"/.dockerenv": "file",
func IsErrIgnored ¶
IsErrIgnored returns whether given error is ignored or not.
func IsKubernetes ¶
func IsKubernetes() bool
IsKubernetes returns true if minio is running in kubernetes.
func IsSourceBuild ¶
func IsSourceBuild() bool
IsSourceBuild - returns if this binary is a non-official build from source code.
func IsValidBucketName ¶
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 ¶
IsValidObjectName verifies an object name in accordance with Amazon's requirements. It cannot exceed 1024 characters and must be a valid UTF8 string.
See: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
You should avoid the following characters in a key name because of significant special handling for consistency across all applications.
Rejects strings with following characters.
- Backslash ("\")
additionally minio does not support object names with trailing "/".
func IsValidObjectPrefix ¶
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 server can ListBuckets internally. If not, server is considered to have failed and needs to be restarted. Liveness probes are used to detect situations where application (minio) has gone into a state where it can not recover except by being restarted.
func NewAdminRPCServer ¶
NewAdminRPCServer - returns new admin RPC server.
func NewCustomHTTPTransport ¶
NewCustomHTTPTransport returns a new http configuration used while communicating with the cloud backends. This sets the value for MaxIdleConnsPerHost from 2 (go default) to 100.
func NewLockRPCServer ¶
NewLockRPCServer - returns new lock RPC server.
func NewPeerRPCServer ¶
NewPeerRPCServer - returns new peer RPC server.
func NewStorageRPCServer ¶
NewStorageRPCServer - returns new storage RPC server.
func ParseGatewayEndpoint ¶
ParseGatewayEndpoint - Return endpoint.
func ParseSSECopyCustomerRequest ¶
ParseSSECopyCustomerRequest parses the SSE-C header fields of the provided request. It returns the client provided key on success.
func ParseSSECustomerHeader ¶
ParseSSECustomerHeader parses the SSE-C header fields and returns the client provided key on success.
func ParseSSECustomerRequest ¶
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.Policy) (*miniogopolicy.BucketAccessPolicy, error)
PolicyToBucketAccessPolicy - converts policy.Policy to minio-go/policy.BucketAccessPolicy.
func ReadinessCheckHandler ¶
func ReadinessCheckHandler(w http.ResponseWriter, r *http.Request)
ReadinessCheckHandler -- checks if there are more than threshold number of goroutines running, returns service unavailable. Readiness probes are used to detect situations where application is under heavy load and temporarily unable to serve. In a orchestrated setup like Kubernetes, containers reporting that they are not ready do not receive traffic through Kubernetes Services.
func RegisterGatewayCommand ¶
RegisterGatewayCommand registers a new command for gateway.
func RemoveListener ¶
func RemoveListener(objAPI ObjectLayer, bucketName string, targetID event.TargetID, addr xnet.Host) error
RemoveListener - removes HTTP client currently listening for events from listener.json.
func SaveListener ¶
func SaveListener(objAPI ObjectLayer, bucketName string, eventNames []event.Name, pattern string, targetID event.TargetID, addr xnet.Host) error
SaveListener - saves HTTP client currently listening for events to listener.json.
func StartGateway ¶
StartGateway - handler for 'minio gateway <name>'.
func StorageReader ¶
func StorageReader(storage StorageAPI, volume, path string, offset int64) io.Reader
StorageReader returns a new io.Reader which reads data to the file at the given disk, volume, path and offset.
func StorageWriter ¶
func StorageWriter(storage StorageAPI, volume, path string) io.Writer
StorageWriter returns a new io.Writer which appends data to the file at the given disk, volume and path.
func ToMinioClientCompletePart ¶
func ToMinioClientCompletePart(part CompletePart) minio.CompletePart
ToMinioClientCompletePart converts CompletePart to minio CompletePart
func ToMinioClientCompleteParts ¶
func ToMinioClientCompleteParts(parts []CompletePart) []minio.CompletePart
ToMinioClientCompleteParts converts []CompletePart to minio []CompletePart
func ToMinioClientMetadata ¶
ToMinioClientMetadata converts metadata to map[string][]string
func ValidateGatewayArguments ¶
ValidateGatewayArguments - Validate gateway arguments.
Types ¶
type APIErrorCode ¶
type APIErrorCode int
APIErrorCode type of error status.
const ( ErrNone APIErrorCode = iota ErrAccessDenied ErrBadDigest ErrEntityTooSmall ErrEntityTooLarge ErrIncompleteBody ErrInternalError ErrInvalidAccessKeyID ErrInvalidBucketName ErrInvalidDigest ErrInvalidRange ErrInvalidCopyPartRange ErrInvalidCopyPartRangeSource ErrInvalidMaxKeys ErrInvalidMaxUploads ErrInvalidMaxParts ErrInvalidPartNumberMarker ErrInvalidRequestBody ErrInvalidCopySource ErrInvalidMetadataDirective ErrInvalidCopyDest ErrInvalidPolicyDocument ErrInvalidObjectState ErrMalformedXML ErrMissingContentLength ErrMissingContentMD5 ErrMissingRequestBodyError ErrNoSuchBucket ErrNoSuchBucketPolicy ErrNoSuchKey ErrNoSuchUpload ErrNotImplemented ErrPreconditionFailed ErrRequestTimeTooSkewed ErrSignatureDoesNotMatch ErrMethodNotAllowed ErrInvalidPart ErrInvalidPartOrder ErrAuthorizationHeaderMalformed ErrMalformedPOSTRequest ErrPOSTFileRequired ErrSignatureVersionNotSupported ErrBucketNotEmpty ErrAllAccessDisabled ErrMalformedPolicy ErrMissingFields ErrMissingCredTag ErrCredMalformed ErrInvalidRegion ErrInvalidService ErrInvalidRequestVersion ErrMissingSignTag ErrMissingSignHeadersTag ErrPolicyAlreadyExpired ErrMalformedDate ErrMalformedPresignedDate ErrMalformedCredentialDate ErrMalformedCredentialRegion ErrMalformedExpires ErrNegativeExpires ErrAuthHeaderEmpty ErrExpiredPresignRequest ErrRequestNotReadyYet ErrUnsignedHeaders ErrMissingDateHeader ErrInvalidQuerySignatureAlgo ErrInvalidQueryParams ErrBucketAlreadyOwnedByYou ErrInvalidDuration ErrBucketAlreadyExists ErrMetadataTooLarge ErrUnsupportedMetadata ErrMaximumExpires ErrSlowDown ErrInvalidPrefixMarker // Server-Side-Encryption (with Customer provided key) related API errors. ErrInsecureSSECustomerRequest ErrSSEMultipartEncrypted ErrSSEEncryptedObject ErrInvalidEncryptionParameters ErrInvalidSSECustomerAlgorithm ErrInvalidSSECustomerKey ErrMissingSSECustomerKey ErrMissingSSECustomerKeyMD5 ErrSSECustomerKeyMD5Mismatch ErrInvalidSSECustomerParameters // Bucket notification related errors. ErrEventNotification ErrARNNotification ErrRegionNotification ErrOverlappingFilterNotification ErrFilterNameInvalid ErrFilterNamePrefix ErrFilterNameSuffix ErrFilterValueInvalid ErrOverlappingConfigs ErrUnsupportedNotification // S3 extended errors. ErrContentSHA256Mismatch // Minio extended errors. ErrReadQuorum ErrWriteQuorum ErrStorageFull ErrRequestBodyParse ErrObjectExistsAsDirectory ErrPolicyNesting ErrInvalidObjectName ErrInvalidResourceName ErrServerNotInitialized ErrOperationTimedOut ErrPartsSizeUnequal ErrInvalidRequest // Minio storage class error codes ErrInvalidStorageClass ErrBackendDown ErrMalformedJSON ErrAdminInvalidAccessKey ErrAdminInvalidSecretKey ErrAdminConfigNoQuorum ErrAdminConfigTooLarge ErrAdminConfigBadJSON ErrAdminCredentialsMismatch ErrInsecureClientRequest ErrObjectTampered ErrHealNotImplemented ErrHealNoSuchProcess ErrHealInvalidClientToken ErrHealMissingBucket ErrHealAlreadyRunning ErrHealOverlappingPaths ErrIncorrectContinuationToken )
Error codes, non exhaustive list - http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
func DecryptCopyObjectInfo ¶
func DecryptCopyObjectInfo(info *ObjectInfo, headers http.Header) (apiErr APIErrorCode, encrypted bool)
DecryptCopyObjectInfo tries to decrypt the provided object if it is encrypted. It fails if the object is encrypted and the HTTP headers don't contain SSE-C headers or the object is not encrypted but SSE-C headers are provided. (AWS behavior) DecryptObjectInfo returns 'ErrNone' if the object is not encrypted or the decryption succeeded.
DecryptCopyObjectInfo also returns whether the object is encrypted or not.
func DecryptObjectInfo ¶
func DecryptObjectInfo(info *ObjectInfo, headers http.Header) (apiErr APIErrorCode, encrypted bool)
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.
type APIErrorResponse ¶
type APIErrorResponse struct { XMLName xml.Name `xml:"Error" json:"-"` Code string Message string Key string BucketName string Resource string RequestID string `xml:"RequestId" json:"RequestId"` HostID string `xml:"HostId" json:"HostId"` }
APIErrorResponse - error response format
type AdminRPCClient ¶
type AdminRPCClient struct {
*RPCClient
}
AdminRPCClient - admin RPC client talks to admin RPC server.
func NewAdminRPCClient ¶
func NewAdminRPCClient(host *xnet.Host) (*AdminRPCClient, error)
NewAdminRPCClient - returns new admin RPC client.
func (*AdminRPCClient) CommitConfig ¶
func (rpcClient *AdminRPCClient) CommitConfig(tmpFileName string) error
CommitConfig - Move the new config in tmpFileName onto config.json on a remote node.
func (*AdminRPCClient) GetConfig ¶
func (rpcClient *AdminRPCClient) GetConfig() ([]byte, error)
GetConfig - returns config.json of the remote server.
func (*AdminRPCClient) ListLocks ¶
func (rpcClient *AdminRPCClient) ListLocks(bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error)
ListLocks - Sends list locks command to remote server via RPC.
func (*AdminRPCClient) ReInitFormat ¶
func (rpcClient *AdminRPCClient) ReInitFormat(dryRun bool) error
ReInitFormat - re-initialize disk format, remotely.
func (*AdminRPCClient) ServerInfo ¶
func (rpcClient *AdminRPCClient) ServerInfo() (sid ServerInfoData, err error)
ServerInfo - returns the server info of the server to which the RPC call is made.
func (*AdminRPCClient) SignalService ¶
func (rpcClient *AdminRPCClient) SignalService(signal serviceSignal) (err error)
SignalService - calls SignalService RPC.
func (*AdminRPCClient) WriteTmpConfig ¶
func (rpcClient *AdminRPCClient) WriteTmpConfig(tmpFileName string, configBytes []byte) error
WriteTmpConfig - writes config file content to a temporary file on a remote node.
type AllAccessDisabled ¶
type AllAccessDisabled GenericError
AllAccessDisabled All access to this object has been disabled
func (AllAccessDisabled) Error ¶
func (e AllAccessDisabled) Error() string
Return string an error formatted as the given text.
type AppendFileArgs ¶
AppendFileArgs represents append file RPC arguments.
type AuthArgs ¶
type AuthArgs struct { Token string RPCVersion RPCVersion RequestTime time.Time }
AuthArgs - base argument for any RPC call for authentication.
func (AuthArgs) Authenticate ¶
Authenticate - checks if given arguments are valid to allow RPC call. This is xrpc.Authenticator and is called in RPC server.
func (*AuthArgs) SetAuthArgs ¶
SetAuthArgs - sets given authentication arguments to this args. This is called in RPC client.
type BackendDown ¶
type BackendDown struct{}
BackendDown is returned for network errors or if the gateway's backend is down.
func (BackendDown) Error ¶
func (e BackendDown) Error() string
type BackendType ¶
type BackendType int
BackendType - represents different backend types.
const ( Unknown BackendType = iota // Filesystem backend. FS // Multi disk Erasure (single, distributed) backend. Erasure )
Enum for different backend types.
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 // BLAKE2b512 represents the BLAKE2b-256 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 algorihm is a supported and linked into the binary.
func (BitrotAlgorithm) New ¶
func (a BitrotAlgorithm) New() hash.Hash
New returns a new hash.Hash calculating the given bitrot algorithm. New logs error and exits if the algorithm is not supported or not linked into the binary.
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.
type BitrotVerifier ¶
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.
func (*BitrotVerifier) IsVerified ¶
func (v *BitrotVerifier) IsVerified() bool
IsVerified returns true iff Verify was called at least once.
func (*BitrotVerifier) Verify ¶
func (v *BitrotVerifier) Verify() bool
Verify returns true iff the computed checksum of the verifier matches the the checksum provided when the verifier was created.
type BoolFlag ¶
type BoolFlag bool
BoolFlag - wrapper bool type.
func ParseBoolFlag ¶
ParseBoolFlag - parses string into BoolFlag.
func (BoolFlag) MarshalJSON ¶
MarshalJSON - converts BoolFlag into JSON data.
func (*BoolFlag) UnmarshalJSON ¶
UnmarshalJSON - parses given data into BoolFlag.
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 }
BucketInfo - represents bucket metadata.
type BucketNameInvalid ¶
type BucketNameInvalid GenericError
BucketNameInvalid - bucketname provided is invalid.
func (BucketNameInvalid) Error ¶
func (e BucketNameInvalid) Error() string
Return 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 BucketPolicyNotFound ¶
type BucketPolicyNotFound GenericError
BucketPolicyNotFound - no bucket policy found.
func (BucketPolicyNotFound) Error ¶
func (e BucketPolicyNotFound) Error() string
type CacheConfig ¶
type CacheConfig struct { Drives []string `json:"drives"` Expiry int `json:"expiry"` MaxUse int `json:"maxuse"` Exclude []string `json:"exclude"` }
CacheConfig represents cache config settings
func (*CacheConfig) UnmarshalJSON ¶
func (cfg *CacheConfig) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON - implements JSON unmarshal interface for unmarshalling json entries for CacheConfig.
type CacheObjectLayer ¶
type CacheObjectLayer interface { // Bucket operations. ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (result ListObjectsInfo, err error) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error) GetBucketInfo(ctx context.Context, bucket string) (bucketInfo BucketInfo, err error) ListBuckets(ctx context.Context) (buckets []BucketInfo, err error) DeleteBucket(ctx context.Context, bucket string) error // Object operations. GetObject(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string) (err error) GetObjectInfo(ctx context.Context, bucket, object string) (objInfo ObjectInfo, err error) PutObject(ctx context.Context, bucket, object string, data *hash.Reader, metadata map[string]string) (objInfo ObjectInfo, err error) DeleteObject(ctx context.Context, bucket, object string) error // Multipart operations. NewMultipartUpload(ctx context.Context, bucket, object string, metadata map[string]string) (uploadID string, err error) PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *hash.Reader) (info PartInfo, err error) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, uploadedParts []CompletePart) (objInfo ObjectInfo, err error) // Storage operations. StorageInfo(ctx context.Context) CacheStorageInfo }
CacheObjectLayer implements primitives for cache object API layer.
type CacheStorageInfo ¶
type CacheStorageInfo struct { Total uint64 // Total cache disk space. Free uint64 // Free cache available space. }
CacheStorageInfo - represents total, free capacity of underlying cache storage.
type ChecksumInfo ¶
type ChecksumInfo struct { Name string Algorithm BitrotAlgorithm Hash []byte }
ChecksumInfo - carries checksums of individual scattered parts per disk.
func (ChecksumInfo) MarshalJSON ¶
func (c ChecksumInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ChecksumInfo struct
func (*ChecksumInfo) UnmarshalJSON ¶
func (c *ChecksumInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the the given data into the ChecksumInfo struct
type CommitConfigArgs ¶
CommitConfigArgs - wraps the config file name that needs to be committed into config.json on this node.
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 }
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 }
CompletePart - represents the part that was completed, this is sent by the client during CompleteMultipartUpload request.
type CompletedParts ¶
type CompletedParts []CompletePart
CompletedParts - is a collection satisfying sort.Interface.
func (CompletedParts) Len ¶
func (a CompletedParts) Len() int
func (CompletedParts) Less ¶
func (a CompletedParts) Less(i, j int) bool
func (CompletedParts) Swap ¶
func (a CompletedParts) Swap(i, j int)
type ConfigDir ¶
ConfigDir - configuration directory with locking.
func (*ConfigDir) GetMinioConfigFile ¶
GetMinioConfigFile - returns absolute path of config.json file.
func (*ConfigDir) GetPrivateKeyFile ¶
GetPrivateKeyFile - returns absolute path of private.key file.
func (*ConfigDir) GetPublicCertFile ¶
GetPublicCertFile - returns absolute path of public.crt file.
type ConnStats ¶
type ConnStats struct {
// contains filtered or unexported fields
}
ConnStats - Network statistics Count total input/output transferred bytes during the server's life.
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 DecryptBlocksWriter ¶
type DecryptBlocksWriter struct {
// contains filtered or unexported fields
}
DecryptBlocksWriter - decrypts multipart parts, while implementing a io.Writer compatible interface.
func (*DecryptBlocksWriter) Close ¶
func (w *DecryptBlocksWriter) Close() error
Close closes the LimitWriter. It behaves like io.Closer.
type DeleteBucketArgs ¶
DeleteBucketArgs - delete bucket RPC arguments.
type DeleteError ¶
DeleteError structure.
type DeleteFileArgs ¶
DeleteFileArgs represents delete file RPC arguments.
type DeleteObjectsRequest ¶
type DeleteObjectsRequest struct { // Element to enable quiet mode for the request Quiet bool // List of objects to be deleted Objects []ObjectIdentifier `xml:"Object"` }
DeleteObjectsRequest - xml carrying the object key names which needs to be deleted.
type DeleteObjectsResponse ¶
type DeleteObjectsResponse struct { XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ DeleteResult" json:"-"` // Collection of all deleted objects DeletedObjects []ObjectIdentifier `xml:"Deleted,omitempty"` // Collection of errors deleting certain objects. Errors []DeleteError `xml:"Error,omitempty"` }
DeleteObjectsResponse container for multiple object deletes.
type DownloadZipArgs ¶
type DownloadZipArgs struct { Objects []string `json:"objects"` // can be files or sub-directories Prefix string `json:"prefix"` // current directory in the browser-ui BucketName string `json:"bucketname"` // bucket name. }
DownloadZipArgs - Argument for downloading a bunch of files as a zip file. JSON will look like: '{"bucketname":"testbucket","prefix":"john/pics/","objects":["hawaii/","maldives/","sanjose.jpg"]}'
type Endpoint ¶
Endpoint - any type of endpoint.
func NewEndpoint ¶
NewEndpoint - returns new endpoint based on given arguments.
func (Endpoint) Type ¶
func (endpoint Endpoint) Type() EndpointType
Type - returns type of endpoint.
type EndpointList ¶
type EndpointList []Endpoint
EndpointList - list of same type of endpoint.
func NewEndpointList ¶
func NewEndpointList(args ...string) (endpoints EndpointList, err error)
NewEndpointList - returns new endpoint list based on input args.
func (EndpointList) GetString ¶
func (endpoints EndpointList) GetString(i int) string
GetString - returns endpoint string of i-th endpoint (0-based), and empty string for invalid indexes.
func (EndpointList) IsHTTPS ¶
func (endpoints EndpointList) IsHTTPS() bool
IsHTTPS - returns true if secure for URLEndpointType.
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 ErasureFileInfo ¶
type ErasureFileInfo struct { Size int64 Algorithm BitrotAlgorithm Checksums [][]byte }
ErasureFileInfo contains information about an erasure file operation (create, read, heal).
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) AddChecksumInfo ¶
func (e *ErasureInfo) AddChecksumInfo(ckSumInfo ChecksumInfo)
AddChecksumInfo adds a checksum of a part.
func (ErasureInfo) GetChecksumInfo ¶
func (e ErasureInfo) GetChecksumInfo(partName string) (ckSum ChecksumInfo)
GetChecksumInfo - get checksum of a part.
type ErasureStorage ¶
type ErasureStorage struct {
// contains filtered or unexported fields
}
ErasureStorage represents an array of disks. The disks contain erasure coded and bitrot-protected data.
func NewErasureStorage ¶
func NewErasureStorage(ctx context.Context, disks []StorageAPI, dataBlocks, parityBlocks int, blockSize int64) (s ErasureStorage, err error)
NewErasureStorage creates a new ErasureStorage. The storage erasure codes and protects all data written to the disks.
func (*ErasureStorage) CreateFile ¶
func (s *ErasureStorage) CreateFile(ctx context.Context, src io.Reader, volume, path string, buffer []byte, algorithm BitrotAlgorithm, writeQuorum int) (f ErasureFileInfo, err error)
CreateFile creates a new bitrot encoded file spread over all available disks. CreateFile will create the file at the given volume and path. It will read from src until an io.EOF occurs. The given algorithm will be used to protect the erasure encoded file.
func (*ErasureStorage) ErasureDecodeDataAndParityBlocks ¶
func (s *ErasureStorage) ErasureDecodeDataAndParityBlocks(ctx context.Context, data [][]byte) error
ErasureDecodeDataAndParityBlocks decodes the given erasure-coded data and verifies it. It returns an error if the decoding failed.
func (*ErasureStorage) ErasureDecodeDataBlocks ¶
func (s *ErasureStorage) ErasureDecodeDataBlocks(data [][]byte) error
ErasureDecodeDataBlocks 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 (*ErasureStorage) ErasureEncode ¶
ErasureEncode encodes the given data and returns the erasure-coded data. It returns an error if the erasure coding failed.
func (ErasureStorage) HealFile ¶
func (s ErasureStorage) HealFile(ctx context.Context, staleDisks []StorageAPI, volume, path string, blocksize int64, dstVol, dstPath string, size int64, alg BitrotAlgorithm, checksums [][]byte) ( f ErasureFileInfo, err error)
HealFile tries to reconstruct an erasure-coded file spread over all available disks. HealFile will read the valid parts of the file, reconstruct the missing data and write the reconstructed parts back to `staleDisks` at the destination `dstVol/dstPath/`. Parts are verified against the given BitrotAlgorithm and checksums.
`staleDisks` is a slice of disks where each non-nil entry has stale or no data, and so will be healed.
It is required that `s.disks` have a (read-quorum) majority of disks with valid data for healing to work.
In addition, `staleDisks` and `s.disks` must have the same ordering of disks w.r.t. erasure coding of the object.
Errors when writing to `staleDisks` are not propagated as long as writes succeed for at least one disk. This allows partial healing despite stale disks being faulty.
It returns bitrot checksums for the non-nil staleDisks on which healing succeeded.
func (ErasureStorage) ReadFile ¶
func (s ErasureStorage) ReadFile(ctx context.Context, writer io.Writer, volume, path string, offset, length, totalLength int64, checksums [][]byte, algorithm BitrotAlgorithm, blocksize int64) (f ErasureFileInfo, err error)
ReadFile reads as much data as requested from the file under the given volume and path and writes the data to the provided writer. The algorithm and the keys/checksums are used to verify the integrity of the given file. ReadFile will read data from the given offset up to the given length. If parts of the file are corrupted ReadFile tries to reconstruct the data.
type FSChecksumInfoV1 ¶
FSChecksumInfoV1 - carries checksums of individual blocks on disk.
func (FSChecksumInfoV1) MarshalJSON ¶
func (c FSChecksumInfoV1) MarshalJSON() ([]byte, error)
MarshalJSON marshals the FSChecksumInfoV1 struct
func (*FSChecksumInfoV1) UnmarshalJSON ¶
func (c *FSChecksumInfoV1) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the the given data into the FSChecksumInfoV1 struct
type FSObjects ¶
type FSObjects struct {
// contains filtered or unexported fields
}
FSObjects - Implements fs object layer.
func (*FSObjects) AbortMultipartUpload ¶
func (fs *FSObjects) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error
AbortMultipartUpload - aborts an ongoing multipart operation signified by the input uploadID. This is an atomic operation doesn't require clients to initiate multiple such requests.
All parts are purged from all disks and reference to the uploadID would be removed from the system, rollback is not possible on this operation.
Implements S3 compatible Abort multipart API, slight difference is that this is an atomic idempotent operation. Subsequent calls have no affect and further requests to the same uploadID would not be honored.
func (*FSObjects) ClearLocks ¶
func (fs *FSObjects) ClearLocks(ctx context.Context, info []VolumeLockInfo) error
ClearLocks - Clear namespace locks held in object layer
func (*FSObjects) CompleteMultipartUpload ¶
func (fs *FSObjects) CompleteMultipartUpload(ctx context.Context, bucket string, object string, uploadID string, parts []CompletePart) (oi ObjectInfo, e error)
CompleteMultipartUpload - completes an ongoing multipart transaction after receiving all the parts indicated by the client. Returns an md5sum calculated by concatenating all the individual md5sums of all the parts.
Implements S3 compatible Complete multipart API.
func (*FSObjects) CopyObject ¶
func (fs *FSObjects) CopyObject(ctx context.Context, srcBucket, srcObject, dstBucket, dstObject string, srcInfo ObjectInfo) (oi ObjectInfo, e error)
CopyObject - copy object source object to destination object. if source object and destination object are same we only update metadata.
func (*FSObjects) CopyObjectPart ¶
func (fs *FSObjects) CopyObjectPart(ctx context.Context, srcBucket, srcObject, dstBucket, dstObject, uploadID string, partID int, startOffset int64, length int64, srcInfo ObjectInfo) (pi PartInfo, e error)
CopyObjectPart - similar to PutObjectPart but reads data from an existing object. Internally incoming data is written to '.minio.sys/tmp' location and safely renamed to '.minio.sys/multipart' for reach parts.
func (*FSObjects) DeleteBucket ¶
DeleteBucket - delete a bucket and all the metadata associated with the bucket including pending multipart, object metadata.
func (*FSObjects) DeleteBucketPolicy ¶
DeleteBucketPolicy deletes all policies on bucket
func (*FSObjects) DeleteObject ¶
DeleteObject - deletes an object from a bucket, this operation is destructive and there are no rollbacks supported.
func (*FSObjects) GetBucketInfo ¶
GetBucketInfo - fetch bucket metadata info.
func (*FSObjects) GetBucketPolicy ¶
GetBucketPolicy will get policy on bucket
func (*FSObjects) GetObject ¶
func (fs *FSObjects) GetObject(ctx context.Context, bucket, object string, offset int64, length int64, writer io.Writer, etag string) (err error)
GetObject - reads an object from the disk. Supports additional parameters like offset and length which are synonymous with HTTP Range requests.
startOffset indicates the starting read location of the object. length indicates the total length of the object.
func (*FSObjects) GetObjectInfo ¶
func (fs *FSObjects) GetObjectInfo(ctx context.Context, bucket, object string) (oi ObjectInfo, e error)
GetObjectInfo - reads object metadata and replies back ObjectInfo.
func (*FSObjects) HealBucket ¶
func (fs *FSObjects) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error)
HealBucket - no-op for fs, Valid only for XL.
func (*FSObjects) HealFormat ¶
HealFormat - no-op for fs, Valid only for XL.
func (*FSObjects) HealObject ¶
func (fs *FSObjects) HealObject(ctx context.Context, bucket, object string, dryRun bool) ( res madmin.HealResultItem, err error)
HealObject - no-op for fs. Valid only for XL.
func (*FSObjects) IsEncryptionSupported ¶
IsEncryptionSupported returns whether server side encryption is applicable for this layer.
func (*FSObjects) IsNotificationSupported ¶
IsNotificationSupported returns whether bucket notification is applicable for this layer.
func (*FSObjects) ListBuckets ¶
func (fs *FSObjects) ListBuckets(ctx context.Context) ([]BucketInfo, error)
ListBuckets - list all s3 compatible buckets (directories) at fsPath.
func (*FSObjects) ListBucketsHeal ¶
func (fs *FSObjects) ListBucketsHeal(ctx context.Context) ([]BucketInfo, error)
ListBucketsHeal - list all buckets to be healed. Valid only for XL
func (*FSObjects) ListLocks ¶
func (fs *FSObjects) ListLocks(ctx context.Context, bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error)
ListLocks - List namespace locks held in object layer
func (*FSObjects) ListMultipartUploads ¶
func (fs *FSObjects) ListMultipartUploads(ctx context.Context, bucket, object, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (result ListMultipartsInfo, e error)
ListMultipartUploads - lists all the uploadIDs for the specified object. We do not support prefix based listing.
func (*FSObjects) ListObjectParts ¶
func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker, maxParts int) (result ListPartsInfo, e error)
ListObjectParts - lists all previously uploaded parts for a given object and uploadID. Takes additional input of part-number-marker to indicate where the listing should begin from.
Implements S3 compatible ListObjectParts API. The resulting ListPartsInfo structure is unmarshalled directly into XML and replied back to the client.
func (*FSObjects) ListObjects ¶
func (fs *FSObjects) ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)
ListObjects - list all objects at prefix upto maxKeys., optionally delimited by '/'. Maintains the list pool state for future re-entrant list requests.
func (*FSObjects) ListObjectsHeal ¶
func (fs *FSObjects) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)
ListObjectsHeal - list all objects to be healed. Valid only for XL
func (*FSObjects) ListObjectsV2 ¶
func (fs *FSObjects) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error)
ListObjectsV2 lists all blobs in bucket filtered by prefix
func (*FSObjects) MakeBucketWithLocation ¶
MakeBucketWithLocation - create a new bucket, returns if it already exists.
func (*FSObjects) NewMultipartUpload ¶
func (fs *FSObjects) NewMultipartUpload(ctx context.Context, bucket, object string, meta map[string]string) (string, error)
NewMultipartUpload - initialize a new multipart upload, returns a unique id. The unique id returned here is of UUID form, for each subsequent request each UUID is unique.
Implements S3 compatible initiate multipart API.
func (*FSObjects) PutObject ¶
func (fs *FSObjects) PutObject(ctx context.Context, bucket string, object string, data *hash.Reader, metadata map[string]string) (objInfo ObjectInfo, retErr error)
PutObject - creates an object upon reading from the input stream until EOF, writes data directly to configured filesystem path. Additionally writes `fs.json` which carries the necessary metadata for future object operations.
func (*FSObjects) PutObjectPart ¶
func (fs *FSObjects) PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *hash.Reader) (pi PartInfo, e error)
PutObjectPart - reads incoming data until EOF for the part file on an ongoing multipart transaction. Internally incoming data is written to '.minio.sys/tmp' location and safely renamed to '.minio.sys/multipart' for reach parts.
func (*FSObjects) ReloadFormat ¶
ReloadFormat - no-op for fs, Valid only for XL.
func (*FSObjects) SetBucketPolicy ¶
func (fs *FSObjects) SetBucketPolicy(ctx context.Context, bucket string, policy *policy.Policy) error
SetBucketPolicy sets policy on bucket
func (*FSObjects) StorageInfo ¶
func (fs *FSObjects) StorageInfo(ctx context.Context) StorageInfo
StorageInfo - returns underlying storage statistics.
type FileInfo ¶
type FileInfo struct { // Name of the volume. Volume string // Name of the file. Name string // Date and time when the file was last modified. ModTime time.Time // Total file size. Size int64 // File mode bits. Mode os.FileMode }
FileInfo - represents file stat information.
type FileLogger ¶
FileLogger is introduced to workaround the dependency about logrus
type Gateway ¶
type Gateway interface { // Name returns the unique name of the gateway. Name() string // NewGatewayLayer returns a new ObjectLayer. NewGatewayLayer(creds auth.Credentials) (ObjectLayer, error) // Returns true if gateway is ready for production. Production() bool }
Gateway represents a gateway backend.
type GatewayUnsupported ¶
type GatewayUnsupported struct{}
GatewayUnsupported list of unsupported call stubs for gateway.
func (GatewayUnsupported) AbortMultipartUpload ¶
func (a GatewayUnsupported) AbortMultipartUpload(ctx context.Context, bucket string, object string, uploadID string) error
AbortMultipartUpload aborts a ongoing multipart upload
func (GatewayUnsupported) ClearLocks ¶
func (a GatewayUnsupported) ClearLocks(ctx context.Context, info []VolumeLockInfo) error
ClearLocks clears namespace locks held in object layer
func (GatewayUnsupported) CompleteMultipartUpload ¶
func (a GatewayUnsupported) CompleteMultipartUpload(ctx context.Context, bucket string, object string, uploadID string, uploadedParts []CompletePart) (oi ObjectInfo, err error)
CompleteMultipartUpload completes ongoing multipart upload and finalizes object
func (GatewayUnsupported) CopyObject ¶
func (a GatewayUnsupported) CopyObject(ctx context.Context, srcBucket string, srcObject string, destBucket string, destObject string, srcInfo ObjectInfo) (objInfo ObjectInfo, err error)
CopyObject copies a blob from source container to destination container.
func (GatewayUnsupported) CopyObjectPart ¶
func (a GatewayUnsupported) CopyObjectPart(ctx context.Context, srcBucket, srcObject, destBucket, destObject, uploadID string, partID int, startOffset, length int64, srcInfo ObjectInfo) (pi PartInfo, err error)
CopyObjectPart copy part of object to uploadID for another object
func (GatewayUnsupported) DeleteBucketPolicy ¶
func (a GatewayUnsupported) DeleteBucketPolicy(ctx context.Context, bucket string) error
DeleteBucketPolicy deletes all policies on bucket
func (GatewayUnsupported) GetBucketPolicy ¶
func (a GatewayUnsupported) GetBucketPolicy(ctx context.Context, bucket string) (bucketPolicy *policy.Policy, err error)
GetBucketPolicy will get policy on bucket
func (GatewayUnsupported) HealBucket ¶
func (a GatewayUnsupported) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error)
HealBucket - Not implemented stub
func (GatewayUnsupported) HealFormat ¶
func (a GatewayUnsupported) HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error)
HealFormat - Not implemented stub
func (GatewayUnsupported) HealObject ¶
func (a GatewayUnsupported) HealObject(ctx context.Context, bucket, object string, dryRun bool) (h madmin.HealResultItem, e error)
HealObject - Not implemented stub
func (GatewayUnsupported) IsEncryptionSupported ¶
func (a GatewayUnsupported) IsEncryptionSupported() bool
IsEncryptionSupported returns whether server side encryption is applicable for this layer.
func (GatewayUnsupported) IsNotificationSupported ¶
func (a GatewayUnsupported) IsNotificationSupported() bool
IsNotificationSupported returns whether bucket notification is applicable for this layer.
func (GatewayUnsupported) ListBucketsHeal ¶
func (a GatewayUnsupported) ListBucketsHeal(ctx context.Context) (buckets []BucketInfo, err error)
ListBucketsHeal - Not implemented stub
func (GatewayUnsupported) ListLocks ¶
func (a GatewayUnsupported) ListLocks(ctx context.Context, bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error)
ListLocks lists namespace locks held in object layer
func (GatewayUnsupported) ListMultipartUploads ¶
func (a GatewayUnsupported) ListMultipartUploads(ctx context.Context, bucket string, prefix string, keyMarker string, uploadIDMarker string, delimiter string, maxUploads int) (lmi ListMultipartsInfo, err error)
ListMultipartUploads lists all multipart uploads.
func (GatewayUnsupported) ListObjectParts ¶
func (a GatewayUnsupported) ListObjectParts(ctx context.Context, bucket string, object string, uploadID string, partNumberMarker int, maxParts int) (lpi ListPartsInfo, err error)
ListObjectParts returns all object parts for specified object in specified bucket
func (GatewayUnsupported) ListObjectsHeal ¶
func (a GatewayUnsupported) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (loi ListObjectsInfo, e error)
ListObjectsHeal - Not implemented stub
func (GatewayUnsupported) ListObjectsV2 ¶
func (a GatewayUnsupported) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error)
ListObjectsV2 - Not implemented stub
func (GatewayUnsupported) NewMultipartUpload ¶
func (a GatewayUnsupported) NewMultipartUpload(ctx context.Context, bucket string, object string, metadata map[string]string) (uploadID string, err error)
NewMultipartUpload upload object in multiple parts
func (GatewayUnsupported) PutObjectPart ¶
func (a GatewayUnsupported) PutObjectPart(ctx context.Context, bucket string, object string, uploadID string, partID int, data *hash.Reader) (pi PartInfo, err error)
PutObjectPart puts a part of object in bucket
func (GatewayUnsupported) RefreshBucketPolicy ¶
func (a GatewayUnsupported) RefreshBucketPolicy(ctx context.Context, bucket string) error
RefreshBucketPolicy refreshes cache policy with what's on disk.
func (GatewayUnsupported) ReloadFormat ¶
func (a GatewayUnsupported) ReloadFormat(ctx context.Context, dryRun bool) error
ReloadFormat - Not implemented stub.
func (GatewayUnsupported) SetBucketPolicy ¶
func (a GatewayUnsupported) SetBucketPolicy(ctx context.Context, bucket string, bucketPolicy *policy.Policy) error
SetBucketPolicy sets policy on bucket
type GenerateAuthReply ¶
type GenerateAuthReply struct { AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` UIVersion string `json:"uiVersion"` }
GenerateAuthReply - reply for GenerateAuth
type GenericError ¶
GenericError - generic object layer error.
type GetAuthReply ¶
type GetAuthReply struct { AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` UIVersion string `json:"uiVersion"` }
GetAuthReply - Reply current credentials.
type GetBucketPolicyArgs ¶
type GetBucketPolicyArgs struct { BucketName string `json:"bucketName"` Prefix string `json:"prefix"` }
GetBucketPolicyArgs - get bucket policy args.
type GetBucketPolicyRep ¶
type GetBucketPolicyRep struct { UIVersion string `json:"uiVersion"` Policy miniogopolicy.BucketPolicy `json:"policy"` }
GetBucketPolicyRep - get bucket policy reply.
type HTTPMethodStats ¶
HTTPMethodStats holds statistics information about a given HTTP method made by all clients
type HTTPStats ¶
type HTTPStats struct {
// contains filtered or unexported fields
}
HTTPStats holds statistics information about HTTP requests made by all clients
type HandlerFunc ¶
HandlerFunc - useful to chain different middleware http.Handler
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
Return 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 InsufficientReadQuorum ¶
type InsufficientReadQuorum struct{}
InsufficientReadQuorum storage cannot satisfy quorum for read operation.
func (InsufficientReadQuorum) Error ¶
func (e InsufficientReadQuorum) Error() string
type InsufficientWriteQuorum ¶
type InsufficientWriteQuorum struct{}
InsufficientWriteQuorum storage cannot satisfy quorum for write operation.
func (InsufficientWriteQuorum) Error ¶
func (e InsufficientWriteQuorum) 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 InvalidMarkerPrefixCombination ¶
type InvalidMarkerPrefixCombination struct {
Marker, Prefix string
}
InvalidMarkerPrefixCombination - invalid marker and prefix combination.
func (InvalidMarkerPrefixCombination) Error ¶
func (e InvalidMarkerPrefixCombination) Error() string
type InvalidPart ¶
type InvalidPart struct{}
InvalidPart One or more of the specified parts could not be found
func (InvalidPart) Error ¶
func (e InvalidPart) Error() string
type InvalidRange ¶
InvalidRange - invalid range typed error.
func (InvalidRange) Error ¶
func (e InvalidRange) Error() string
type InvalidUploadID ¶
type InvalidUploadID struct {
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 ¶
func (e InvalidUploadIDKeyCombination) Error() string
type ListAllBucketPoliciesArgs ¶
type ListAllBucketPoliciesArgs struct {
BucketName string `json:"bucketName"`
}
ListAllBucketPoliciesArgs - get all bucket policies.
type ListAllBucketPoliciesRep ¶
type ListAllBucketPoliciesRep struct { UIVersion string `json:"uiVersion"` Policies []BucketAccessPolicy `json:"policies"` }
ListAllBucketPoliciesRep - get all bucket policy reply.
type ListBucketsRep ¶
type ListBucketsRep struct { Buckets []WebBucketInfo `json:"buckets"` UIVersion string `json:"uiVersion"` }
ListBucketsRep - list buckets response
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 ListDirArgs ¶
ListDirArgs represents list contents RPC arguments.
type ListLocksQuery ¶
ListLocksQuery - wraps ListLocks API's query values to send over RPC.
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 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 FromMinioClientListMultipartsInfo ¶
func FromMinioClientListMultipartsInfo(lmur minio.ListMultipartUploadsResult) ListMultipartsInfo
FromMinioClientListMultipartsInfo converts minio ListMultipartUploadsResult to ListMultipartsInfo
type ListObjectsArgs ¶
type ListObjectsArgs struct { BucketName string `json:"bucketName"` Prefix string `json:"prefix"` Marker string `json:"marker"` }
ListObjectsArgs - list object args.
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: This element is returned only if you have delimiter request parameter // specified. NextMarker string // List of objects info for this request. Objects []ObjectInfo // List of prefixes for this request. Prefixes []string }
ListObjectsInfo - container for list objects.
func FromMinioClientListBucketResult ¶
func FromMinioClientListBucketResult(bucket string, result minio.ListBucketResult) ListObjectsInfo
FromMinioClientListBucketResult converts minio ListBucketResult to ListObjectsInfo
type ListObjectsRep ¶
type ListObjectsRep struct { Objects []WebObjectInfo `json:"objects"` NextMarker string `json:"nextmarker"` IsTruncated bool `json:"istruncated"` Writable bool `json:"writable"` // Used by client to show "upload file" button. UIVersion string `json:"uiVersion"` }
ListObjectsRep - list objects response.
type ListObjectsResponse ¶
type ListObjectsResponse struct { XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult" json:"-"` Name string Prefix string Marker string // When response is truncated (the IsTruncated element value in the response // is true), you can use the key name in this field as marker in the subsequent // request to get next set of objects. Server lists objects in alphabetical // order Note: This element is returned only if you have delimiter request parameter // specified. If response does not include the NextMaker and it is truncated, // you can use the value of the last Key in the response as the marker in the // subsequent request to get the next set of object keys. NextMarker string `xml:"NextMarker,omitempty"` MaxKeys int Delimiter string // A flag that indicates whether or not ListObjects returned all of the results // that satisfied the search criteria. IsTruncated bool Contents []Object CommonPrefixes []CommonPrefix // Encoding type used to encode object keys in the response. EncodingType string `xml:"EncodingType,omitempty"` }
ListObjectsResponse - format for list objects response.
type ListObjectsV2Info ¶
type ListObjectsV2Info struct { // Indicates whether the returned list objects response is truncated. A // value of true indicates that the list was truncated. The list can be truncated // if the number of objects exceeds the limit allowed or specified // by max keys. IsTruncated bool // When response is truncated (the IsTruncated element value in the response // is true), you can use the key name in this field as marker in the subsequent // request to get next set of objects. // // NOTE: This element is returned only if you have delimiter request parameter // specified. ContinuationToken string NextContinuationToken string // List of objects info for this request. Objects []ObjectInfo // List of prefixes for this request. Prefixes []string }
ListObjectsV2Info - container for list objects version 2.
func FromMinioClientListBucketResultToV2Info ¶
func FromMinioClientListBucketResultToV2Info(bucket string, result minio.ListBucketResult) ListObjectsV2Info
FromMinioClientListBucketResultToV2Info converts minio ListBucketResult to ListObjectsV2Info
func FromMinioClientListBucketV2Result ¶
func FromMinioClientListBucketV2Result(bucket string, result minio.ListBucketV2Result) ListObjectsV2Info
FromMinioClientListBucketV2Result converts minio ListBucketResult to ListObjectsInfo
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 // 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 EncodingType string // Not supported yet. }
ListPartsInfo - represents list of all parts.
func FromMinioClientListPartsInfo ¶
func FromMinioClientListPartsInfo(lopr minio.ListObjectPartsResult) ListPartsInfo
FromMinioClientListPartsInfo converts minio ListObjectPartsResult to ListPartsInfo
func (*ListPartsInfo) IsEncrypted ¶
func (li *ListPartsInfo) IsEncrypted() bool
IsEncrypted returns true if the object is marked as encrypted.
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 // List of parts. Parts []Part `xml:"Part"` }
ListPartsResponse - format for list parts response.
type ListenBucketNotificationArgs ¶
type ListenBucketNotificationArgs struct { AuthArgs `json:"-"` BucketName string `json:"-"` EventNames []event.Name `json:"eventNames"` Pattern string `json:"pattern"` TargetID event.TargetID `json:"targetId"` Addr xnet.Host `json:"addr"` }
ListenBucketNotificationArgs - listen bucket notification RPC arguments.
type LocationResponse ¶
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 LockInfoOpsIDNotFound ¶
type LockInfoOpsIDNotFound struct {
// contains filtered or unexported fields
}
LockInfoOpsIDNotFound - represents error when lock info entry for a given operation ID doesn't exist.
func (LockInfoOpsIDNotFound) Error ¶
func (l LockInfoOpsIDNotFound) Error() string
type LockInfoOriginMismatch ¶
type LockInfoOriginMismatch struct {
// contains filtered or unexported fields
}
LockInfoOriginMismatch - represents error when lock origin don't match.
func (LockInfoOriginMismatch) Error ¶
func (l LockInfoOriginMismatch) Error() string
type LockInfoStateNotBlocked ¶
type LockInfoStateNotBlocked struct {
// contains filtered or unexported fields
}
LockInfoStateNotBlocked - represents error when lock info isn't in blocked state when it should be.
func (LockInfoStateNotBlocked) Error ¶
func (l LockInfoStateNotBlocked) Error() string
type LockInfoVolPathMissing ¶
type LockInfoVolPathMissing struct {
// contains filtered or unexported fields
}
LockInfoVolPathMissing - represents error when lock information is missing for a given (volume, path).
func (LockInfoVolPathMissing) Error ¶
func (l LockInfoVolPathMissing) Error() string
type LockRPCClient ¶
type LockRPCClient struct {
*RPCClient
}
LockRPCClient is authenticable lock RPC client compatible to dsync.NetLocker
func NewLockRPCClient ¶
func NewLockRPCClient(host *xnet.Host) (*LockRPCClient, error)
NewLockRPCClient - returns new lock RPC client.
func (*LockRPCClient) Expired ¶
func (lockRPC *LockRPCClient) Expired(args dsync.LockArgs) (reply bool, err error)
Expired calls expired RPC.
func (*LockRPCClient) ForceUnlock ¶
func (lockRPC *LockRPCClient) ForceUnlock(args dsync.LockArgs) (reply bool, err error)
ForceUnlock calls force unlock RPC.
func (*LockRPCClient) Lock ¶
func (lockRPC *LockRPCClient) Lock(args dsync.LockArgs) (reply bool, err error)
Lock calls write lock RPC.
func (*LockRPCClient) RLock ¶
func (lockRPC *LockRPCClient) RLock(args dsync.LockArgs) (reply bool, err error)
RLock calls read lock RPC.
func (*LockRPCClient) RUnlock ¶
func (lockRPC *LockRPCClient) RUnlock(args dsync.LockArgs) (reply bool, err error)
RUnlock calls read unlock RPC.
func (*LockRPCClient) ServerAddr ¶
func (lockRPC *LockRPCClient) ServerAddr() string
ServerAddr - dsync.NetLocker interface compatible method.
func (*LockRPCClient) ServiceEndpoint ¶
func (lockRPC *LockRPCClient) ServiceEndpoint() string
ServiceEndpoint - dsync.NetLocker interface compatible method.
type LoginArgs ¶
type LoginArgs struct { Username string `json:"username" form:"username"` Password string `json:"password" form:"password"` }
LoginArgs - login arguments.
type MakeBucketArgs ¶
type MakeBucketArgs struct {
BucketName string `json:"bucketName"`
}
MakeBucketArgs - make bucket args.
type MalformedUploadID ¶
type MalformedUploadID struct {
UploadID string
}
MalformedUploadID malformed upload id.
func (MalformedUploadID) Error ¶
func (e MalformedUploadID) Error() string
type MultipartInfo ¶
type MultipartInfo struct { // Object name for which the multipart upload was initiated. Object string // Unique identifier for this multipart upload. UploadID string // Date and time at which the multipart upload was initiated. Initiated time.Time StorageClass string // Not supported yet. }
MultipartInfo - represents metadata in progress multipart upload.
type NotImplemented ¶
type NotImplemented struct{}
NotImplemented If a feature is not implemented
func (NotImplemented) Error ¶
func (e NotImplemented) Error() string
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 ¶
NotificationSys - notification system.
func NewNotificationSys ¶
func NewNotificationSys(config *serverConfig, endpoints EndpointList) (*NotificationSys, error)
NewNotificationSys - creates new notification system object.
func (*NotificationSys) AddRemoteTarget ¶
func (sys *NotificationSys) AddRemoteTarget(bucketName string, target event.Target, rulesMap event.RulesMap) error
AddRemoteTarget - adds event rules map, HTTP/PeerRPC client target to bucket name.
func (*NotificationSys) AddRulesMap ¶
func (sys *NotificationSys) AddRulesMap(bucketName string, rulesMap event.RulesMap)
AddRulesMap - adds rules map for bucket name.
func (*NotificationSys) DeleteBucket ¶
func (sys *NotificationSys) DeleteBucket(bucketName string) <-chan NotificationPeerErr
DeleteBucket - calls DeleteBucket RPC call on all peers.
func (*NotificationSys) GetARNList ¶
func (sys *NotificationSys) GetARNList() []string
GetARNList - returns available ARNs.
func (*NotificationSys) GetPeerRPCClient ¶
func (sys *NotificationSys) GetPeerRPCClient(addr xnet.Host) *PeerRPCClient
GetPeerRPCClient - returns PeerRPCClient of addr.
func (*NotificationSys) Init ¶
func (sys *NotificationSys) Init(objAPI ObjectLayer) error
Init - initializes notification system from notification.xml and listener.json of all buckets.
func (*NotificationSys) ListenBucketNotification ¶
func (sys *NotificationSys) ListenBucketNotification(bucketName string, eventNames []event.Name, pattern string, targetID event.TargetID, localPeer xnet.Host) <-chan NotificationPeerErr
ListenBucketNotification - calls ListenBucketNotification RPC call on all peers.
func (*NotificationSys) PutBucketNotification ¶
func (sys *NotificationSys) PutBucketNotification(bucketName string, rulesMap event.RulesMap) <-chan NotificationPeerErr
PutBucketNotification - calls PutBucketNotification RPC call on all peers.
func (*NotificationSys) RemoteTargetExist ¶
func (sys *NotificationSys) RemoteTargetExist(bucketName string, targetID event.TargetID) bool
RemoteTargetExist - checks whether given target ID is a HTTP/PeerRPC client target or not.
func (*NotificationSys) RemoveAllRemoteTargets ¶
func (sys *NotificationSys) RemoveAllRemoteTargets()
RemoveAllRemoteTargets - closes and removes all HTTP/PeerRPC client targets.
func (*NotificationSys) RemoveBucketPolicy ¶
func (sys *NotificationSys) RemoveBucketPolicy(bucketName string) <-chan NotificationPeerErr
RemoveBucketPolicy - calls RemoveBucketPolicy RPC call on all peers.
func (*NotificationSys) RemoveNotification ¶
func (sys *NotificationSys) RemoveNotification(bucketName string)
RemoveNotification - removes all notification configuration for bucket name.
func (*NotificationSys) RemoveRemoteTarget ¶
func (sys *NotificationSys) RemoveRemoteTarget(bucketName string, targetID event.TargetID)
RemoveRemoteTarget - closes and removes target by target ID.
func (*NotificationSys) RemoveRulesMap ¶
func (sys *NotificationSys) RemoveRulesMap(bucketName string, rulesMap event.RulesMap)
RemoveRulesMap - removes rules map for bucket name.
func (*NotificationSys) Send ¶
func (sys *NotificationSys) Send(args eventArgs) []event.TargetIDErr
Send - sends event data to all matching targets.
func (*NotificationSys) SetBucketPolicy ¶
func (sys *NotificationSys) SetBucketPolicy(bucketName string, bucketPolicy *policy.Policy) <-chan NotificationPeerErr
SetBucketPolicy - calls SetBucketPolicy RPC call on all peers.
func (*NotificationSys) SetCredentials ¶
func (sys *NotificationSys) SetCredentials(credentials auth.Credentials) map[xnet.Host]error
SetCredentials - calls SetCredentials RPC call on all peers.
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 // The class of storage used to store the object. StorageClass string }
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 ObjectIdentifier ¶
type ObjectIdentifier struct {
ObjectName string `xml:"Key"`
}
ObjectIdentifier carries key name for the object to delete.
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 // IsDir indicates if the object is prefix. IsDir bool // Hex encoded unique entity tag of the object. ETag string // A standard MIME type describing the format of the object. ContentType string // Specifies what content encodings have been applied to the object and thus // what decoding mechanisms must be applied to obtain the object referenced // by the Content-Type header field. ContentEncoding string // Specify object storage class StorageClass string // User-Defined metadata UserDefined map[string]string // List of individual parts, maximum size of upto 10,000 Parts []objectPartInfo `json:"-"` // Implements writer and reader used by CopyObject API Writer io.WriteCloser `json:"-"` Reader *hash.Reader `json:"-"` // Date and time when the object was last accessed. AccTime time.Time // contains filtered or unexported fields }
ObjectInfo - represents object metadata.
func FromMinioClientObjectInfo ¶
func FromMinioClientObjectInfo(bucket string, oi minio.ObjectInfo) ObjectInfo
FromMinioClientObjectInfo converts minio ObjectInfo to gateway 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) IsEncrypted ¶
func (o *ObjectInfo) IsEncrypted() bool
IsEncrypted returns true if the object is marked as encrypted.
func (*ObjectInfo) IsEncryptedMultipart ¶
func (o *ObjectInfo) IsEncryptedMultipart() bool
IsEncryptedMultipart - is the encrypted content multiparted?
type ObjectLayer ¶
type ObjectLayer interface { // Storage operations. Shutdown(context.Context) error StorageInfo(context.Context) StorageInfo // Bucket operations. MakeBucketWithLocation(ctx context.Context, bucket string, location string) error GetBucketInfo(ctx context.Context, bucket string) (bucketInfo BucketInfo, err error) ListBuckets(ctx context.Context) (buckets []BucketInfo, err error) DeleteBucket(ctx context.Context, bucket string) error ListObjects(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (result ListObjectsInfo, err error) ListObjectsV2(ctx context.Context, bucket, prefix, continuationToken, delimiter string, maxKeys int, fetchOwner bool, startAfter string) (result ListObjectsV2Info, err error) // Object operations. GetObject(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string) (err error) GetObjectInfo(ctx context.Context, bucket, object string) (objInfo ObjectInfo, err error) PutObject(ctx context.Context, bucket, object string, data *hash.Reader, metadata map[string]string) (objInfo ObjectInfo, err error) CopyObject(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, srcInfo ObjectInfo) (objInfo ObjectInfo, err error) DeleteObject(ctx context.Context, bucket, object string) error // Multipart operations. ListMultipartUploads(ctx context.Context, bucket, prefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (result ListMultipartsInfo, err error) NewMultipartUpload(ctx context.Context, bucket, object string, metadata map[string]string) (uploadID string, err error) CopyObjectPart(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, uploadID string, partID int, startOffset int64, length int64, srcInfo ObjectInfo) (info PartInfo, err error) PutObjectPart(ctx context.Context, bucket, object, uploadID string, partID int, data *hash.Reader) (info PartInfo, err error) ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker int, maxParts int) (result ListPartsInfo, err error) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string) error CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, uploadedParts []CompletePart) (objInfo ObjectInfo, err error) // Healing operations. ReloadFormat(ctx context.Context, dryRun bool) error HealFormat(ctx context.Context, dryRun bool) (madmin.HealResultItem, error) HealBucket(ctx context.Context, bucket string, dryRun bool) ([]madmin.HealResultItem, error) HealObject(ctx context.Context, bucket, object string, dryRun bool) (madmin.HealResultItem, error) ListBucketsHeal(ctx context.Context) (buckets []BucketInfo, err error) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, error) // Locking operations ListLocks(ctx context.Context, bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error) ClearLocks(context.Context, []VolumeLockInfo) error // Policy operations SetBucketPolicy(context.Context, string, *policy.Policy) error GetBucketPolicy(context.Context, string) (*policy.Policy, error) DeleteBucketPolicy(context.Context, string) error // Supported operations check IsNotificationSupported() bool IsEncryptionSupported() bool }
ObjectLayer implements primitives for object API layer.
func NewFSObjectLayer ¶
func NewFSObjectLayer(fsPath string) (ObjectLayer, error)
NewFSObjectLayer - initialize new fs object layer.
type ObjectNameInvalid ¶
type ObjectNameInvalid GenericError
ObjectNameInvalid - object name provided is invalid.
func (ObjectNameInvalid) Error ¶
func (e ObjectNameInvalid) Error() string
Return 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 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 OperationTimedOut ¶
type OperationTimedOut struct {
Path string
}
OperationTimedOut - a timeout occurred.
func (OperationTimedOut) Error ¶
func (e OperationTimedOut) Error() string
type OpsLockState ¶
type OpsLockState struct { OperationID string `json:"id"` // String containing operation ID. LockSource string `json:"source"` // Operation type (GetObject, PutObject...) LockType lockType `json:"type"` // Lock type (RLock, WLock) Status statusType `json:"status"` // Status can be Running/Ready/Blocked. Since time.Time `json:"since"` // Time when the lock was initially held. }
OpsLockState - structure to fill in state information of the lock. structure to fill in status information for each operation with given operation ID.
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 }
PartInfo - represents individual part metadata.
func FromMinioClientObjectPart ¶
func FromMinioClientObjectPart(op minio.ObjectPart) PartInfo
FromMinioClientObjectPart converts minio ObjectPart to PartInfo
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 ¶
PartTooSmall - error if part size is less than 5MB.
func (PartTooSmall) Error ¶
func (e PartTooSmall) Error() string
type PartsSizeUnequal ¶
type PartsSizeUnequal struct{}
PartsSizeUnequal - All parts except the last part should be of the same size
func (PartsSizeUnequal) Error ¶
func (e PartsSizeUnequal) Error() string
type PeerRPCClient ¶
type PeerRPCClient struct {
*RPCClient
}
PeerRPCClient - peer RPC client talks to peer RPC server.
func NewPeerRPCClient ¶
func NewPeerRPCClient(host *xnet.Host) (*PeerRPCClient, error)
NewPeerRPCClient - returns new peer RPC client.
func (*PeerRPCClient) DeleteBucket ¶
func (rpcClient *PeerRPCClient) DeleteBucket(bucketName string) error
DeleteBucket - calls delete bucket RPC.
func (*PeerRPCClient) ListenBucketNotification ¶
func (rpcClient *PeerRPCClient) ListenBucketNotification(bucketName string, eventNames []event.Name, pattern string, targetID event.TargetID, addr xnet.Host) error
ListenBucketNotification - calls listen bucket notification RPC.
func (*PeerRPCClient) PutBucketNotification ¶
func (rpcClient *PeerRPCClient) PutBucketNotification(bucketName string, rulesMap event.RulesMap) error
PutBucketNotification - calls put bukcet notification RPC.
func (*PeerRPCClient) RemoteTargetExist ¶
func (rpcClient *PeerRPCClient) RemoteTargetExist(bucketName string, targetID event.TargetID) (bool, error)
RemoteTargetExist - calls remote target ID exist RPC.
func (*PeerRPCClient) RemoveBucketPolicy ¶
func (rpcClient *PeerRPCClient) RemoveBucketPolicy(bucketName string) error
RemoveBucketPolicy - calls remove bucket policy RPC.
func (*PeerRPCClient) SendEvent ¶
func (rpcClient *PeerRPCClient) SendEvent(bucketName string, targetID, remoteTargetID event.TargetID, eventData event.Event) error
SendEvent - calls send event RPC.
func (*PeerRPCClient) SetBucketPolicy ¶
func (rpcClient *PeerRPCClient) SetBucketPolicy(bucketName string, bucketPolicy *policy.Policy) error
SetBucketPolicy - calls set bucket policy RPC.
func (*PeerRPCClient) SetCredentials ¶
func (rpcClient *PeerRPCClient) SetCredentials(credentials auth.Credentials) error
SetCredentials - calls set credentials RPC.
type PeerRPCClientTarget ¶
type PeerRPCClientTarget struct {
// contains filtered or unexported fields
}
PeerRPCClientTarget - RPCClient is an event.Target which sends event to target of remote peer.
func NewPeerRPCClientTarget ¶
func NewPeerRPCClientTarget(bucketName string, targetID event.TargetID, rpcClient *PeerRPCClient) *PeerRPCClientTarget
NewPeerRPCClientTarget - creates RPCClient target with given target ID available in remote peer.
func (*PeerRPCClientTarget) Close ¶
func (target *PeerRPCClientTarget) Close() error
Close - does nothing and available for interface compatibility.
func (*PeerRPCClientTarget) ID ¶
func (target *PeerRPCClientTarget) ID() event.TargetID
ID - returns target ID.
type PolicyNesting ¶
type PolicyNesting struct{}
PolicyNesting - policy nesting conflict.
func (PolicyNesting) Error ¶
func (e PolicyNesting) Error() string
type PolicySys ¶
PolicySys - policy subsystem.
func (*PolicySys) Init ¶
func (sys *PolicySys) Init(objAPI ObjectLayer) error
Init - initializes policy system from policy.json of all buckets.
func (*PolicySys) IsAllowed ¶
IsAllowed - checks given policy args is allowed to continue the Rest API.
type PostPolicyForm ¶
type PostPolicyForm struct { Expiration time.Time // Expiration date and time of the POST policy. Conditions struct { Policies map[string]struct { Operator string Value string } ContentLengthRange contentLengthRange } }
PostPolicyForm provides strict static type conversion and validation for Amazon S3's POST policy JSON string.
type PostResponse ¶
PostResponse container for POST object request when success_action_status is set to 201
type PrefixAccessDenied ¶
type PrefixAccessDenied GenericError
PrefixAccessDenied object access is denied.
func (PrefixAccessDenied) Error ¶
func (e PrefixAccessDenied) Error() string
type PrepareFileArgs ¶
PrepareFileArgs represents append file RPC arguments.
type PresignedGetArgs ¶
type PresignedGetArgs struct { // Host header required for signed headers. HostName string `json:"host"` // Bucket name of the object to be presigned. BucketName string `json:"bucket"` // Object name to be presigned. ObjectName string `json:"object"` // Expiry in seconds. Expiry int64 `json:"expiry"` }
PresignedGetArgs - presigned-get API args.
type PresignedGetRep ¶
type PresignedGetRep struct { UIVersion string `json:"uiVersion"` // Presigned URL of the object. URL string `json:"url"` }
PresignedGetRep - presigned-get URL reply.
type PutBucketNotificationArgs ¶
PutBucketNotificationArgs - put bucket notification RPC arguments.
type RPCClient ¶
RPCClient - base RPC client.
func NewRPCClient ¶
func NewRPCClient(args RPCClientArgs) (*RPCClient, error)
NewRPCClient - returns new RPC client.
func (*RPCClient) Call ¶
func (client *RPCClient) Call(serviceMethod string, args interface { SetAuthArgs(args AuthArgs) }, reply interface{}) (err error)
Call - calls servicemethod on remote server.
func (*RPCClient) ServiceURL ¶
ServiceURL - returns service URL used for RPC call.
type RPCClientArgs ¶
type RPCClientArgs struct { NewAuthTokenFunc func() string RPCVersion RPCVersion ServiceName string ServiceURL *xnet.URL TLSConfig *tls.Config }
RPCClientArgs - RPC client arguments.
type RPCVersion ¶
RPCVersion - RPC semantic version based on semver 2.0.0 https://semver.org/.
func (RPCVersion) Compare ¶
func (v RPCVersion) Compare(o RPCVersion) int
Compare - compares given version with this version.
func (RPCVersion) String ¶
func (v RPCVersion) String() string
type RWLocker ¶
type RWLocker interface { GetLock(timeout *dynamicTimeout) (timedOutErr error) Unlock() GetRLock(timeout *dynamicTimeout) (timedOutErr error) RUnlock() }
RWLocker - locker interface to introduce GetRLock, RUnlock.
type RWLockerSync ¶
type RWLockerSync interface { GetLock(timeout time.Duration) bool Unlock() GetRLock(timeout time.Duration) bool RUnlock() }
RWLockerSync - internal locker interface.
type ReInitFormatArgs ¶
ReInitFormatArgs - provides dry-run information to re-initialize format.json
type ReadAllArgs ¶
ReadAllArgs represents read all RPC arguments.
type ReadFileArgs ¶
type ReadFileArgs struct { AuthArgs Vol string Path string Offset int64 Buffer []byte Algo BitrotAlgorithm ExpectedHash []byte Verified bool }
ReadFileArgs represents read file RPC arguments.
type RemoteTargetExistArgs ¶
RemoteTargetExistArgs - remote target ID exist RPC arguments.
type RemoveBucketArgs ¶
type RemoveBucketArgs struct {
BucketName string `json:"bucketName"`
}
RemoveBucketArgs - remove bucket args.
type RemoveBucketPolicyArgs ¶
RemoveBucketPolicyArgs - delete bucket policy RPC arguments.
type RemoveObjectArgs ¶
type RemoveObjectArgs struct { Objects []string `json:"objects"` // Contains objects, prefixes. BucketName string `json:"bucketname"` // Contains bucket name. }
RemoveObjectArgs - args to remove an object, JSON will look like.
{ "bucketname": "testbucket", "objects": [ "photos/hawaii/", "photos/maldives/", "photos/sanjose.jpg" ] }
type RenameFileArgs ¶
RenameFileArgs represents rename file RPC arguments.
type SendEventArgs ¶
SendEventArgs - send event RPC arguments.
type ServerConnStats ¶
type ServerConnStats struct { TotalInputBytes uint64 `json:"transferred"` TotalOutputBytes uint64 `json:"received"` Throughput uint64 `json:"throughput,omitempty"` }
ServerConnStats holds transferred bytes from/to the server
type ServerHTTPMethodStats ¶
type ServerHTTPMethodStats struct { Count uint64 `json:"count"` AvgDuration string `json:"avgDuration"` }
ServerHTTPMethodStats holds total number of HTTP operations from/to the server, including the average duration the call was spent.
type ServerHTTPStats ¶
type ServerHTTPStats struct { TotalHEADStats ServerHTTPMethodStats `json:"totalHEADs"` SuccessHEADStats ServerHTTPMethodStats `json:"successHEADs"` TotalGETStats ServerHTTPMethodStats `json:"totalGETs"` SuccessGETStats ServerHTTPMethodStats `json:"successGETs"` TotalPUTStats ServerHTTPMethodStats `json:"totalPUTs"` SuccessPUTStats ServerHTTPMethodStats `json:"successPUTs"` TotalPOSTStats ServerHTTPMethodStats `json:"totalPOSTs"` SuccessPOSTStats ServerHTTPMethodStats `json:"successPOSTs"` TotalDELETEStats ServerHTTPMethodStats `json:"totalDELETEs"` SuccessDELETEStats ServerHTTPMethodStats `json:"successDELETEs"` }
ServerHTTPStats holds all type of http operations performed to/from the server including their average execution time.
type ServerInfo ¶
type ServerInfo struct { Error string `json:"error"` Addr string `json:"addr"` Data *ServerInfoData `json:"data"` }
ServerInfo holds server information result of one node
type ServerInfoData ¶
type ServerInfoData struct { StorageInfo StorageInfo `json:"storage"` ConnStats ServerConnStats `json:"network"` HTTPStats ServerHTTPStats `json:"http"` Properties ServerProperties `json:"server"` }
ServerInfoData holds storage, connections and other information of a given server.
type ServerInfoRep ¶
type ServerInfoRep struct { MinioVersion string MinioMemory string MinioPlatform string MinioRuntime string MinioGlobalInfo map[string]interface{} UIVersion string `json:"uiVersion"` }
ServerInfoRep - server info reply.
type ServerProperties ¶
type ServerProperties struct { Uptime time.Duration `json:"uptime"` Version string `json:"version"` CommitID string `json:"commitID"` Region string `json:"region"` SQSARN []string `json:"sqsARN"` }
ServerProperties holds some server information such as, version, region uptime, etc..
type SetAuthArgs ¶
SetAuthArgs - argument for SetAuth
type SetAuthReply ¶
type SetAuthReply struct { Token string `json:"token"` UIVersion string `json:"uiVersion"` PeerErrMsgs map[string]string `json:"peerErrMsgs"` }
SetAuthReply - reply for SetAuth
type SetBucketPolicyArgs ¶
SetBucketPolicyArgs - set bucket policy RPC arguments.
type SetBucketPolicyWebArgs ¶
type SetBucketPolicyWebArgs struct { BucketName string `json:"bucketName"` Prefix string `json:"prefix"` Policy string `json:"policy"` }
SetBucketPolicyWebArgs - set bucket policy args.
type SetCredentialsArgs ¶
type SetCredentialsArgs struct { AuthArgs Credentials auth.Credentials }
SetCredentialsArgs - set credentials RPC arguments.
type SignalServiceArgs ¶
type SignalServiceArgs struct { AuthArgs Sig serviceSignal }
SignalServiceArgs - provides the signal argument to SignalService RPC
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 StatFileArgs ¶
StatFileArgs represents stat file RPC arguments.
type StorageAPI ¶
type StorageAPI interface { // Stringified version of disk. String() string // Storage operations. IsOnline() bool // Returns true if disk is online. Close() error DiskInfo() (info DiskInfo, err error) // Volume operations. MakeVol(volume string) (err error) ListVols() (vols []VolInfo, err error) StatVol(volume string) (vol VolInfo, err error) DeleteVol(volume string) (err error) // File operations. ListDir(volume, dirPath string, count int) ([]string, error) ReadFile(volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) PrepareFile(volume string, path string, len int64) (err error) AppendFile(volume string, path string, buf []byte) (err error) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) error StatFile(volume string, path string) (file FileInfo, err error) DeleteFile(volume string, path string) (err error) // Read all. ReadAll(volume string, path string) (buf []byte, err error) }
StorageAPI interface.
var OfflineDisk StorageAPI // zero value is nil
OfflineDisk represents an unavailable disk.
type StorageFull ¶
type StorageFull struct{}
StorageFull storage ran out of space.
func (StorageFull) Error ¶
func (e StorageFull) Error() string
type StorageInfo ¶
type StorageInfo struct { Used uint64 // Used total used per tenant. // Backend type. Backend struct { // Represents various backend types, currently on FS and Erasure. Type BackendType // Following fields are only meaningful if BackendType is Erasure. OnlineDisks int // Online disks during server startup. OfflineDisks int // Offline disks during server startup. StandardSCData int // Data disks for currently configured Standard storage class. StandardSCParity int // Parity disks for currently configured Standard storage class. RRSCData int // Data disks for currently configured Reduced Redundancy storage class. RRSCParity int // Parity disks for currently configured Reduced Redundancy storage class. // List of all disk status, this is only meaningful if BackendType is Erasure. Sets [][]madmin.DriveInfo } }
StorageInfo - represents total capacity of underlying storage.
type StorageInfoRep ¶
type StorageInfoRep struct { StorageInfo StorageInfo `json:"storageInfo"` UIVersion string `json:"uiVersion"` }
StorageInfoRep - contains storage usage statistics.
type StorageRPCClient ¶
type StorageRPCClient struct { *RPCClient // contains filtered or unexported fields }
StorageRPCClient - storage RPC client.
func NewStorageRPCClient ¶
func NewStorageRPCClient(host *xnet.Host, endpointPath string) (*StorageRPCClient, error)
NewStorageRPCClient - returns new storage RPC client.
func (*StorageRPCClient) AppendFile ¶
func (client *StorageRPCClient) AppendFile(volume, path string, buffer []byte) (err error)
AppendFile - append file writes buffer to a remote network path.
func (*StorageRPCClient) Close ¶
func (client *StorageRPCClient) Close() error
Close - closes underneath RPC client.
func (*StorageRPCClient) DeleteFile ¶
func (client *StorageRPCClient) DeleteFile(volume, path string) (err error)
DeleteFile - Delete a file at path.
func (*StorageRPCClient) DeleteVol ¶
func (client *StorageRPCClient) DeleteVol(volume string) (err error)
DeleteVol - Deletes a volume over the network.
func (*StorageRPCClient) DiskInfo ¶
func (client *StorageRPCClient) DiskInfo() (info DiskInfo, err error)
DiskInfo - fetch disk information for a remote disk.
func (*StorageRPCClient) IsOnline ¶
func (client *StorageRPCClient) IsOnline() bool
IsOnline - returns whether RPC client failed to connect or not.
func (*StorageRPCClient) ListDir ¶
func (client *StorageRPCClient) ListDir(volume, path string, count int) (entries []string, err error)
ListDir - list all entries at prefix.
func (*StorageRPCClient) ListVols ¶
func (client *StorageRPCClient) ListVols() ([]VolInfo, error)
ListVols - List all volumes on a remote disk.
func (*StorageRPCClient) MakeVol ¶
func (client *StorageRPCClient) MakeVol(volume string) (err error)
MakeVol - create a volume on a remote disk.
func (*StorageRPCClient) PrepareFile ¶
func (client *StorageRPCClient) PrepareFile(volume, path string, length int64) (err error)
PrepareFile - calls PrepareFile RPC.
func (*StorageRPCClient) ReadAll ¶
func (client *StorageRPCClient) ReadAll(volume, path string) (buf []byte, err error)
ReadAll - reads entire contents of the file at path until EOF, returns the contents in a byte slice. Returns buf == nil if err != nil. This API is meant to be used on files which have small memory footprint, do not use this on large files as it would cause server to crash.
func (*StorageRPCClient) ReadFile ¶
func (client *StorageRPCClient) ReadFile(volume string, path string, offset int64, buffer []byte, verifier *BitrotVerifier) (m int64, err error)
ReadFile - reads a file at remote path and fills the buffer.
func (*StorageRPCClient) RenameFile ¶
func (client *StorageRPCClient) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) (err error)
RenameFile - rename a remote file from source to destination.
func (*StorageRPCClient) StatFile ¶
func (client *StorageRPCClient) StatFile(volume, path string) (fileInfo FileInfo, err error)
StatFile - get latest Stat information for a file at path.
func (*StorageRPCClient) StatVol ¶
func (client *StorageRPCClient) StatVol(volume string) (volInfo VolInfo, err error)
StatVol - get volume info over the network.
func (*StorageRPCClient) String ¶
func (client *StorageRPCClient) String() string
Stringer provides a canonicalized representation of network device.
type SystemLockState ¶
type SystemLockState struct { TotalLocks int64 `json:"totalLocks"` // Count of operations which are blocked waiting for the lock to // be released. TotalBlockedLocks int64 `json:"totalBlockedLocks"` // Count of operations which has successfully acquired the lock but // hasn't unlocked yet (operation in progress). TotalAcquiredLocks int64 `json:"totalAcquiredLocks"` LocksInfoPerObject []VolumeLockInfo `json:"locksInfoPerObject"` }
SystemLockState - Structure to fill the lock state of entire object storage. That is the total locks held, total calls blocked on locks and state of all the locks for the entire system.
type URLTokenReply ¶
URLTokenReply contains the reply for CreateURLToken.
type UnsupportedDelimiter ¶
type UnsupportedDelimiter struct {
Delimiter string
}
UnsupportedDelimiter - unsupported delimiter.
func (UnsupportedDelimiter) Error ¶
func (e UnsupportedDelimiter) Error() string
type UnsupportedMetadata ¶
type UnsupportedMetadata struct{}
UnsupportedMetadata - unsupported metadata
func (UnsupportedMetadata) Error ¶
func (e UnsupportedMetadata) Error() string
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 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.
type VolumeLockInfo ¶
type VolumeLockInfo struct { Bucket string `json:"bucket"` Object string `json:"object"` // All locks blocked + running for given <volume,path> pair. LocksOnObject int64 `json:"-"` // Count of operations which has successfully acquired the lock // but hasn't unlocked yet( operation in progress). LocksAcquiredOnObject int64 `json:"-"` // Count of operations which are blocked waiting for the lock // to be released. TotalBlockedLocks int64 `json:"-"` // Count of all read locks TotalReadLocks int64 `json:"readLocks"` // Count of all write locks TotalWriteLocks int64 `json:"writeLocks"` // State information containing state of the locks for all operations // on given <volume,path> pair. LockDetailsOnObject []OpsLockState `json:"lockOwners"` }
VolumeLockInfo - Structure to contain the lock state info for volume, path pair.
type WebBucketInfo ¶
type WebBucketInfo struct { // The name of the bucket. Name string `json:"name"` // Date the bucket was created. CreationDate time.Time `json:"creationDate"` }
WebBucketInfo container for list buckets metadata.
type WebGenericArgs ¶
type WebGenericArgs struct{}
WebGenericArgs - empty struct for calls that don't accept arguments for ex. ServerInfo, GenerateAuth
type WebGenericRep ¶
type WebGenericRep struct {
UIVersion string `json:"uiVersion"`
}
WebGenericRep - reply structure for calls for which reply is success/failure for ex. RemoveObject MakeBucket
type WebObjectInfo ¶
type WebObjectInfo struct { // Name of the object Key string `json:"name"` // Date and time the object was last modified. LastModified time.Time `json:"lastModified"` // Size in bytes of the object. Size int64 `json:"size"` // ContentType is mime type of the object. ContentType string `json:"contentType"` }
WebObjectInfo container for list objects metadata.
type WriteConfigArgs ¶
WriteConfigArgs - wraps the bytes to be written and temporary file name.
Source Files ¶
- acl-handlers.go
- admin-handlers.go
- admin-heal-ops.go
- admin-router.go
- admin-rpc-client.go
- admin-rpc-server.go
- api-datatypes.go
- api-errors.go
- api-headers.go
- api-resources.go
- api-response-multipart.go
- api-response.go
- api-router.go
- auth-handler.go
- bool-flag.go
- bucket-handlers-listobjects.go
- bucket-handlers.go
- bucket-notification-handlers.go
- bucket-policy-handlers.go
- build-constants.go
- certs.go
- common-main.go
- config-current.go
- config-dir.go
- config-migrate.go
- config-versions.go
- copy-part-range.go
- crossdomain-xml-handler.go
- disk-cache-config.go
- disk-cache-fs.go
- disk-cache.go
- disk-usage.go
- dynamic-timeouts.go
- encryption-v1.go
- endpoint-ellipses.go
- endpoint.go
- erasure-createfile.go
- erasure-healfile.go
- erasure-readfile.go
- erasure-utils.go
- erasure.go
- fallocate_linux.go
- format-disk-cache.go
- format-fs.go
- format-meta.go
- format-xl.go
- fs-v1-helpers.go
- fs-v1-metadata.go
- fs-v1-multipart.go
- fs-v1-rwpool.go
- fs-v1.go
- gateway-common.go
- gateway-main.go
- gateway-router.go
- gateway-startup-msg.go
- gateway-unsupported.go
- generic-handlers.go
- globals.go
- handler-utils.go
- hasher.go
- healthcheck-handler.go
- healthcheck-router.go
- http-stats.go
- httprange.go
- jwt.go
- local-admin-client.go
- local-locker.go
- lock-instrument.go
- lock-rpc-client.go
- lock-rpc-server-common.go
- lock-rpc-server.go
- lock-stat.go
- lockinfo-handlers.go
- main.go
- metrics-router.go
- metrics.go
- namespace-lock.go
- net.go
- notification.go
- object-api-common.go
- object-api-datatypes.go
- object-api-errors.go
- object-api-input-checks.go
- object-api-interface.go
- object-api-utils.go
- object-handlers-common.go
- object-handlers.go
- os-reliable.go
- peer-rpc-client-target.go
- peer-rpc-client.go
- peer-rpc-server.go
- policy.go
- posix-dirent-ino.go
- posix-errors.go
- posix-list-dir-nix.go
- posix.go
- postpolicyform.go
- prepare-storage.go
- retry.go
- routers.go
- rpc.go
- server-main.go
- server-rlimit.go
- server-startup-msg.go
- service.go
- setup-type.go
- signals.go
- signature-v2.go
- signature-v4-parser.go
- signature-v4-utils.go
- signature-v4.go
- storage-class.go
- storage-datatypes.go
- storage-errors.go
- storage-interface.go
- storage-rpc-client.go
- storage-rpc-server.go
- streaming-signature-v4.go
- tree-walk-pool.go
- tree-walk.go
- typed-errors.go
- ui-errors-utils.go
- ui-errors.go
- update-main.go
- update-notifier.go
- utils.go
- version-main.go
- web-handlers.go
- web-router.go
- xl-sets.go
- xl-v1-bucket.go
- xl-v1-common.go
- xl-v1-errors.go
- xl-v1-healing-common.go
- xl-v1-healing.go
- xl-v1-list-objects-heal.go
- xl-v1-list-objects.go
- xl-v1-metadata.go
- xl-v1-multipart.go
- xl-v1-object.go
- xl-v1-utils.go
- xl-v1.go
Directories ¶
Path | Synopsis |
---|---|
Package crypto implements AWS S3 related cryptographic building blocks for implementing Server-Side-Encryption (SSE-S3) and Server-Side-Encryption with customer provided keys (SSE-C).
|
Package crypto implements AWS S3 related cryptographic building blocks for implementing Server-Side-Encryption (SSE-S3) and Server-Side-Encryption with customer provided keys (SSE-C). |