s3datatypes

package
v0.0.0-...-d88ec87 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonPrefix

type CommonPrefix struct {
	Prefix string
}

CommonPrefix container for prefix response.

func (CommonPrefix) String

func (cp CommonPrefix) String() string

type CommonPrefixes

type CommonPrefixes []CommonPrefix

CommonPrefixes is slice of CommonPrefix

func (CommonPrefixes) FromStringer

func (cp CommonPrefixes) FromStringer(stringers []fmt.Stringer) CommonPrefixes

FromStringer returns asserted stringer slice to CommonPrefixes

func (CommonPrefixes) ToStringer

func (cp CommonPrefixes) ToStringer() []fmt.Stringer

ToStringer returns asserted ObjectInfos to Stringer slice

type DeleteMarkerInfo

type DeleteMarkerInfo struct {
	Key          string
	VersionID    string `xml:"VersionId"`
	IsLatest     bool
	LastModified time.Time
	Owner        UserInfo
}

DeleteMarkerInfo container

func (DeleteMarkerInfo) GetKey

func (dmi DeleteMarkerInfo) GetKey() string

GetKey returns key to satisfy Marker interface

func (DeleteMarkerInfo) GetVersionID

func (dmi DeleteMarkerInfo) GetVersionID() string

GetVersionID returns key to satisfy Marker interface

func (DeleteMarkerInfo) String

func (dmi DeleteMarkerInfo) String() string

type DeleteMarkerInfos

type DeleteMarkerInfos []DeleteMarkerInfo

DeleteMarkerInfos is slice []DeleteMarkerInfo

func (DeleteMarkerInfos) FromStringer

func (dmi DeleteMarkerInfos) FromStringer(stringers []fmt.Stringer) DeleteMarkerInfos

FromStringer returns asserted stringer slice to DeleteMarkerInfos

func (DeleteMarkerInfos) ToStringer

func (dmi DeleteMarkerInfos) ToStringer() []fmt.Stringer

ToStringer returns asserted ObjectInfos to Stringer slice

type ListBucketResult

type ListBucketResult struct {
	// A response can contain CommonPrefixes only if you have
	// specified a delimiter.
	CommonPrefixes CommonPrefixes
	// Metadata about each object returned.
	Contents  ObjectInfos
	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     int64
	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.
	// Object storage 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
}

ListBucketResult container for listObjects response.

type ListBucketV2Result

type ListBucketV2Result struct {
	// A response can contain CommonPrefixes only if you have
	// specified a delimiter.
	CommonPrefixes CommonPrefixes
	// Metadata about each object returned.
	Contents  ObjectInfos
	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
	MaxKeys     int64
	Name        string

	// Hold the token that will be sent in the next request to fetch the next group of keys
	NextContinuationToken string

	ContinuationToken string
	Prefix            string

	// FetchOwner and StartAfter are currently not used
	FetchOwner string
	StartAfter string
}

ListBucketV2Result container for listObjects response version 2.

type ListMultipartUploadsResult

type ListMultipartUploadsResult struct {
	Bucket             string
	KeyMarker          string
	UploadIDMarker     string `xml:"UploadIdMarker"`
	NextKeyMarker      string
	NextUploadIDMarker string `xml:"NextUploadIdMarker"`
	EncodingType       string
	MaxUploads         int64
	IsTruncated        bool
	Uploads            []ObjectMultipartInfo `xml:"Upload"`
	Prefix             string
	Delimiter          string
	// A response can contain CommonPrefixes only if you specify a delimiter.
	CommonPrefixes []CommonPrefix
}

ListMultipartUploadsResult decodes s3 multipart upload results

type ListVersionsResult

type ListVersionsResult struct {
	Name   string
	Prefix string
	// KeyMarker Marks the last Key returned in a truncated response.
	KeyMarker string
	// VersionIDMarker Marks the last version of the Key returned in a truncated response.
	VersionIDMarker string
	MaxKeys         int64
	EncodingType    string

	// A flag that indicates whether or not ListObjects returned all of the results
	// that satisfied the search criteria.
	IsTruncated  bool
	Version      VersionInfos
	DeleteMarker DeleteMarkerInfos
	// 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.
	// Object storage 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.
	NextKeyMarker       string
	NextVersionIDMarker string `xml:"NextVersionIdMarker"`
}

ListVersionsResult container for Bucket Object versions response see: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETVersion.html

type ObjectInfo

type ObjectInfo struct {
	// An ETag is optionally set to md5sum of an object.  In case of multipart objects,
	// ETag is of the form MD5SUM-N where MD5SUM is md5sum of all individual md5sums of
	// each parts concatenated into one string.
	ETag string `json:"etag"`

	Key          string    `json:"name"`         // Name of the object
	LastModified time.Time `json:"lastModified"` // Date and time the object was last modified.
	Size         int64     `json:"size"`         // Size in bytes of the object.
	ContentType  string    `json:"contentType"`  // A standard MIME type describing the format of the object data.

	// Collection of additional metadata on the object.
	// eg: x-amz-meta-*, content-encoding etc.
	Metadata http.Header `json:"metadata" xml:"-"`

	// Owner name.
	Owner struct {
		DisplayName string `json:"name"`
		ID          string `json:"id"`
	} `json:"owner"`

	// The class of storage used to store the object.
	StorageClass string `json:"storageClass"`

	// Error
	Err error `json:"-"`
}

ObjectInfo container for object metadata.

func (ObjectInfo) String

func (oi ObjectInfo) String() string

type ObjectInfos

type ObjectInfos []ObjectInfo

ObjectInfos is slice of ObjectInfo

func (ObjectInfos) FromStringer

func (ois ObjectInfos) FromStringer(stringers []fmt.Stringer) ObjectInfos

FromStringer returns asserted stringer slice to ObjectInfos

func (ObjectInfos) ToStringer

func (ois ObjectInfos) ToStringer() []fmt.Stringer

ToStringer returns slice of stringers

type ObjectMultipartInfo

type ObjectMultipartInfo struct {
	// Date and time at which the multipart upload was initiated.
	Initiated time.Time `type:"timestamp" timestampFormat:"iso8601"`

	Initiator UserInfo
	Owner     UserInfo

	// The type of storage to use for the object. Defaults to 'STANDARD'.
	StorageClass string

	// Key of the object for which the multipart upload was initiated.
	Key string

	// Size in bytes of the object.
	Size int64

	// Upload ID that identifies the multipart upload.
	UploadID string `xml:"UploadId"`

	// Error
	Err error
}

ObjectMultipartInfo container for multipart object metadata.

type UserInfo

type UserInfo struct {
	ID          string
	DisplayName string
}

UserInfo owner info container

type VersionInfo

type VersionInfo struct {
	Key          string
	VersionID    string `xml:"VersionId"`
	IsLatest     bool
	LastModified time.Time
	ETag         string
	Size         int64
	StorageClass string
	Owner        UserInfo
}

VersionInfo version item container

func (VersionInfo) GetKey

func (vi VersionInfo) GetKey() string

GetKey returns key to satisfy Marker interface

func (VersionInfo) GetVersionID

func (vi VersionInfo) GetVersionID() string

GetVersionID returns key to satisfy Marker interface

func (VersionInfo) String

func (vi VersionInfo) String() string

type VersionInfos

type VersionInfos []VersionInfo

VersionInfos is slice []VersionInfo

func (VersionInfos) FromStringer

func (vi VersionInfos) FromStringer(stringers []fmt.Stringer) VersionInfos

FromStringer returns asserted stringer slice to VersionInfos

func (VersionInfos) ToStringer

func (vi VersionInfos) ToStringer() []fmt.Stringer

ToStringer returns asserted ObjectInfos to Stringer slice

type VersionMarker

type VersionMarker interface {
	GetKey() string
	GetVersionID() string
}

VersionMarker describes version entry interface

Jump to

Keyboard shortcuts

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