s3

package
v0.0.0-...-1a19813 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2015 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateExpirableLink(bucket, path string, expires time.Time, creds awsgo.Credentials) string

Generates an expirable link to an s3 object Generated link will be: "//s3.amazonaws.com/{bucket}/{path}?{queryargs}"

func GenerateExpirableLinkVersion

func GenerateExpirableLinkVersion(bucket, path string, expires time.Time, creds awsgo.Credentials, version string) string

Generates an expirable link to an s3 object Generated link will be: "//s3.amazonaws.com/{bucket}/{path}?{queryargs}"

Types

type BadStatusCodeError

type BadStatusCodeError struct {
	StatusCode int
	Content    string
}

func (BadStatusCodeError) Error

func (b BadStatusCodeError) Error() string

type GetObjectRequest

type GetObjectRequest struct {
	awsgo.RequestBuilder

	// headers
	Range             string
	IfModifiedSince   string
	IfUnmodifiedSince string
	IfMatch           string
	IfNoneMatch       string
	VersionId         string

	// the file
	Path string
}

func NewGetObjectRequest

func NewGetObjectRequest() *GetObjectRequest

func NewHeadObjectRequest

func NewHeadObjectRequest() *GetObjectRequest

func (GetObjectRequest) DeMarshalResponse

func (por GetObjectRequest) DeMarshalResponse(a []byte, headers map[string]string, statusCode int) interface{}

func (GetObjectRequest) Request

func (gor GetObjectRequest) Request() (*GetObjectResponse, error)

func (*GetObjectRequest) VerifyInput

func (gi *GetObjectRequest) VerifyInput() error

type GetObjectResponse

type GetObjectResponse struct {
	// headers
	DeleteMarker            bool
	Expiration              string
	Encyption               string
	Restore                 string
	VersionId               string
	WebsiteRedirectLocation string
	// Actual Data
	Data       []byte
	StatusCode int
}

type PutObjectRequest

type PutObjectRequest struct {
	awsgo.RequestBuilder

	Source               io.ReadCloser
	Length               int64
	ContentType          string
	Permissions          string
	Path                 string
	ServerSideEncryption bool
}

func NewPutObjectRequest

func NewPutObjectRequest() *PutObjectRequest

func (PutObjectRequest) CoDoAndDemarshall

func (por PutObjectRequest) CoDoAndDemarshall(request awsgo.AwsRequest, future *PutObjectResponseFuture)

func (PutObjectRequest) CoRequest

func (por PutObjectRequest) CoRequest() (*PutObjectResponseFuture, error)

func (PutObjectRequest) DeMarshalResponse

func (por PutObjectRequest) DeMarshalResponse(a []byte, headers map[string]string, statusCode int) interface{}

func (PutObjectRequest) Request

func (por PutObjectRequest) Request() (*PutObjectResponse, error)

func (*PutObjectRequest) VerifyInput

func (por *PutObjectRequest) VerifyInput() error

type PutObjectResponse

type PutObjectResponse struct {
	Hash       string
	RequestId  string
	RequestId2 string
	VersionId  string
	StatusCode int
}

type PutObjectResponseFuture

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

Jump to

Keyboard shortcuts

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