Documentation ¶
Index ¶
- type ClientInterface
- type RESTClient
- type Request
- func (r *Request) Body(body interface{}) *Request
- func (r *Request) Do() *Result
- func (r *Request) SubResource(subPath string) *Request
- func (r *Request) WithContext(ctx context.Context) *Request
- func (r *Request) WithHeaders(header http.Header) *Request
- func (r *Request) WithParam(paramName, value string) *Request
- func (r *Request) WithTimeout(d time.Duration) *Request
- func (r *Request) WrapURL() *url.URL
- type Result
- type VerbType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientInterface ¶
type ClientInterface interface { Verb(verb VerbType) *Request Post() *Request Put() *Request Get() *Request Delete() *Request Patch() *Request }
func NewRESTClient ¶
func NewRESTClient(c *util.Capability, baseUrl string) ClientInterface
type RESTClient ¶
type RESTClient struct {
// contains filtered or unexported fields
}
func (*RESTClient) Delete ¶
func (r *RESTClient) Delete() *Request
func (*RESTClient) Get ¶
func (r *RESTClient) Get() *Request
func (*RESTClient) Patch ¶
func (r *RESTClient) Patch() *Request
func (*RESTClient) Post ¶
func (r *RESTClient) Post() *Request
func (*RESTClient) Put ¶
func (r *RESTClient) Put() *Request
func (*RESTClient) Verb ¶
func (r *RESTClient) Verb(verb VerbType) *Request
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) SubResource ¶
Click to show internal directories.
Click to hide internal directories.