Documentation ¶
Index ¶
- func GetUnixServerPath(socketName string, paths ...string) string
- type Client
- type Request
- func (r *Request) Body(v interface{}) *Request
- func (r *Request) Do() *Response
- func (r *Request) Instance(instance string) *Request
- func (r *Request) QueryOption(key string, value string) *Request
- func (r *Request) QueryOptionLabel(key string, labels map[string]string) *Request
- func (r *Request) Resource(resource string) *Request
- func (r *Request) SetHeader(key, value string) *Request
- func (r *Request) Timeout(d time.Duration) *Request
- func (r *Request) URL() *url.URL
- func (r *Request) UsePath(path string) *Request
- type Response
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUnixServerPath ¶
GetUnixServerPath returns a unix domain socket prepended with the provided path.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP REST wrapper. Use one of Get/Post/Put/Delete to get a request object.
func NewAuthClient ¶
NewAuthClient returns a new REST client for specified server.
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request is contructed iteratively by the client and finally dispatched. A REST endpoint is accessed with the following convention: base_url/<version>/<resource>/[<instance>]
func NewRequest ¶
func NewRequest(client *http.Client, base *url.URL, verb string, version string, authstring, userAgent string) *Request
NewRequest instance
func (*Request) QueryOption ¶
QueryOption adds specified options to query.
func (*Request) QueryOptionLabel ¶
QueryOptionLabel adds specified label to query.
Click to show internal directories.
Click to hide internal directories.