Documentation
¶
Index ¶
- Constants
- func ClearObject(obj interface{})
- type AuditLogData
- type Client
- func (s *Client) DisableMidstreamFailure(uri string)
- func (s *Client) EnableMidstreamFailure(uri string, syncCh chan bool)
- func (s *Client) EnablePrintTransformations()
- func (s *Client) HandleWebsocketStreamOut(uri, token string, reader *bufio.Reader, reqData, replyData interface{}, ...) (int, error)
- func (s *Client) HttpJsonSend(method, uri, token string, reqData interface{}, replyData interface{}, ...) (int, http.Header, error)
- func (s *Client) HttpJsonSendReq(method, uri, token string, reqData interface{}, headerVals http.Header, ...) (*http.Response, error)
- func (s *Client) PostJson(uri, token string, reqData interface{}, replyData interface{}, ...) (int, error)
- func (s *Client) PostJsonSend(uri, token string, reqData interface{}, queryParams map[string]string) (*http.Response, error)
- func (s *Client) PostJsonStreamOut(uri, token string, reqData, replyData interface{}, ...) (int, error)
- func (s *Client) WebsocketConn(uri, token string, reqData interface{}) (*websocket.Conn, error)
- type MultiPartFormData
Constants ¶
View Source
const TokenTypeBearer = "Bearer"
Variables ¶
This section is empty.
Functions ¶
func ClearObject ¶
func ClearObject(obj interface{})
Types ¶
type AuditLogData ¶
type AuditLogData struct {
Method string
Url *url.URL
ReqContentType string
ReqHeader http.Header
ReqBody []byte
Status int
RespContentType string
RespHeader http.Header
RespBody []byte
Err error
Start time.Time
End time.Time
}
func (*AuditLogData) GetEventTags ¶
func (s *AuditLogData) GetEventTags() map[string]string
type Client ¶
type Client struct {
SkipVerify bool
Debug bool
TokenType string
// To allow testing of midstream failures, we need to wait until
// some stream messages have been received before signaling to the
// sender that it's ok to generate an error.
MidstreamFailChs map[string]chan bool
// Test transport for mocking unit tests
TestTransport http.RoundTripper
// Print input data transformations
PrintTransformations bool
Timeout time.Duration
AuditLogFunc func(data *AuditLogData)
ParseErrorFunc func(resBody []byte) error
}
func (*Client) DisableMidstreamFailure ¶
func (*Client) EnableMidstreamFailure ¶
func (*Client) EnablePrintTransformations ¶
func (s *Client) EnablePrintTransformations()
func (*Client) HandleWebsocketStreamOut ¶
func (*Client) HttpJsonSend ¶
func (*Client) HttpJsonSendReq ¶
func (*Client) PostJsonSend ¶
func (*Client) PostJsonStreamOut ¶
type MultiPartFormData ¶
type MultiPartFormData struct {
// contains filtered or unexported fields
}
func NewMultiPartFormData ¶
func NewMultiPartFormData() *MultiPartFormData
func (*MultiPartFormData) AddField ¶
func (s *MultiPartFormData) AddField(key string, val interface{})
Click to show internal directories.
Click to hide internal directories.