Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRouter(eng interface{}) (r *mux.Router, err error)
- func HttpError(w http.ResponseWriter, err error)
- func Marshal(r *http.Request, v interface{}) (b []byte, err error)
- func NewApiRequest(method string, urlStr string, body io.Reader) (req *http.Request, err error)
- func ParseForm(r *http.Request) error
- func Register(method string, route string, fct HttpApiFunc) (err error)
- type HttpApiFunc
Constants ¶
View Source
const (
APIVERSION version.Version = "0.1"
)
Variables ¶
View Source
var (
Modules = map[string]map[string]HttpApiFunc{
"GET": {},
"POST": {},
"DELETE": {},
"OPTIONS": {},
}
)
Functions ¶
func CreateRouter ¶ added in v0.2.0
func HttpError ¶ added in v0.2.0
func HttpError(w http.ResponseWriter, err error)
func NewApiRequest ¶ added in v0.2.0
used for testing
Types ¶
Click to show internal directories.
Click to hide internal directories.