github.com/willmadison/cli@v6.40.1-0.20181018160101-29d5937903ff+incompatible/api/plugin/response.go (about)

     1  package plugin
     2  
     3  import "net/http"
     4  
     5  // Response represents a plugin response object.
     6  type Response struct {
     7  	// Result represents the type that is expected in the
     8  	// response JSON.
     9  	Result interface{}
    10  
    11  	// RawResponse represents the response body.
    12  	RawResponse []byte
    13  
    14  	// HTTPResponse represents the HTTP response object.
    15  	HTTPResponse *http.Response
    16  }
    17  
    18  func (r *Response) reset() {
    19  	r.RawResponse = []byte{}
    20  	r.HTTPResponse = nil
    21  }