s3

package
v0.0.0-...-29ac425 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2013 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	USStandard   = &aws.Region{"https", "s3.amazonaws.com"}
	USWest1      = &aws.Region{"https", "s3-us-west-1.amazonaws.com"}
	USWest2      = &aws.Region{"https", "s3-us-west-2.amazonaws.com"}
	EUWest1      = &aws.Region{"https", "s3-eu-west-1.amazonaws.com"}
	APSouthEast1 = &aws.Region{"https", "s3-as-southeast-1.amazonaws.com"}
	APSouthEast2 = &aws.Region{"https", "s3-as-southeast-2.amazonaws.com"}
	APNorthEast2 = &aws.Region{"https", "s3-as-northeast-2.amazonaws.com"}
	SAEast1      = &aws.Region{"https", "s3-sa-east-1.amazonaws.com"}
)

Functions

This section is empty.

Types

type AclGrantee

type AclGrantee struct {
	EmailAddress string
	Id           string
	Uri          string
}

func (AclGrantee) String

func (grantee AclGrantee) String() string

type Client

type Client struct {
	*aws.Credentials
	*aws.Region
	// contains filtered or unexported fields
}

func NewClient

func NewClient(creds *aws.Credentials, region *aws.Region) *Client

func (*Client) DeleteObject

func (client *Client) DeleteObject(bucket, key string) *DeleteObject

func (*Client) Do

func (client *Client) Do(req Request) (*http.Response, error)

func (*Client) GetObject

func (client *Client) GetObject(bucket, key string) *GetObject

func (*Client) PutObject

func (client *Client) PutObject(bucket, key string) *PutObject

func (*Client) Request

func (client *Client) Request(req Request) (*http.Request, error)

Creates a signed request from req

func (*Client) Sign

func (client *Client) Sign(req *http.Request)

REST authentication

func (*Client) SignUrl

func (client *Client) SignUrl(req *url.URL, lifetime int64)

Query string authentication

type DeleteObject

type DeleteObject struct {
	// contains filtered or unexported fields
}

func (*DeleteObject) Exec

func (request *DeleteObject) Exec() (*DeleteObjectResponse, error)

func (*DeleteObject) MFA

func (request *DeleteObject) MFA(serial, value string) *DeleteObject

func (*DeleteObject) Request

func (request *DeleteObject) Request(region *aws.Region) (*http.Request, error)

type DeleteObjectResponse

type DeleteObjectResponse struct {
	Header http.Header
	Body   io.ReadCloser
	// contains filtered or unexported fields
}

func (*DeleteObjectResponse) Status

func (response *DeleteObjectResponse) Status() string

func (*DeleteObjectResponse) StatusCode

func (response *DeleteObjectResponse) StatusCode() int

type Error

type Error struct {
	Code              string
	Message           string
	RequestId, HostId string
	Header            string
	StringToSignBytes string
	SignatureProvided string
}

func (*Error) Error

func (err *Error) Error() string

func (*Error) StringToSign

func (err *Error) StringToSign() string

type GetObject

type GetObject struct {
	// contains filtered or unexported fields
}

func (*GetObject) Exec

func (request *GetObject) Exec() (*GetObjectResponse, error)

func (*GetObject) IfMatch

func (request *GetObject) IfMatch(etag string) *GetObject

func (*GetObject) IfModifiedSince

func (request *GetObject) IfModifiedSince(latest time.Time) *GetObject

func (*GetObject) IfNoneMatch

func (request *GetObject) IfNoneMatch(etag string) *GetObject

func (*GetObject) IfUnmodifiedSince

func (request *GetObject) IfUnmodifiedSince(latest time.Time) *GetObject

func (*GetObject) Range

func (request *GetObject) Range(h string) *GetObject

func (*GetObject) Request

func (request *GetObject) Request(region *aws.Region) (*http.Request, error)

func (*GetObject) ResponseContentDisposition

