Documentation ¶
Index ¶
- func IPAdd(w http.ResponseWriter, r *http.Request)
- func IPDelete(w http.ResponseWriter, r *http.Request)
- func IPShow(w http.ResponseWriter, r *http.Request)
- func Index(w http.ResponseWriter, r *http.Request)
- func NewRouter() *mux.Router
- func ShowAllIPs(w http.ResponseWriter, r *http.Request)
- type APIError
- type JSONErrorResponse
- type JSONResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPAdd ¶
func IPAdd(w http.ResponseWriter, r *http.Request)
IPAdd for the Create action POST /ip
func IPDelete ¶
func IPDelete(w http.ResponseWriter, r *http.Request)
IPDelete for the ip Delete action DELETE /ip/{ip}
func IPShow ¶
func IPShow(w http.ResponseWriter, r *http.Request)
IPShow for the ip Show action GET /ip/{ip}
func ShowAllIPs ¶
func ShowAllIPs(w http.ResponseWriter, r *http.Request)
ShowAllIPs shows all IPs GET /ip
Types ¶
type JSONErrorResponse ¶
type JSONErrorResponse struct {
Error *APIError `json:"error"`
}
JSONErrorResponse defines error struct
type JSONResponse ¶
type JSONResponse struct { // Reserved field to add some meta information to the API response Meta interface{} `json:"meta"` Data interface{} `json:"data"` }
JSONResponse defines meta and interface struct
Click to show internal directories.
Click to hide internal directories.