s3

package
v0.0.0-...-536971d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Service *Service
	Name    string `json:"Bucket"`
}

func NewBucketFromFile

func NewBucketFromFile(path string) (*Bucket, error)

func (*Bucket) Delete

func (b *Bucket) Delete(keys []string) (*DeleteResult, error)

func (*Bucket) Get

func (b *Bucket) Get(key string) ([]byte, error)

func (*Bucket) List

func (b *Bucket) List(prefix, delimiter string) (*ListBucketResult, error)

func (*Bucket) Put

func (b *Bucket) Put(key string, data []byte) error

func (*Bucket) URL

func (b *Bucket) URL(path string, values url.Values) *url.URL

type Delete

type Delete struct {
	Keys []deleteKey `xml:"Object"`
}

type DeleteError

type DeleteError struct {
	Key     string
	Code    string
	Message string
}

type DeleteResult

type DeleteResult struct {
	Object []string `xml:">Key"`
	Error  []*DeleteError
}

func (*DeleteResult) GetError

func (d *DeleteResult) GetError() error

type ListBucketResult

type ListBucketResult struct {
	IsTruncated    bool
	Contents       []string `xml:">Key"`
	CommonPrefixes []string `xml:">Prefix"`
}

type Service

type Service struct {
	Name        string       // "s3", "iam", ...
	Endpoint    string       // "s3.amazonaws.com"
	Region      string       // "us-east-1"
	AccessKey   string       // Secret Access Key
	AccessKeyId string       // Access Key Id
	Client      *http.Client `json:"-"`
}

type ServiceError

type ServiceError struct {
	Code      string
	Message   string
	Resource  string
	RequestId string
}

func (*ServiceError) Error

func (e *ServiceError) Error() string

Jump to

Keyboard shortcuts

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