playback

package
v0.32.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleResponse

func HandleResponse(r *http.Request, mparts map[string]MultipartUpload, resp []byte, logResponse []byte) error

func Sign

func Sign(ctx context.Context, r *http.Request, creds Credentials) error

Sign replace Authorization header with new Access key id and Signature values.

func SwapUploadID

func SwapUploadID(r *http.Request, settings *Settings) error

Types

type Credentials

type Credentials struct {
	AccessKey string
	SecretKey string
}

type LoggedRequest

type LoggedRequest struct {
	From     string      `json:"from"`
	URI      string      `json:"URI"`
	Method   string      `json:"method"`
	Payload  httpBody    `json:"payload,omitempty"`
	Response httpBody    `json:"response,omitempty"`
	Query    url.Values  `json:"query"`
	Header   http.Header `json:"headers"`
}

type MultipartUpload

type MultipartUpload struct {
	XMLName  xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ InitiateMultipartUploadResult" json:"-"`
	Bucket   string   `json:"bucket" xml:"Bucket"`
	Key      string   `json:"key" xml:"Key"`
	UploadID string   `json:"uploadId" xml:"UploadId"`
}

type Settings

type Settings struct {
	Endpoint   string
	Creds      Credentials
	Multiparts map[string]MultipartUpload
	Client     *http.Client
}

Jump to

Keyboard shortcuts

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