Documentation ¶
Index ¶
- Constants
- func DecodeXMLBody(reader io.Reader, entity interface{}) error
- func EncodeResponse(w http.ResponseWriter, entity interface{}, statusCode int) error
- func EncodeXMLBytes(w http.ResponseWriter, t []byte, statusCode int) error
- func StorageClassFromHeader(header http.Header) *string
- type ActionIncr
- type AuthenticatedOperation
- type AuthenticatedOperationHandler
- type BranchOperationHandler
- type DeleteObject
- type DeleteObjects
- type GetObject
- type HeadBucket
- type HeadObject
- type ListBuckets
- type ListObjects
- type Operation
- func (o *Operation) AddLogFields(fields logging.Fields)
- func (o *Operation) Context() context.Context
- func (o *Operation) EncodeError(e errors.APIError)
- func (o *Operation) EncodeResponse(entity interface{}, statusCode int)
- func (o *Operation) EncodeXMLBytes(t []byte, statusCode int)
- func (o *Operation) Log() logging.Logger
- func (o *Operation) RequestID() string
- func (o *Operation) SetHeader(key, value string)
- func (o *Operation) SetHeaders(headers map[string]string)
- type OperationHandler
- type PathOperation
- type PathOperationHandler
- type PostObject
- func (controller *PostObject) Handle(o *PathOperation)
- func (controller *PostObject) HandleCompleteMultipartUpload(o *PathOperation)
- func (controller *PostObject) HandleCreateMultipartUpload(o *PathOperation)
- func (controller *PostObject) RequiredPermissions(_ *http.Request, repoID, _, path string) ([]permissions.Permission, error)
- type PutObject
- func (controller *PutObject) Handle(o *PathOperation)
- func (controller *PutObject) HandleCopy(o *PathOperation, copySource string)
- func (controller *PutObject) HandleUploadPart(o *PathOperation)
- func (controller *PutObject) RequiredPermissions(_ *http.Request, repoID, _, path string) ([]permissions.Permission, error)
- type RefOperation
- type RepoOperation
- type RepoOperationHandler
Constants ¶
View Source
const ( CreateMultipartUploadQueryParam = "uploads" CompleteMultipartUploadQueryParam = "uploadId" )
View Source
const ( CopySourceHeader = "x-amz-copy-source" QueryParamUploadID = "uploadId" QueryParamPartNumber = "partNumber" )
View Source
const (
ListObjectMaxKeys = 1000
)
View Source
const StorageClassHeader = "x-amz-storage-class"
Variables ¶
This section is empty.
Functions ¶
func DecodeXMLBody ¶
func EncodeResponse ¶
func EncodeResponse(w http.ResponseWriter, entity interface{}, statusCode int) error
func EncodeXMLBytes ¶
func EncodeXMLBytes(w http.ResponseWriter, t []byte, statusCode int) error
func StorageClassFromHeader ¶
Types ¶
type ActionIncr ¶
type ActionIncr func(string)
type AuthenticatedOperation ¶
type AuthenticatedOperationHandler ¶
type AuthenticatedOperationHandler interface { RequiredPermissions(request *http.Request) ([]permissions.Permission, error) Handle(op *AuthenticatedOperation) }
type BranchOperationHandler ¶
type BranchOperationHandler interface { RequiredPermissions(request *http.Request, repository, branch string) ([]permissions.Permission, error) Handle(op *RefOperation) }
type DeleteObject ¶
type DeleteObject struct{}
func (*DeleteObject) Handle ¶
func (controller *DeleteObject) Handle(o *PathOperation)
func (*DeleteObject) HandleAbortMultipartUpload ¶
func (controller *DeleteObject) HandleAbortMultipartUpload(o *PathOperation)
func (*DeleteObject) RequiredPermissions ¶
func (controller *DeleteObject) RequiredPermissions(_ *http.Request, repoID, _, path string) ([]permissions.Permission, error)
type DeleteObjects ¶
type DeleteObjects struct{}
func (*DeleteObjects) Handle ¶
func (controller *DeleteObjects) Handle(o *RepoOperation)
func (*DeleteObjects) RequiredPermissions ¶
func (controller *DeleteObjects) RequiredPermissions(_ *http.Request, _ string) ([]permissions.Permission, error)
type GetObject ¶
type GetObject struct{}
func (*GetObject) Handle ¶
func (controller *GetObject) Handle(o *PathOperation)
func (*GetObject) RequiredPermissions ¶
func (controller *GetObject) RequiredPermissions(_ *http.Request, repoID, _, path string) ([]permissions.Permission, error)
type HeadBucket ¶
type HeadBucket struct{}
func (*HeadBucket) Handle ¶
func (controller *HeadBucket) Handle(o *RepoOperation)
func (*HeadBucket) RequiredPermissions ¶
func (controller *HeadBucket) RequiredPermissions(_ *http.Request, repoID string) ([]permissions.Permission, error)
type HeadObject ¶
type HeadObject struct{}
func (*HeadObject) Handle ¶
func (controller *HeadObject) Handle(o *PathOperation)
func (*HeadObject) RequiredPermissions ¶
func (controller *HeadObject) RequiredPermissions(request *http.Request, repoID, branchID, path string) ([]permissions.Permission, error)
type ListBuckets ¶
type ListBuckets struct{}
func (*ListBuckets) Handle ¶
func (controller *ListBuckets) Handle(o *AuthenticatedOperation)
func (*ListBuckets) RequiredPermissions ¶
func (controller *ListBuckets) RequiredPermissions(_ *http.Request) ([]permissions.Permission, error)
type ListObjects ¶
type ListObjects struct{}
func (*ListObjects) Handle ¶
func (controller *ListObjects) Handle(o *RepoOperation)
func (*ListObjects) ListV1 ¶
func (controller *ListObjects) ListV1(o *RepoOperation)
func (*ListObjects) ListV2 ¶
func (controller *ListObjects) ListV2(o *RepoOperation)
func (*ListObjects) RequiredPermissions ¶
func (controller *ListObjects) RequiredPermissions(request *http.Request, repoID string) ([]permissions.Permission, error)
type Operation ¶
type Operation struct { Request *http.Request ResponseWriter http.ResponseWriter Region string FQDN string Cataloger catalog.Cataloger BlockStore block.Adapter Auth simulator.GatewayAuthService Incr ActionIncr DedupCleaner *dedup.Cleaner }
func (*Operation) AddLogFields ¶
func (*Operation) EncodeError ¶
func (*Operation) EncodeResponse ¶
func (*Operation) EncodeXMLBytes ¶
func (*Operation) SetHeaders ¶
SetHeaders sets a map of headers on the response while preserving the header's case
type OperationHandler ¶
type OperationHandler interface { RequiredPermissions(request *http.Request) ([]permissions.Permission, error) Handle(op *Operation) }
type PathOperation ¶
type PathOperation struct { *RefOperation Path string }
func (*PathOperation) EncodeError ¶
func (o *PathOperation) EncodeError(err errors.APIError)
type PathOperationHandler ¶
type PathOperationHandler interface { RequiredPermissions(request *http.Request, repository, branch, path string) ([]permissions.Permission, error) Handle(op *PathOperation) }
type PostObject ¶
type PostObject struct{}
func (*PostObject) Handle ¶
func (controller *PostObject) Handle(o *PathOperation)
func (*PostObject) HandleCompleteMultipartUpload ¶
func (controller *PostObject) HandleCompleteMultipartUpload(o *PathOperation)
func (*PostObject) HandleCreateMultipartUpload ¶
func (controller *PostObject) HandleCreateMultipartUpload(o *PathOperation)
func (*PostObject) RequiredPermissions ¶
func (controller *PostObject) RequiredPermissions(_ *http.Request, repoID, _, path string) ([]permissions.Permission, error)
type PutObject ¶
type PutObject struct{}
func (*PutObject) Handle ¶
func (controller *PutObject) Handle(o *PathOperation)
func (*PutObject) HandleCopy ¶
func (controller *PutObject) HandleCopy(o *PathOperation, copySource string)
func (*PutObject) HandleUploadPart ¶
func (controller *PutObject) HandleUploadPart(o *PathOperation)
func (*PutObject) RequiredPermissions ¶
func (controller *PutObject) RequiredPermissions(_ *http.Request, repoID, _, path string) ([]permissions.Permission, error)
type RefOperation ¶
type RefOperation struct { *RepoOperation Reference string }
type RepoOperation ¶
type RepoOperation struct { *AuthenticatedOperation Repository *catalog.Repository }
func (*RepoOperation) EncodeError ¶
func (o *RepoOperation) EncodeError(err errors.APIError)
type RepoOperationHandler ¶
type RepoOperationHandler interface { RequiredPermissions(request *http.Request, repository string) ([]permissions.Permission, error) Handle(op *RepoOperation) }
Click to show internal directories.
Click to hide internal directories.