s3

package
v0.0.0-...-d7f6bd1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) (client.Client, error)

New returns an initialized s3Client structure. if debug use a internal trace transport

Types

type Config

type Config struct {
	AccessKeyID     string
	SecretAccessKey string
	HostURL         string
	AppName         string
	AppVersion      string
	AppComments     []string
	Debug           bool

	// Used for SSL transport layer
	CertPEM string
	KeyPEM  string
}

Config - see http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html

type HTTPTracer

type HTTPTracer interface {
	Request(req *http.Request) error
	Response(res *http.Response) error
}

HTTPTracer provides callback hook mechanism for HTTP transport.

func NewTrace

func NewTrace() HTTPTracer

NewTrace - initialize Trace structure

type ObjectAlreadyExists

type ObjectAlreadyExists struct {
	Object string
}

ObjectAlreadyExists - typed return for MethodNotAllowed

func (ObjectAlreadyExists) Error

func (e ObjectAlreadyExists) Error() string

type RoundTripTrace

type RoundTripTrace struct {
	Trace     HTTPTracer        // User provides callback methods
	Transport http.RoundTripper // HTTP transport that needs to be intercepted
}

RoundTripTrace interposes HTTP transport requests and respsonses using HTTPTracer hooks

func GetNewTraceTransport

func GetNewTraceTransport(trace HTTPTracer, transport http.RoundTripper) RoundTripTrace

GetNewTraceTransport returns a traceable transport

func (RoundTripTrace) RoundTrip

func (t RoundTripTrace) RoundTrip(req *http.Request) (res *http.Response, err error)

RoundTrip executes user provided request and response hooks for each HTTP call.

type TLSConfig

type TLSConfig struct {
	CertPEMBlock []byte
	KeyPEMBlock  []byte
}

TLSConfig - TLS cert and key configuration

type Trace

type Trace struct {
}

Trace - tracing structure

func (Trace) Request

func (t Trace) Request(req *http.Request) (err error)

Request - Trace HTTP Request

func (Trace) Response

func (t Trace) Response(res *http.Response) (err error)

Response - Trace HTTP Response

Jump to

Keyboard shortcuts

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