Documentation ¶
Index ¶
- Constants
- Variables
- func EscapePath(path string, encodeSep bool) string
- type HTTP
- type HTTPMethod
- type Operation
- type Request
- func (r *Request) Build() error
- func (r *Request) BuildAndSanitize() error
- func (r *Request) Context() context.Context
- func (r *Request) HasError() bool
- func (r *Request) InputDataFilled() bool
- func (r *Request) OutputDataFilled() bool
- func (r *Request) ResetBody()
- func (r *Request) Send() error
- func (r *Request) SetBytesBody(buf []byte)
- func (r *Request) SetReaderBody(reader io.ReadSeeker)
- func (r *Request) SetStringBody(s string)
- func (r *Request) Sign() error
Constants ¶
View Source
const ( POST = iota PUT PATCH DELETE GET HEAD )
View Source
const ( Validate processors.Type = iota Build BuildStream Sign Send ValidateResponse Unmarshal UnmarshalStream UnmarshalMeta UnmarshalError Retry AfterRetry CompleteAttempt Complete )
Variables ¶
View Source
var NoBody = http.NoBody
NoBody is a http.NoBody reader instructing Go HTTP client to not include and body in the HTTP request.
Functions ¶
func EscapePath ¶
EscapePath escapes part of a URL path in Amazon style
Types ¶
type HTTP ¶
type HTTP struct { Method HTTPMethod Path string UsePathAsIs bool }
type HTTPMethod ¶
type HTTPMethod int8
func (HTTPMethod) String ¶
func (v HTTPMethod) String() string
type Request ¶
type Request struct { RuntimeConfig *sap.RuntimeConfig ServiceInfo metainfo.ServiceInfo Processors *processors.Processors Operation *Operation CreationTime time.Time LastSignedAt time.Time AttemptTime time.Time HTTPResponse *http.Response ResponseBody []byte ResponseBodyHandler func(int, []byte) ([]byte, error) OutputData interface{} HTTPRequest *http.Request InputData interface{} Error error //RetryCount int Retryable bool DisableFollowRedirects bool // contains filtered or unexported fields }
func New ¶
func New(ctx context.Context, cfg *sap.RuntimeConfig, serviceInfo metainfo.ServiceInfo, processors *processors.Processors, operation *Operation, params interface{}, data interface{}) *Request
func (*Request) BuildAndSanitize ¶
func (*Request) InputDataFilled ¶
func (*Request) OutputDataFilled ¶
func (*Request) SetBytesBody ¶
SetBufferBody will set the request's body bytes that will be sent to the service API.
func (*Request) SetReaderBody ¶
func (r *Request) SetReaderBody(reader io.ReadSeeker)
SetReaderBody will set the request's body reader.
func (*Request) SetStringBody ¶
SetStringBody sets the body of the request to be backed by a string.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.