const AmazonMetadataPrefix = "x-amz-meta-"
Http Headers
const ContentCRC32 string = "Content-CRC32"
const ContentCRC32C string = "Content-CRC32C"
const ContentMd5 string = "Content-MD5"
const ContentSha256 string = "Content-SHA256"
const ContentSha512 string = "Content-SHA512"
const ContentTypeKey string = "Content-Type" // This header describes the format of the contents
func BoolPtrToStrPtr(bool *bool) *string
Converts a *bool into a *string
func Float64PtrToStrPtr(float *float64) *string
Converts a *float64 into a *string
func Int64PtrToStrPtr(int *int64) *string
Converts an *int64 into a *string
func IntPtrToStrPtr(int *int) *string
Converts an *int into a *string
func InterfaceToStrPtr(item ToStringPtrInterface) *string
Converts an item that meets the ToStringInterface into a *string
func NewLimitReadCloser(readCloser models.ReadCloserWithSizeDecorator) io.ReadCloser
Creates a ReadCloser that wraps the reader in a LimitedReader, and preserves the closability of the original reader
type ConnectionInfo struct { Endpoint *url.URL Credentials *Credentials Proxy *url.URL }
type Credentials struct { AccessId string Key string }
type HttpRequestBuilder struct {
// contains filtered or unexported fields
}
func NewHttpRequestBuilder() *HttpRequestBuilder
func (builder *HttpRequestBuilder) Build(conn *ConnectionInfo) (*http.Request, error)
func (builder *HttpRequestBuilder) WithChecksum(checksum models.Checksum) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithContentType(contentType string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithHeader(key string, value string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithHeaders(headers map[string]string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithHttpVerb(verb string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithOptionalQueryParam(key string, value *string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithOptionalVoidQueryParam(key string, value bool) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithPath(path string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithQueryParam(key string, value string) *HttpRequestBuilder
func (builder *HttpRequestBuilder) WithReadCloser(stream models.ReadCloserWithSizeDecorator) *HttpRequestBuilder
Internally converts reader with size decorator to limit reader to ensure size is respected and adds the closer functionality to the limit reader. The send network will automatically close the reader when finished.
func (builder *HttpRequestBuilder) WithReader(stream models.ReaderWithSizeDecorator) *HttpRequestBuilder
Internally converts reader with size decorator to limit reader to ensure size is respected
Decorator for Network which handles 307 temporary redirect retries
type HttpTempRedirectDecorator struct {
// contains filtered or unexported fields
}
func (tempRedirectDecorator *HttpTempRedirectDecorator) Invoke(httpRequest *http.Request) (models.WebResponse, error)
Defines a limited reader that also supports closing
type LimitReadCloser struct {
// contains filtered or unexported fields
}
func (limitedReadCloser *LimitReadCloser) Close() error
Closes the original reader
func (limitedReadCloser *LimitReadCloser) Read(p []byte) (n int, err error)
Reads from the limited reader
type Network interface { Invoke(httpRequest *http.Request) (models.WebResponse, error) }
func NewHttpTempRedirectDecorator(network Network, maxRedirect int) Network
func NewNetworkRetryDecorator(network Network, maxRetires int) Network
func NewSendNetwork(connectionInfo *ConnectionInfo) Network
Decorator for Network which handles network related retries
type NetworkRetryDecorator struct {
// contains filtered or unexported fields
}
func (networkRetryDecorator *NetworkRetryDecorator) Invoke(httpRequest *http.Request) (models.WebResponse, error)
Performs http requests
type SendNetwork struct {
// contains filtered or unexported fields
}
func (sendNetwork *SendNetwork) Invoke(httpRequest *http.Request) (models.WebResponse, error)
Interface for a to string method
type ToStringPtrInterface interface { StringPtr() *string }