Documentation ¶
Index ¶
- type ClientInterface
- type RESTClient
- type Request
- func (r *Request) Body(body interface{}) *Request
- func (r *Request) Do() *Result
- func (r *Request) Peek() *Request
- func (r *Request) SubResourcef(subPath string, args ...interface{}) *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) WithParams(params map[string]string) *Request
- func (r *Request) WithParamsFromURL(u *url.URL) *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) SubResourcef ¶
type Result ¶
type Result struct { Rid string Body []byte Err error StatusCode int Status string Header http.Header }
func (*Result) IntoJsonCntInfoString ¶
func (r *Result) IntoJsonCntInfoString() (*metadata.JsonCntInfoResp, error)
func (*Result) IntoJsonString ¶
func (r *Result) IntoJsonString() (*metadata.JsonStringResp, error)
Click to show internal directories.
Click to hide internal directories.