ezs3

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListObjects

func ListObjects(ctx context.Context, opts ListObjectsOptions) (contents []ListBucketContent, prefixes []ListBucketCommonPrefix, err error)

ListObjects list objects from s3 compatible storage

Types

type ListBucketCommonPrefix

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

type ListBucketContent

type ListBucketContent struct {
	Key  string `xml:"Key"`
	ETag string `xml:"ETag"`
	Size int64  `xml:"Size"`
}

type ListBucketResult

type ListBucketResult struct {
	XMLName xml.Name `xml:"ListBucketResult"`

	Name           string                   `xml:"Name"`
	Prefix         string                   `xml:"Prefix"`
	Marker         string                   `xml:"Marker"`
	NextMarker     string                   `xml:"NextMarker"`
	IsTruncated    bool                     `xml:"IsTruncated"`
	Contents       []ListBucketContent      `xml:"Contents"`
	CommonPrefixes []ListBucketCommonPrefix `xml:"CommonPrefixes"`
}

type ListObjectsOptions

type ListObjectsOptions struct {
	Endpoint  string
	Prefix    string
	Marker    string
	Delimiter string
	MaxKeys   int64
}

func (ListObjectsOptions) AsMap

func (o ListObjectsOptions) AsMap() map[string]string

Jump to

Keyboard shortcuts

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