handler

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s fs.Service) http.Handler

Types

type BucketInfo

type BucketInfo struct {
	Name         string    `xml:"Name"`
	CreationDate time.Time `xml:"CreationDate"`
}

BucketInfo is the XML representation of a bucket.

type BucketsWrapper

type BucketsWrapper struct {
	Buckets []BucketInfo `xml:"Bucket"`
}

BucketsWrapper wraps the list of buckets.

type CommonPrefix added in v0.3.0

type CommonPrefix struct {
	Prefix string `xml:"Prefix"`
}

CommonPrefix is a grouped key prefix produced by delimiter-based listing.

type CompleteMultipartUploadResult added in v0.0.4

type CompleteMultipartUploadResult struct {
	XMLName  xml.Name `xml:"CompleteMultipartUploadResult"`
	Xmlns    string   `xml:"xmlns,attr"`
	Location string   `xml:"Location"`
	Bucket   string   `xml:"Bucket"`
	Key      string   `xml:"Key"`
	ETag     string   `xml:"ETag"`
}

CompleteMultipartUploadResult represents the response for completing multipart upload.

type CompleteMultipartUploadXML added in v0.0.4

type CompleteMultipartUploadXML struct {
	XMLName xml.Name           `xml:"CompleteMultipartUpload"`
	Parts   []CompletedPartXML `xml:"Part"`
}

CompleteMultipartUploadXML represents the XML request body for completing multipart upload.

type CompletedPartXML added in v0.0.4

type CompletedPartXML struct {
	PartNumber int    `xml:"PartNumber"`
	ETag       string `xml:"ETag"`
}

CompletedPartXML represents a part in the completion request.

type CopyObjectResult added in v0.3.0

type CopyObjectResult struct {
	XMLName      xml.Name  `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CopyObjectResult"`
	LastModified time.Time `xml:"LastModified"`
	ETag         string    `xml:"ETag"`
}

CopyObjectResult is the XML response for a CopyObject operation.

type DeleteError added in v0.0.5

type DeleteError struct {
	Key       string `xml:"Key"`
	Code      string `xml:"Code"`
	Message   string `xml:"Message"`
	VersionId string `xml:"VersionId,omitempty"`
}

DeleteError represents an error deleting an object.

type DeleteObjectsRequest added in v0.0.5

type DeleteObjectsRequest struct {
	XMLName xml.Name         `xml:"Delete"`
	Objects []ObjectToDelete `xml:"Object"`
	Quiet   bool             `xml:"Quiet"`
}

DeleteObjectsRequest represents the XML request body for deleting multiple objects.

type DeleteObjectsResult added in v0.0.5

type DeleteObjectsResult struct {
	XMLName xml.Name        `xml:"DeleteResult"`
	Xmlns   string          `xml:"xmlns,attr"`
	Deleted []DeletedObject `xml:"Deleted,omitempty"`
	Errors  []DeleteError   `xml:"Error,omitempty"`
}

DeleteObjectsResult represents the response for deleting multiple objects.

type DeletedObject added in v0.0.5

type DeletedObject struct {
	Key                   string `xml:"Key"`
	VersionId             string `xml:"VersionId,omitempty"`
	DeleteMarker          bool   `xml:"DeleteMarker,omitempty"`
	DeleteMarkerVersionId string `xml:"DeleteMarkerVersionId,omitempty"`
}

DeletedObject represents a successfully deleted object.

type Error

type Error struct {
	TraceID string `json:"trace_id"`
	SpanID  string `json:"span_id"`
	Message string `json:"message"`
}

type InitiateMultipartUploadResult added in v0.0.4

type InitiateMultipartUploadResult struct {
	XMLName  xml.Name `xml:"InitiateMultipartUploadResult"`
	Xmlns    string   `xml:"xmlns,attr"`
	Bucket   string   `xml:"Bucket"`
	Key      string   `xml:"Key"`
	UploadID string   `xml:"UploadId"`
}

InitiateMultipartUploadResult represents the response for initiating multipart upload.

type ListAllMyBucketsResult

type ListAllMyBucketsResult struct {
	XMLName xml.Name       `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListAllMyBucketsResult"`
	Buckets BucketsWrapper `xml:"Buckets"`
}

ListAllMyBucketsResult is the XML response for listing buckets.

type ListBucketResult

type ListBucketResult struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult"`
	Name    string   `xml:"Name"`
	Prefix  string   `xml:"Prefix"`

	// V2 pagination.
	ContinuationToken     string `xml:"ContinuationToken,omitempty"`
	NextContinuationToken string `xml:"NextContinuationToken,omitempty"`
	StartAfter            string `xml:"StartAfter,omitempty"`
	KeyCount              int    `xml:"KeyCount,omitempty"`

	// V1 pagination.
	Marker     string `xml:"Marker,omitempty"`
	NextMarker string `xml:"NextMarker,omitempty"`

	MaxKeys      int    `xml:"MaxKeys"`
	Delimiter    string `xml:"Delimiter,omitempty"`
	EncodingType string `xml:"EncodingType,omitempty"`
	IsTruncated  bool   `xml:"IsTruncated"`

	Contents       []ObjectInfo   `xml:"Contents"`
	CommonPrefixes []CommonPrefix `xml:"CommonPrefixes"`
}

ListBucketResult is the XML response for ListObjects (v1) and ListObjectsV2.

type ObjectInfo

type ObjectInfo struct {
	Key          string    `xml:"Key"`
	LastModified time.Time `xml:"LastModified"`
	ETag         string    `xml:"ETag,omitempty"`
	Size         int64     `xml:"Size"`
	StorageClass string    `xml:"StorageClass,omitempty"`
}

ObjectInfo is the XML representation of an object in a bucket listing.

type ObjectToDelete added in v0.0.5

type ObjectToDelete struct {
	Key       string `xml:"Key"`
	VersionId string `xml:"VersionId,omitempty"`
}

ObjectToDelete represents an object to be deleted.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL