Documentation
¶
Index ¶
- type ApiBase
- func (base *ApiBase) CurrentSession(c web.C) *domain.Session
- func (base *ApiBase) Decode(v interface{}, r *http.Request) error
- func (base *ApiBase) ErrorResponse(tx interface{}, err error, w http.ResponseWriter)
- func (base *ApiBase) IpAddress(r *http.Request) string
- func (base *ApiBase) ParamValue(name string, c web.C, r *http.Request) string
- func (base *ApiBase) Response(tx interface{}, err error, w http.ResponseWriter, data interface{})
- func (base *ApiBase) SuccessResponse(tx interface{}, w http.ResponseWriter)
- type HttpMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiBase ¶
type ApiBase struct { Database *database.DbOperations Setup *setup.Setup }
func (*ApiBase) ErrorResponse ¶
func (base *ApiBase) ErrorResponse(tx interface{}, err error, w http.ResponseWriter)
func (*ApiBase) ParamValue ¶
gets the parameter value from the query string or from the url
func (*ApiBase) Response ¶
func (base *ApiBase) Response(tx interface{}, err error, w http.ResponseWriter, data interface{})
func (*ApiBase) SuccessResponse ¶
func (base *ApiBase) SuccessResponse(tx interface{}, w http.ResponseWriter)
type HttpMessage ¶
Click to show internal directories.
Click to hide internal directories.