Documentation
¶
Index ¶
- func DecodeJSON(r io.Reader, v interface{}) error
- func HandleResponseErr(resp *http.Response) error
- func RespondWithError(w http.ResponseWriter, code int, msg interface{})
- func RespondWithJSON(w http.ResponseWriter, code int, payload interface{}) error
- type Api
- type Client
- type EndPoint
- type HTTPService
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
func HandleResponseErr ¶
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, code int, msg interface{})
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, code int, payload interface{}) error
Types ¶
type EndPoint ¶
type EndPoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(path, methodType string, handler http.HandlerFunc) EndPoint
type HTTPService ¶
type HTTPService struct {
// contains filtered or unexported fields
}
func NewHTTPService ¶
func NewHTTPService(port int, api *Api, l *logrus.Entry) HTTPService
func (*HTTPService) Start ¶
func (service *HTTPService) Start()
func (*HTTPService) Stop ¶
func (service *HTTPService) Stop() error
Click to show internal directories.
Click to hide internal directories.