func (request *GetObject) ResponseContentDisposition(q string) *GetObject

func (*GetObject) ResponseContentEncoding

func (request *GetObject) ResponseContentEncoding(q string) *GetObject

func (*GetObject) ResponseContentLanguage

func (request *GetObject) ResponseContentLanguage(q string) *GetObject

func (*GetObject) ResponseContentType

func (request *GetObject) ResponseContentType(mime string) *GetObject

func (*GetObject) ResponseExpires

func (request *GetObject) ResponseExpires(q string) *GetObject

func (*GetObject) ResponseResponseCacheControl

func (request *GetObject) ResponseResponseCacheControl(q string) *GetObject

type GetObjectResponse

type GetObjectResponse struct {
	Header http.Header
	Body   io.ReadCloser
	// contains filtered or unexported fields
}

func (*GetObjectResponse) Status

func (response *GetObjectResponse) Status() string

func (*GetObjectResponse) StatusCode

func (response *GetObjectResponse) StatusCode() int

type PutObject

type PutObject struct {
	// contains filtered or unexported fields
}

func (*PutObject) Acl

func (request *PutObject) Acl(acl string) *PutObject

func (*PutObject) CacheControl

func (request *PutObject) CacheControl(control string) *PutObject

func (*PutObject) Content

func (request *PutObject) Content(data []byte) *PutObject

func (*PutObject) ContentEncoding

func (request *PutObject) ContentEncoding(enc string) *PutObject

func (*PutObject) ContentType

func (request *PutObject) ContentType(mime string) *PutObject

func (*PutObject) CopySource

func (request *PutObject) CopySource(bucket, key string) *PutObject

func (*PutObject) CopySourceIfMatch

func (request *PutObject) CopySourceIfMatch(etag string) *PutObject

func (*PutObject) CopySourceIfModifiedSince

func (request *PutObject) CopySourceIfModifiedSince(latest time.Time) *PutObject

func (*PutObject) CopySourceIfNoneMatch

func (request *PutObject) CopySourceIfNoneMatch(etag string) *PutObject

func (*PutObject) CopySourceIfUnmodifiedSince

func (request *PutObject) CopySourceIfUnmodifiedSince(latest time.Time) *PutObject

func (*PutObject) Exec

func (request *PutObject) Exec() (*PutObjectResponse, error)

func (*PutObject) Expires

func (request *PutObject) Expires(lifetime time.Duration) *PutObject

func (*PutObject) FullControl

func (request *PutObject) FullControl(grantee AclGrantee) *PutObject

func (*PutObject) MetadataDirective

func (request *PutObject) MetadataDirective(copyreplace string) *PutObject

func (*PutObject) Read

func (request *PutObject) Read(grantee AclGrantee) *PutObject

func (*PutObject) ReadAcp

func (request *PutObject) ReadAcp(grantee AclGrantee) *PutObject

func (*PutObject) Request

func (request *PutObject) Request(region *aws.Region) (*http.Request, error)

func (*PutObject) ServerSideEncryption

func (request *PutObject) ServerSideEncryption(algorithm string) *PutObject

func (*PutObject) StorageClass

func (request *PutObject) StorageClass(class string) *PutObject

func (*PutObject) WebsiteRedirectLocation

func (request *PutObject) WebsiteRedirectLocation(uri string) *PutObject

func (*PutObject) WriteAcp

func (request *PutObject) WriteAcp(grantee AclGrantee) *PutObject

type PutObjectResponse

type PutObjectResponse struct {
	Header http.Header
	// contains filtered or unexported fields
}

func (*PutObjectResponse) Status

func (response *PutObjectResponse) Status() string

func (*PutObjectResponse) StatusCode

func (response *PutObjectResponse) StatusCode() int

type Request

type Request interface {
	Request(*aws.Region) (*http.Request, error)
}

Jump to

Keyboard shortcuts

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