Documentation ¶
Index ¶
- func AuthInfoHandler(w http.ResponseWriter, r *http.Request) []byte
- func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
- func SendCode(w http.ResponseWriter, code int)
- func SendData(w http.ResponseWriter, code int, resp *Response)
- func SendError(w http.ResponseWriter, code int)
- type Metadatas
- type Pagination
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthInfoHandler ¶
func AuthInfoHandler(w http.ResponseWriter, r *http.Request) []byte
AuthInfoHandler reads authentication info provided by the Endpoints proxy.
func DecodeJSONBody ¶ added in v0.0.2
func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
DecodeJSONBody in http request
Types ¶
type Metadatas ¶
type Metadatas struct { TotalIndex int `json:"total_index"` FirstIndexPage int `json:"first_index_page,omitempty"` LastIndexPage int `json:"last_index_page,omitempty"` }
Metadatas struct
type Pagination ¶
Pagination struct
type Response ¶
type Response struct { RequestID string `json:"request_id,omitempty"` Message string `json:"message,omitempty"` Results interface{} `json:"results,omitempty"` Metadatas *Metadatas `json:"metadatas,omitempty"` }
Response HTTP
func DataQuery ¶
func DataQuery(tmpData []interface{}, pages Pagination) *Response
DataQuery informations
Click to show internal directories.
Click to hide internal directories.