s3response

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RFC3339TimeFormat = "2006-01-02T15:04:05.999Z"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlList

type AccessControlList struct {
	Grant []Grant
}

type AccessControlPolicy

type AccessControlPolicy struct {
	XMLName           xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ AccessControlPolicy" json:"-"`
	Owner             CanonicalUser
	AccessControlList AccessControlList
}

type Bucket

type Bucket struct {
	Name  string `json:"name"`
	Owner string `json:"owner"`
}

type CanonicalUser

type CanonicalUser struct {
	ID          string
	DisplayName string
}

type CommonPrefix

type CommonPrefix struct {
	Prefix string
}

CommonPrefix ListObjectsResponse common prefixes (directory abstraction)

type CopyObjectResult

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

type DeleteObjects

type DeleteObjects struct {
	Objects []types.ObjectIdentifier `xml:"Object"`
}

type DeleteResult

type DeleteResult struct {
	Deleted []types.DeletedObject
	Error   []types.Error
}

type GetObjectAttributesResult

type GetObjectAttributesResult struct {
	ETag         *string
	LastModified *time.Time
	ObjectSize   *int64
	StorageClass types.StorageClass
	VersionId    *string
	ObjectParts  *ObjectParts
}

type Grant

type Grant struct {
	Grantee    Grantee
	Permission string
}

type Grantee

type Grantee struct {
	XMLName     xml.Name `xml:"Grantee"`
	Xsi         string   `xml:"xmlns:xsi,attr,omitempty"`
	Type        string   `xml:"xsi:type,attr,omitempty"`
	ID          string
	DisplayName string
}

Set the following to encode correctly:

Grantee: s3response.Grantee{
	Xsi:         "http://www.w3.org/2001/XMLSchema-instance",
	Type:        "CanonicalUser",
},

type InitiateMultipartUploadResult added in v1.0.6

type InitiateMultipartUploadResult struct {
	XMLName  xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InitiateMultipartUploadResult" json:"-"`
	Bucket   string
	Key      string
	UploadId string
}

type Initiator

type Initiator Owner

Initiator same fields as Owner

type ListAllMyBucketsEntry

type ListAllMyBucketsEntry struct {
	Name         string
	CreationDate time.Time
}

type ListAllMyBucketsList

type ListAllMyBucketsList struct {
	Bucket []ListAllMyBucketsEntry
}

type ListAllMyBucketsResult

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

type ListMultipartUploadsResult

type ListMultipartUploadsResult 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 - s3 api list multipart uploads response.

type ListObjectsResult added in v1.0.6

type ListObjectsResult struct {
	XMLName        xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult" json:"-"`
	Name           *string
	Prefix         *string
	Marker         *string
	NextMarker     *string
	MaxKeys        *int32
	Delimiter      *string
	IsTruncated    *bool
	Contents       []Object
	CommonPrefixes []types.CommonPrefix
	EncodingType   types.EncodingType
}

type ListObjectsV2Result added in v1.0.6

type ListObjectsV2Result struct {
	XMLName               xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult" json:"-"`
	Name                  *string
	Prefix                *string
	StartAfter            *string
	ContinuationToken     *string
	NextContinuationToken *string
	KeyCount              *int32
	MaxKeys               *int32
	Delimiter             *string
	IsTruncated           *bool
	Contents              []Object
	CommonPrefixes        []types.CommonPrefix
	EncodingType          types.EncodingType
}

type ListPartsResult

type ListPartsResult 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 types.StorageClass

	PartNumberMarker     int
	NextPartNumberMarker int
	MaxParts             int
	IsTruncated          bool

	// List of parts.
	Parts []Part `xml:"Part"`
}

ListPartsResponse - s3 api list parts response.

type Object added in v1.0.6

type Object struct {
	ETag          *string
	Key           *string
	LastModified  *time.Time
	Owner         *types.Owner
	RestoreStatus *types.RestoreStatus
	Size          *int64
	StorageClass  types.ObjectStorageClass
}

func (Object) MarshalXML added in v1.0.6

func (o Object) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type ObjectParts

type ObjectParts struct {
	PartNumberMarker     int
	NextPartNumberMarker int
	MaxParts             int
	IsTruncated          bool
	Parts                []types.ObjectPart `xml:"Part"`
}

type Owner

type Owner struct {
	ID          string
	DisplayName string
}

Owner bucket ownership

type OwnershipControls added in v1.0.3

type OwnershipControls struct {
	Rules []types.OwnershipControlsRule `xml:"Rule"`
}

type Part

type Part struct {
	PartNumber   int
	LastModified time.Time
	ETag         string
	Size         int64
}

Part describes part metadata.

func (Part) MarshalXML added in v1.0.6

func (p Part) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type SelectObjectContentPayload

type SelectObjectContentPayload struct {
	Expression          *string
	ExpressionType      types.ExpressionType
	RequestProgress     *types.RequestProgress
	InputSerialization  *types.InputSerialization
	OutputSerialization *types.OutputSerialization
	ScanRange           *types.ScanRange
}

type SelectObjectContentResult

type SelectObjectContentResult struct {
	Records  *types.RecordsEvent
	Stats    *types.StatsEvent
	Progress *types.ProgressEvent
	Cont     *types.ContinuationEvent
	End      *types.EndEvent
}

type Tag

type Tag struct {
	Key   string `xml:"Key"`
	Value string `xml:"Value"`
}

type TagSet

type TagSet struct {
	Tags []Tag `xml:"Tag"`
}

type Tagging

type Tagging struct {
	XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Tagging" json:"-"`
	TagSet  TagSet   `xml:"TagSet"`
}

type TaggingInput

type TaggingInput struct {
	TagSet TagSet `xml:"TagSet"`
}

type Upload

type Upload struct {
	Key          string
	UploadID     string `xml:"UploadId"`
	Initiator    Initiator
	Owner        Owner
	StorageClass types.StorageClass
	Initiated    time.Time
}

Upload describes in progress multipart upload

func (Upload) MarshalXML added in v1.0.6

func (u Upload) MarshalXML(e *xml.Encoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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