Documentation ¶
Overview ¶
Package cmd file carries any specific responses constructed/necessary in multipart operations.
Package cmd This file implements AWS Access Policy Language parser in accordance with http://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html
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 DamerauLevenshteinDistance(a string, b string) int
- func IsValidBucketName(bucket string) bool
- func IsValidObjectName(object string) bool
- func IsValidObjectPrefix(object string) bool
- func Main()
- func UNCPath(path string) string
- type APIError
- type APIErrorCode
- type APIErrorResponse
- type AppendFileArgs
- type BadDigest
- type Bucket
- type BucketExists
- type BucketInfo
- type BucketNameInvalid
- type BucketNotEmpty
- type BucketNotFound
- type BucketPolicyNotFound
- type CommonPrefix
- type CompleteMultipartUploadResponse
- type ConnBuf
- type ConnMux
- type CopyObjectResponse
- type DeleteError
- type DeleteFileArgs
- type DeleteObjectsRequest
- type DeleteObjectsResponse
- type EventName
- type FileInfo
- type GenerateAuthReply
- type GenericArgs
- type GenericError
- type GenericReply
- type GetAuthReply
- type GetBucketPolicyArgs
- type GetBucketPolicyRep
- type HandlerFunc
- type HealListArgs
- type HealListReply
- type HealObjectArgs
- type HealObjectReply
- type IncompleteBody
- type InitiateMultipartUploadResponse
- type Initiator
- type InsufficientReadQuorum
- type InsufficientWriteQuorum
- type InvalidMarkerPrefixCombination
- type InvalidPart
- type InvalidRange
- type InvalidUploadID
- type InvalidUploadIDKeyCombination
- type JWT
- type ListBucketsRep
- type ListBucketsResponse
- type ListDirArgs
- type ListMultipartUploadsResponse
- type ListMultipartsInfo
- type ListObjectsArgs
- type ListObjectsInfo
- type ListObjectsRep
- type ListObjectsResponse
- type ListObjectsV2Response
- type ListPartsInfo
- type ListPartsResponse
- type ListVolsReply
- type ListenerMux
- type LocationResponse
- type LoginArgs
- type LoginRep
- type MakeBucketArgs
- type MalformedUploadID
- type NotImplemented
- type NotificationEvent
- type Object
- type ObjectExistsAsDirectory
- type ObjectIdentifier
- type ObjectInfo
- type ObjectLayer
- type ObjectNameInvalid
- type ObjectNotFound
- type Owner
- type Part
- type PartTooSmall
- type PostPolicyForm
- type ReadAllArgs
- type ReadFileArgs
- type RemoveObjectArgs
- type RenameFileArgs
- type ServerInfoRep
- type ServerMux
- type SetAuthArgs
- type SetAuthReply
- type SetBucketPolicyArgs
- type ShutdownArgs
- type ShutdownReply
- type StatFileArgs
- type StorageAPI
- type StorageFull
- type StorageInfo
- type StorageInfoRep
- type Trie
- type UnsupportedDelimiter
- type Upload
- type VolInfo
- type WebBucketInfo
- type WebGenericArgs
- type WebGenericRep
- type WebObjectInfo
Constants ¶
const ( Byte = 1 << (iota * 10) KiByte MiByte GiByte TiByte PiByte EiByte )
IEC Sizes, kibis of bits
const ( IByte = 1 KByte = IByte * 1000 MByte = KByte * 1000 GByte = MByte * 1000 TByte = GByte * 1000 PByte = TByte * 1000 EByte = PByte * 1000 )
Scientific notation Sizes.
const (
// AWSResourcePrefix - bucket policy resource prefix.
AWSResourcePrefix = "arn:aws:s3:::"
)
Variables ¶
var ( // GOPATH - GOPATH value at the time of build. GOPATH = "" // Version - version time.RFC3339. Version = "DEVELOPMENT.GOGET" // ReleaseTag - release tag in TAG.%Y-%m-%dT%H-%M-%SZ. ReleaseTag = "DEVELOPMENT.GOGET" // CommitID - latest commit id. CommitID = "DEVELOPMENT.GOGET" // ShortCommitID - first 12 characters from CommitID. ShortCommitID = CommitID[:12] )
DO NOT EDIT THIS FILE DIRECTLY. These are build-time constants set through ‘buildscripts/gen-ldflags.go’.
Functions ¶
func DamerauLevenshteinDistance ¶
DamerauLevenshteinDistance calculates distance between two strings using an algorithm described in https://en.wikipedia.org/wiki/Damerau-Levenshtein_distance
func IsValidBucketName ¶
IsValidBucketName verifies a bucket name in accordance with Amazon's requirements. It must be 3-63 characters long, can contain dashes and periods, but must begin and end with a lowercase letter or a number. 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 ("\") - Caret ("^") - Grave accent / back tick ("`") - Vertical bar / pipe ("|")
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.
Types ¶
type APIErrorCode ¶
type APIErrorCode int
APIErrorCode type of error status.
const ( ErrNone APIErrorCode = iota ErrAccessDenied ErrBadDigest ErrBucketAlreadyExists ErrEntityTooSmall ErrEntityTooLarge ErrIncompleteBody ErrInternalError ErrInvalidAccessKeyID ErrInvalidBucketName ErrInvalidDigest ErrInvalidRange ErrInvalidMaxKeys ErrInvalidMaxUploads ErrInvalidMaxParts ErrInvalidPartNumberMarker ErrInvalidRequestBody ErrInvalidCopySource ErrInvalidCopyDest ErrInvalidPolicyDocument ErrMalformedXML ErrMissingContentLength ErrMissingContentMD5 ErrMissingRequestBodyError ErrNoSuchBucket ErrNoSuchBucketPolicy ErrNoSuchKey ErrNoSuchUpload ErrNotImplemented ErrPreconditionFailed ErrRequestTimeTooSkewed ErrSignatureDoesNotMatch ErrMethodNotAllowed ErrInvalidPart ErrInvalidPartOrder ErrAuthorizationHeaderMalformed ErrMalformedPOSTRequest 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 // Bucket notification related errors. ErrEventNotification ErrARNNotification ErrRegionNotification ErrOverlappingFilterNotification ErrFilterNameInvalid ErrFilterNamePrefix ErrFilterNameSuffix ErrFilterValueInvalid ErrOverlappingConfigs // S3 extended errors. ErrContentSHA256Mismatch // Minio extended errors. ErrReadQuorum ErrWriteQuorum ErrStorageFull ErrObjectExistsAsDirectory ErrPolicyNesting ErrInvalidObjectName )
Error codes, non exhaustive list - http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
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"` HostID string `xml:"HostId"` }
APIErrorResponse - error response format
type AppendFileArgs ¶
type AppendFileArgs struct { // Name of the volume. Vol string // Name of the path. Path string // Data buffer to be saved at path. Buffer []byte }
AppendFileArgs represents append file RPC arguments.
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 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 CommonPrefix ¶
type CommonPrefix struct {
Prefix string
}
CommonPrefix container for prefix response in ListObjectsResponse
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 ConnBuf ¶
type ConnBuf struct {
// contains filtered or unexported fields
}
ConnBuf - contains network buffer to record data
type ConnMux ¶
ConnMux - implements a Read() which streams twice the firs bytes from the incoming connection, to help peeking protocol
func (*ConnMux) PeekProtocol ¶
PeekProtocol - reads the first bytes, then checks if it is similar to one of the default http methods
type CopyObjectResponse ¶
type CopyObjectResponse struct { XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyObjectResult" json:"-"` ETag string LastModified string // time string of format "2006-01-02T15:04:05.000Z" }
CopyObjectResponse container returns ETag and LastModified of the successfully copied object
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 EventName ¶
type EventName int
EventName is AWS S3 event type: http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
const ( // ObjectCreatedPut is s3:ObjectCreated:Put ObjectCreatedPut EventName = iota // ObjectCreatedPost is s3:ObjectCreated:Post ObjectCreatedPost // ObjectCreatedCopy is s3:ObjectCreated:Copy ObjectCreatedCopy // ObjectCreatedCompleteMultipartUpload is s3:ObjectCreated:CompleteMultipartUpload ObjectCreatedCompleteMultipartUpload // ObjectRemovedDelete is s3:ObjectRemoved:Delete ObjectRemovedDelete )
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 // Hex encoded md5 checksum of the file. MD5Sum string }
FileInfo - represents file stat information.
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 policy.BucketPolicy `json:"policy"` }
GetBucketPolicyRep - get bucket policy reply.
type HandlerFunc ¶
HandlerFunc - useful to chain different middleware http.Handler
type HealListArgs ¶
HealListArgs - argument for ListObjects RPC.
type HealListReply ¶
HealListReply - reply by ListObjects RPC.
type HealObjectArgs ¶
HealObjectArgs - argument for HealObject RPC.
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 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 ¶
type InvalidRange struct {
// contains filtered or unexported fields
}
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 JWT ¶
type JWT struct {
// contains filtered or unexported fields
}
JWT - jwt auth backend
func (*JWT) Authenticate ¶
Authenticate - authenticates incoming access key and secret key.
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:"-"` // Container for one or more buckets. Buckets struct { Buckets []Bucket `xml:"Bucket"` } // Buckets are nested Owner Owner }
ListBucketsResponse - format for list buckets response
type ListDirArgs ¶
ListDirArgs represents list contents RPC arguments.
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"` EncodingType string MaxUploads int IsTruncated bool Uploads []Upload `xml:"Upload"` Prefix string Delimiter string 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 []uploadMetadata // 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.
type ListObjectsArgs ¶
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.
type ListObjectsRep ¶
type ListObjectsRep struct { Objects []WebObjectInfo `json:"objects"` 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:"-"` CommonPrefixes []CommonPrefix Contents []Object Delimiter string // Encoding type used to encode object keys in the response. EncodingType string // A flag that indicates whether or not ListObjects returned all of the results // that satisfied the search criteria. IsTruncated bool Marker string MaxKeys int Name 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 Prefix string }
ListObjectsResponse - format for list objects response.
type ListObjectsV2Response ¶
type ListObjectsV2Response struct { XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult" json:"-"` CommonPrefixes []CommonPrefix Contents []Object Delimiter string // Encoding type used to encode object keys in the response. EncodingType string // A flag that indicates whether or not ListObjects returned all of the results // that satisfied the search criteria. IsTruncated bool StartAfter string MaxKeys int Name 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. ContinuationToken string NextContinuationToken string Prefix string }
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 EncodingType string // Not supported yet. }
ListPartsInfo - represents list of all parts.
type ListPartsResponse ¶
type ListPartsResponse struct { XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListPartsResult" json:"-"` Bucket string Key string UploadID string `xml:"UploadId"` Initiator Initiator Owner Owner // The class of storage used to store the object. StorageClass string PartNumberMarker int NextPartNumberMarker int MaxParts int IsTruncated bool // List of parts. Parts []Part `xml:"Part"` }
ListPartsResponse - format for list parts response.
type ListVolsReply ¶
type ListVolsReply struct { // List of volumes stat information. Vols []VolInfo }
ListVolsReply represents list of vols RPC reply.
type ListenerMux ¶
ListenerMux - encapuslates the standard net.Listener to inspect the communication protocol upon network connection
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 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 NotImplemented ¶
type NotImplemented struct{}
NotImplemented If a feature is not implemented
func (NotImplemented) Error ¶
func (e NotImplemented) Error() string
type NotificationEvent ¶
type NotificationEvent struct { EventVersion string `json:"eventVersion"` EventSource string `json:"eventSource"` AwsRegion string `json:"awsRegion"` EventTime string `json:"eventTime"` EventName string `json:"eventName"` UserIdentity identity `json:"userIdentity"` RequestParameters map[string]string `json:"requestParameters"` ResponseElements map[string]string `json:"responseElements"` S3 eventMeta `json:"s3"` }
NotificationEvent represents an Amazon an S3 bucket notification event.
type Object ¶
type Object struct { ETag string Key string LastModified string // time string of format "2006-01-02T15:04:05.000Z" Size int64 Owner Owner // The class of storage used to store the object. StorageClass string }
Object container for object metadata
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 md5 checksum of the object. MD5Sum 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 // User-Defined metadata UserDefined map[string]string }
ObjectInfo - represents object metadata.
type ObjectLayer ¶
type ObjectLayer interface { // Storage operations. Shutdown() error StorageInfo() StorageInfo // Bucket operations. MakeBucket(bucket string) error GetBucketInfo(bucket string) (bucketInfo BucketInfo, err error) ListBuckets() (buckets []BucketInfo, err error) DeleteBucket(bucket string) error ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (result ListObjectsInfo, err error) ListObjectsHeal(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, error) // Object operations. GetObject(bucket, object string, startOffset int64, length int64, writer io.Writer) (err error) GetObjectInfo(bucket, object string) (objInfo ObjectInfo, err error) PutObject(bucket, object string, size int64, data io.Reader, metadata map[string]string) (md5 string, err error) DeleteObject(bucket, object string) error HealObject(bucket, object string) error // Multipart operations. ListMultipartUploads(bucket, prefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (result ListMultipartsInfo, err error) NewMultipartUpload(bucket, object string, metadata map[string]string) (uploadID string, err error) PutObjectPart(bucket, object, uploadID string, partID int, size int64, data io.Reader, md5Hex string) (md5 string, err error) ListObjectParts(bucket, object, uploadID string, partNumberMarker int, maxParts int) (result ListPartsInfo, err error) AbortMultipartUpload(bucket, object, uploadID string) error CompleteMultipartUpload(bucket, object, uploadID string, uploadedParts []completePart) (md5 string, err error) }
ObjectLayer implements primitives for object API 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 PartTooSmall ¶
PartTooSmall - error if part size is less than 5MB.
func (PartTooSmall) Error ¶
func (e PartTooSmall) Error() string
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 struct { Min int Max int } } }
PostPolicyForm provides strict static type conversion and validation for Amazon S3's POST policy JSON string.
type ReadAllArgs ¶
ReadAllArgs represents read all RPC arguments.
type ReadFileArgs ¶
type ReadFileArgs struct { // Name of the volume. Vol string // Name of the path. Path string // Starting offset to start reading into Buffer. Offset int64 // Data buffer read from the path at offset. Buffer []byte }
ReadFileArgs represents read file RPC arguments.
type RemoveObjectArgs ¶
type RemoveObjectArgs struct { TargetHost string `json:"targetHost"` BucketName string `json:"bucketName"` ObjectName string `json:"objectName"` }
RemoveObjectArgs - args to remove an object
type RenameFileArgs ¶
type RenameFileArgs struct { // Name of source volume. SrcVol string // Source path to be renamed. SrcPath string // Name of destination volume. DstVol string // Destination path of renamed file. DstPath string }
RenameFileArgs represents rename file RPC arguments.
type ServerInfoRep ¶
type ServerInfoRep struct { MinioVersion string MinioMemory string MinioPlatform string MinioRuntime string MinioEnvVars []string UIVersion string `json:"uiVersion"` }
ServerInfoRep - server info reply.
type ServerMux ¶
type ServerMux struct { http.Server WaitGroup *sync.WaitGroup GracefulTimeout time.Duration // contains filtered or unexported fields }
ServerMux - the main mux server
func NewServerMux ¶
NewServerMux constructor to create a ServerMux
func (*ServerMux) ListenAndServe ¶
ListenAndServe - Same as the http.Server version
func (*ServerMux) ListenAndServeTLS ¶
ListenAndServeTLS - similar to the http.Server version. However, it has the ability to redirect http requests to the correct HTTPS url if the client mistakenly initiates a http connection over the https port
type SetAuthArgs ¶
SetAuthArgs - argument for SetAuth
type SetAuthReply ¶
SetAuthReply - reply for SetAuth
type SetBucketPolicyArgs ¶
type SetBucketPolicyArgs struct { BucketName string `json:"bucketName"` Prefix string `json:"prefix"` Policy string `json:"policy"` }
SetBucketPolicyArgs - set bucket policy args.
type ShutdownArgs ¶
type ShutdownArgs struct {
Reboot bool
}
ShutdownArgs - argument for Shutdown RPC.
type StatFileArgs ¶
StatFileArgs represents stat file RPC arguments.
type StorageAPI ¶
type StorageAPI interface { // 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) ([]string, error) ReadFile(volume string, path string, offset int64, buf []byte) (n 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.
type StorageFull ¶
type StorageFull struct{}
StorageFull storage ran out of space.
func (StorageFull) Error ¶
func (e StorageFull) Error() string
type StorageInfo ¶
type StorageInfo struct { // Total disk space. Total int64 // Free available disk space. Free int64 }
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 Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Trie trie container
func (*Trie) PrefixMatch ¶
PrefixMatch - prefix match
type UnsupportedDelimiter ¶
type UnsupportedDelimiter struct {
Delimiter string
}
UnsupportedDelimiter - unsupported delimiter.
func (UnsupportedDelimiter) Error ¶
func (e UnsupportedDelimiter) 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 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.
Source Files ¶
- access-key.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
- bucket-handlers-listobjects.go
- bucket-handlers.go
- bucket-notification-datatypes.go
- bucket-notification-handlers.go
- bucket-notification-utils.go
- bucket-policy-handlers.go
- bucket-policy-migrate.go
- bucket-policy-parser.go
- bucket-policy.go
- build-constants.go
- certs.go
- checkport.go
- commands.go
- config-migrate.go
- config-old.go
- config-v7.go
- config.go
- control-heal-main.go
- control-main.go
- control-shutdown-main.go
- controller-handlers.go
- controller-router.go
- crossdomain-xml-handler.go
- damerau-levenshtein.go
- erasure-createfile.go
- erasure-healfile.go
- erasure-readfile.go
- erasure-utils.go
- event-notifier.go
- format-config-v1.go
- fs-createfile.go
- fs-v1-errors.go
- fs-v1-metadata.go
- fs-v1-multipart-common.go
- fs-v1-multipart.go
- fs-v1.go
- generic-handlers.go
- globals.go
- handler-utils.go
- host-to-ip.go
- httprange.go
- logger-console-hook.go
- logger-file-hook.go
- logger-syslog-hook_nix.go
- logger.go
- main.go
- namespace-lock.go
- notifiers.go
- notify-amqp.go
- notify-elasticsearch.go
- notify-redis.go
- object-common.go
- object-datatypes.go
- object-errors.go
- object-handlers-common.go
- object-handlers.go
- object-interface.go
- object-multipart-common.go
- object-utils.go
- posix-dirent-ino.go
- posix-list-dir-nix.go
- posix-prepare-path.go
- posix-utils_common.go
- posix-utils_nix.go
- posix.go
- rate-limit-handler.go
- routers.go
- rpc-client.go
- rpc-server-datatypes.go
- rpc-server.go
- runtime-checks.go
- server-main.go
- server-mux.go
- server-rlimit-nix.go
- server-startup-msg.go
- signals.go
- signature-jwt.go
- signature-v4-parser.go
- signature-v4-postpolicyform.go
- signature-v4-utils.go
- signature-v4.go
- signature-verify-reader.go
- storage-datatypes.go
- storage-errors.go
- storage-interface.go
- strconv-bytes.go
- streaming-signature-v4.go
- tree-walk-pool.go
- tree-walk.go
- trie.go
- typed-errors.go
- update-main.go
- update-notifier.go
- utils.go
- version-main.go
- web-handlers.go
- web-router.go
- xl-v1-bucket.go
- xl-v1-common.go
- xl-v1-errors.go
- xl-v1-healing.go
- xl-v1-list-objects-heal.go
- xl-v1-list-objects.go
- xl-v1-metadata.go
- xl-v1-multipart-common.go
- xl-v1-multipart.go
- xl-v1-object.go
- xl-v1-utils.go
- xl-v1.go