Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents interactions with a API server
func (*Client) HTTPClient ¶
HTTPClient returns the http client used for the connection. This can be used to set custom http options.
type Option ¶
type Option func(*options)
Option to be passed to Connect to customize the resulting instance.
func WithHTTPClient ¶
WithHTTPClient sets the httpClient on the option
func WithLogger ¶
WithLogger sets the logger on the option
func WithUserAgent ¶
WithUserAgent sets the userAgent on the option
type Response ¶
type Response struct { Type ResponseType `json:"type" yaml:"type"` // Valid only for Sync responses Status string `json:"status" yaml:"status"` StatusCode int `json:"status_code" yaml:"status_code"` // Valid only for Async responses Operation string `json:"operation" yaml:"operation"` // Valid only for Error responses Code int `json:"error_code" yaml:"error_code"` Error string `json:"error" yaml:"error"` // Valid for Sync and Error responses Metadata json.RawMessage `json:"metadata" yaml:"metadata"` }
Response represents a operation
type ResponseRaw ¶
type ResponseRaw struct { Type ResponseType `json:"type" yaml:"type"` // Valid only for Sync responses Status string `json:"status" yaml:"status"` StatusCode int `json:"status_code" yaml:"status_code"` // Valid only for Async responses Operation string `json:"operation" yaml:"operation"` // Valid only for Error responses Code int `json:"error_code" yaml:"error_code"` Error string `json:"error" yaml:"error"` // Valid for Sync and Error responses Metadata interface{} `json:"metadata" yaml:"metadata"` }
ResponseRaw represents a operation
type ResponseType ¶
type ResponseType string
ResponseType represents a valid response type
const ( SyncResponse ResponseType = "sync" AsyncResponse ResponseType = "async" ErrorResponse ResponseType = "error" )
Response types
Click to show internal directories.
Click to hide internal directories.