Documentation ¶
Index ¶
- Constants
- func CorsHandler(h http.Handler) http.Handler
- func IgnoreResourcesHandler(h http.Handler) http.Handler
- func InitSignatureV4(req *http.Request) (*donut.Signature, *probe.Error)
- func LoggingHandler(h http.Handler) http.Handler
- func StripAccessKeyID(ah string) (string, error)
- func TimeValidityHandler(h http.Handler) http.Handler
- func ValidContentTypeHandler(h http.Handler) http.Handler
- func ValidateAuthHeaderHandler(h http.Handler) http.Handler
- type ACLType
- type Bucket
- type CommonPrefix
- type CompleteMultipartUploadResponse
- type Config
- type Error
- type ErrorResponse
- type InitiateMultipartUploadResponse
- type Initiator
- type ListBucketsResponse
- type ListMultipartUploadsResponse
- type ListObjectsResponse
- type ListPartsResponse
- type MiddlewareHandler
- type Minio
- func (api Minio) AbortMultipartUploadHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) CompleteMultipartUploadHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) DeleteBucketHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) DeleteObjectHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) GetObjectHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) HeadBucketHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) HeadObjectHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) ListBucketsHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) ListMultipartUploadsHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) ListObjectPartsHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) ListObjectsHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) NewMultipartUploadHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) PutBucketACLHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) PutBucketHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) PutObjectHandler(w http.ResponseWriter, req *http.Request)
- func (api Minio) PutObjectPartHandler(w http.ResponseWriter, req *http.Request)
- type Object
- type Operation
- type Owner
- type Part
- type Upload
Constants ¶
const ( AccessDenied = iota BadDigest BucketAlreadyExists EntityTooSmall EntityTooLarge IncompleteBody InternalError InvalidAccessKeyID InvalidBucketName InvalidDigest InvalidRange InvalidRequest InvalidMaxKeys InvalidMaxUploads InvalidMaxParts InvalidPartNumberMarker MalformedXML MissingContentLength MissingRequestBodyError NoSuchBucket NoSuchKey NoSuchUpload NotImplemented RequestTimeTooSkewed SignatureDoesNotMatch TooManyBuckets MethodNotAllowed InvalidPart InvalidPartOrder )
Error codes, non exhaustive list - http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
const (
NotAcceptable = iota + 29
)
Error codes, non exhaustive list - standard HTTP errors
Variables ¶
This section is empty.
Functions ¶
func IgnoreResourcesHandler ¶
IgnoreResourcesHandler - Ignore resources handler is wrapper handler used for API request resource validation Since we do not support all the S3 queries, it is necessary for us to throw back a valid error message indicating such a feature is not implemented.
func InitSignatureV4 ¶
InitSignatureV4 initializing signature verification
func StripAccessKeyID ¶
StripAccessKeyID - strip only access key id from auth header
func TimeValidityHandler ¶
TimeValidityHandler to validate parsable time over http header
func ValidContentTypeHandler ¶
ValidContentTypeHandler to validate Accept type
func ValidateAuthHeaderHandler ¶
ValidateAuthHeaderHandler - validate auth header handler is wrapper handler used for request validation with authorization header. Current authorization layer supports S3's standard HMAC based signature request.
Types ¶
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 ErrorResponse ¶
type ErrorResponse struct { XMLName xml.Name `xml:"Error" json:"-"` Code string Message string Resource string RequestID string `xml:"RequestId"` HostID string `xml:"HostId"` }
ErrorResponse - error response format
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 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 { Bucket []*Bucket } // Buckets are nested Owner Owner }
ListBucketsResponse - format for list buckets response
type ListMultipartUploadsResponse ¶
type ListMultipartUploadsResponse struct { XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListMultipartUploadsResult" json:"-"` Bucket string KeyMarker string UploadIDMarker string `xml:"UploadIdMarker"` NextKeyMarker string NextUploadIDMarker string `xml:"NextUploadIdMarker"` EncodingType string MaxUploads int IsTruncated bool Upload []*Upload Prefix string Delimiter string CommonPrefixes []*CommonPrefix }
ListMultipartUploadsResponse - format for list multipart uploads 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 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 Part []*Part }
ListPartsResponse - format for list parts response
type Minio ¶
Minio container for API and also carries OP (operation) channel
func (Minio) AbortMultipartUploadHandler ¶
func (api Minio) AbortMultipartUploadHandler(w http.ResponseWriter, req *http.Request)
AbortMultipartUploadHandler - Abort multipart upload
func (Minio) CompleteMultipartUploadHandler ¶
func (api Minio) CompleteMultipartUploadHandler(w http.ResponseWriter, req *http.Request)
CompleteMultipartUploadHandler - Complete multipart upload
func (Minio) DeleteBucketHandler ¶
func (api Minio) DeleteBucketHandler(w http.ResponseWriter, req *http.Request)
DeleteBucketHandler - Delete bucket
func (Minio) DeleteObjectHandler ¶
func (api Minio) DeleteObjectHandler(w http.ResponseWriter, req *http.Request)
DeleteObjectHandler - Delete object
func (Minio) GetObjectHandler ¶
func (api Minio) GetObjectHandler(w http.ResponseWriter, req *http.Request)
GetObjectHandler - GET Object ---------- This implementation of the GET operation retrieves object. To use GET, you must have READ access to the object.
func (Minio) HeadBucketHandler ¶
func (api Minio) HeadBucketHandler(w http.ResponseWriter, req *http.Request)
HeadBucketHandler - HEAD Bucket ---------- This operation is useful to determine if a bucket exists. The operation returns a 200 OK if the bucket exists and you have permission to access it. Otherwise, the operation might return responses such as 404 Not Found and 403 Forbidden.
func (Minio) HeadObjectHandler ¶
func (api Minio) HeadObjectHandler(w http.ResponseWriter, req *http.Request)
HeadObjectHandler - HEAD Object ----------- The HEAD operation retrieves metadata from an object without returning the object itself.
func (Minio) ListBucketsHandler ¶
func (api Minio) ListBucketsHandler(w http.ResponseWriter, req *http.Request)
ListBucketsHandler - GET Service ----------- This implementation of the GET operation returns a list of all buckets owned by the authenticated sender of the request.
func (Minio) ListMultipartUploadsHandler ¶
func (api Minio) ListMultipartUploadsHandler(w http.ResponseWriter, req *http.Request)
ListMultipartUploadsHandler - GET Bucket (List Multipart uploads) ------------------------- This operation lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated, using the Initiate Multipart Upload request, but has not yet been completed or aborted. This operation returns at most 1,000 multipart uploads in the response.
func (Minio) ListObjectPartsHandler ¶
func (api Minio) ListObjectPartsHandler(w http.ResponseWriter, req *http.Request)
ListObjectPartsHandler - List object parts
func (Minio) ListObjectsHandler ¶
func (api Minio) ListObjectsHandler(w http.ResponseWriter, req *http.Request)
ListObjectsHandler - GET Bucket (List Objects) ------------------------- This implementation of the GET operation returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
func (Minio) NewMultipartUploadHandler ¶
func (api Minio) NewMultipartUploadHandler(w http.ResponseWriter, req *http.Request)
NewMultipartUploadHandler - New multipart upload
func (Minio) PutBucketACLHandler ¶
func (api Minio) PutBucketACLHandler(w http.ResponseWriter, req *http.Request)
PutBucketACLHandler - PUT Bucket ACL ---------- This implementation of the PUT operation modifies the bucketACL for authenticated request
func (Minio) PutBucketHandler ¶
func (api Minio) PutBucketHandler(w http.ResponseWriter, req *http.Request)
PutBucketHandler - PUT Bucket ---------- This implementation of the PUT operation creates a new bucket for authenticated request
func (Minio) PutObjectHandler ¶
func (api Minio) PutObjectHandler(w http.ResponseWriter, req *http.Request)
PutObjectHandler - PUT Object ---------- This implementation of the PUT operation adds an object to a bucket.
func (Minio) PutObjectPartHandler ¶
func (api Minio) PutObjectPartHandler(w http.ResponseWriter, req *http.Request)
PutObjectPartHandler - Upload part
type Object ¶
type Object struct { ETag string Key string LastModified string Size int64 Owner Owner // The class of storage used to store the object. StorageClass string }
Object container for object metadata
type Operation ¶
type Operation struct {
ProceedCh chan struct{}
}
Operation container for individual operations read by Ticket Master