kubernetes/vendor/github.com/libopenstorage/openstorage/api/client/request.go

type Request

type Response

type Status

// NewRequest instance
func NewRequest(client *http.Client, base *url.URL, verb string, version string, authstring, userAgent string) *Request {}

func checkExists(mustExist string, before string) error {}

func checkSet(name string, s *string, newval string) error {}

// Resource specifies the resource to be accessed.
func (r *Request) Resource(resource string) *Request {}

// Instance specifies the instance of the resource to be accessed.
func (r *Request) Instance(instance string) *Request {}

// UsePath use the specified path and don't build up a request.
func (r *Request) UsePath(path string) *Request {}

// QueryOption adds specified options to query.
func (r *Request) QueryOption(key string, value string) *Request {}

// QueryOptionLabel adds specified label to query.
func (r *Request) QueryOptionLabel(key string, labels map[string]string) *Request {}

// SetHeader adds specified header values to query.
func (r *Request) SetHeader(key, value string) *Request {}

// Timeout makes the request use the given duration as a timeout. Sets the "timeout"
// parameter.
func (r *Request) Timeout(d time.Duration) *Request {}

// Body sets the request Body.
func (r *Request) Body(v interface{}

// URL returns the current working URL.
func (r *Request) URL() *url.URL {}

// headerVal for key as an int. Return false if header is not present or valid.
func headerVal(key string, resp *http.Response) (int, bool) {}

func parseHTTPStatus(resp *http.Response, body []byte) error {}

// Do executes the request and returns a Response.
func (r *Request) Do() *Response {}

// Body return http body, valid only if there is no error
func (r Response) Body() ([]byte, error) {}

// StatusCode HTTP status code returned.
func (r Response) StatusCode() int {}

// Unmarshal result into obj
func (r Response) Unmarshal(v interface{}

// Error executing the request.
func (r Response) Error() error {}

// FormatError formats the error
func (r Response) FormatError() error {}

func digest(method string, path string) string {}