Documentation ¶
Index ¶
- func Forbidden(w http.ResponseWriter, r *http.Request)
- func GetArray(r *http.Request) ([]et.Json, error)
- func GetBody(r *http.Request) (et.Json, error)
- func GetParam(r *http.Request, key string) string
- func GetQuery(r *http.Request) et.Json
- func HTTPAlert(w http.ResponseWriter, r *http.Request, message string) error
- func HTTPApp(r chi.Router, path string, root http.FileSystem)
- func HTTPError(w http.ResponseWriter, r *http.Request, statusCode int, message string) error
- func ITEM(w http.ResponseWriter, r *http.Request, statusCode int, dt et.Item) error
- func ITEMS(w http.ResponseWriter, r *http.Request, statusCode int, dt et.Items) error
- func InternalServerError(w http.ResponseWriter, r *http.Request, err error)
- func JSON(w http.ResponseWriter, r *http.Request, statusCode int, dt interface{}) error
- func ScanBody(r io.Reader) (et.Json, error)
- func ScanJson(value map[string]interface{}) (et.Json, error)
- func ScanStr(value string) (et.Json, error)
- func Stream(w http.ResponseWriter, r *http.Request, statusCode int, dt interface{}) error
- func Unauthorized(w http.ResponseWriter, r *http.Request)
- func WriteResponse(w http.ResponseWriter, statusCode int, e []byte) error
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPApp ¶
func HTTPApp(r chi.Router, path string, root http.FileSystem)
* * HTTPApp * @param r chi.Router * @param path string * @param root http.FileSystem *
func HTTPError ¶
* * HTTPError * @param w http.ResponseWriter * @param r *http.Request * @param statusCode int * @param message string * @return error *
func ITEM ¶
* * ITEM * @param w http.ResponseWriter * @param r *http.Request * @param statusCode int * @param dt et.Item * @return error *
func ITEMS ¶
* * ITEMS * @param w http.ResponseWriter * @param r *http.Request * @param statusCode int * @param dt et.Items * @return error *
func InternalServerError ¶ added in v0.0.4
func InternalServerError(w http.ResponseWriter, r *http.Request, err error)
func JSON ¶
* * JSON * @param w http.ResponseWriter * @param r *http.Request * @param statusCode int * @param dt interface{} * @return error *
func Stream ¶
* * Stream * @param w http.ResponseWriter * @param r *http.Request * @param statusCode int * @param dt interface{} * @return error *
func Unauthorized ¶ added in v0.0.4
func Unauthorized(w http.ResponseWriter, r *http.Request)
func WriteResponse ¶
func WriteResponse(w http.ResponseWriter, statusCode int, e []byte) error
* * WriteResponse * @param w http.ResponseWriter * @param statusCode int * @param e []byte * @return error *