added missing file

This commit is contained in:
Guo Huang 2016-04-24 15:44:52 -07:00
parent 1de18eb074
commit ea445c1e28
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,24 @@
package swagger
import (
"net/http"
)
type ApiResponse struct {
*http.Response
Message string `json:"message,omitempty"`
}
func NewApiResponse(r *http.Response) *ApiResponse {
response := &ApiResponse{Response: r}
return response
}
func NewApiResponseWithError(errorMessage string) *ApiResponse {
response := &ApiResponse{Message: errorMessage}
return response
}

View File

@ -0,0 +1,14 @@
package swagger
import (
)
type ModelApiResponse struct {
Code int32 `json:"code,omitempty"`
Type_ string `json:"type,omitempty"`
Message string `json:"message,omitempty"`
}