Documentation ¶
Overview ¶
This package implements a reusable REST client
Index ¶
Constants ¶
View Source
const ( LogLevelDefault = common.LogLevelDefault LogLevelErrorOnly = common.LogLevelErrorOnly LogLevelStandard = common.LogLevelStandard LogLevelElevated = common.LogLevelElevated LogLevelFull = common.LogLevelFull LogLevelDebug = common.LogLevelDebug LogLevelTrace = common.LogLevelTrace LogLevelVerbose = common.LogLevelVerbose )
please see pkg/common/init.go for more information
Variables ¶
View Source
var ( // Trace reads an http request or response from rc and writes to w. // The content type (kind) should be one of "xml" or "json". Trace = func(rc io.ReadCloser, w io.Writer, kind string) io.ReadCloser { return debug.NewTeeReader(rc, w) } )
Functions ¶
func Init ¶
func Init(init InitLib)
The SDK Init function for this library. Allows you to set the logging level and use of a log file. Default is output to the stdout.
func InitWithDefault ¶
func InitWithDefault()
InitWithDefault is the SDK Init function for this library using default values.
Types ¶
type Client ¶
type Client struct { *HttpClient Options interfaces.ClientOptions }
Client which extends HttpClient to support REST
func NewWithDefaults ¶
func NewWithDefaults() *Client
NewWithDefaults creates a REST client with default options
type HttpClient ¶
HttpClient which extends HTTP client
func NewHTTPClient ¶
func NewHTTPClient(options interfaces.ClientOptions) *HttpClient
New allocated a Simple HTTP client
Click to show internal directories.
Click to hide internal directories.