Documentation ¶
Index ¶
- func ExtractHost(hostport string) string
- func FindMany(storage storageTY.Plugin, w http.ResponseWriter, r *http.Request, ...)
- func FindOne(storage storageTY.Plugin, w http.ResponseWriter, r *http.Request, ...)
- func GetParameter(key string, parameters map[string][]string) string
- func GetParameters(key string, parameters map[string][]string) []string
- func LoadData(w http.ResponseWriter, r *http.Request, ...)
- func LoadEntity(w http.ResponseWriter, r *http.Request, entity interface{}) error
- func Params(request *http.Request) ([]storageTY.Filter, *storageTY.Pagination, error)
- func PostErrorResponse(w http.ResponseWriter, message string, code int)
- func PostSuccessResponse(w http.ResponseWriter, data interface{})
- func ReceivedQueryMap(request *http.Request) (map[string][]string, error)
- func SaveEntity(storage storageTY.Plugin, w http.ResponseWriter, r *http.Request, ...)
- func UpdateData(w http.ResponseWriter, r *http.Request, entity interface{}, ...)
- func WriteResponse(w http.ResponseWriter, data []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractHost ¶
ExtractHost splits a host / port pair (or just a host) and returns the host. This is large borrowed from `net/url.splitHostPort`.
func FindMany ¶
func FindMany(storage storageTY.Plugin, w http.ResponseWriter, r *http.Request, entityName string, entities interface{})
FindMany func
func FindOne ¶
func FindOne(storage storageTY.Plugin, w http.ResponseWriter, r *http.Request, entityName string, entity interface{})
FindOne func
func GetParameter ¶
GetParameter returns a first value or empty
func GetParameters ¶
GetParameters returns all values or empty slice
func LoadData ¶
func LoadData(w http.ResponseWriter, r *http.Request, entityFn func(f []storageTY.Filter, p *storageTY.Pagination) (interface{}, error))
LoadData loads data
func LoadEntity ¶
func LoadEntity(w http.ResponseWriter, r *http.Request, entity interface{}) error
LoadEntity func
func PostErrorResponse ¶
func PostErrorResponse(w http.ResponseWriter, message string, code int)
func PostSuccessResponse ¶
func PostSuccessResponse(w http.ResponseWriter, data interface{})
func ReceivedQueryMap ¶
ReceivedQueryMap returns all the user query and url input
func SaveEntity ¶
func SaveEntity(storage storageTY.Plugin, w http.ResponseWriter, r *http.Request, entityName string, entity interface{}, bwFunc func(entity interface{}, filters *[]storageTY.Filter) error)
SaveEntity func
func UpdateData ¶
func UpdateData(w http.ResponseWriter, r *http.Request, entity interface{}, updateFn func(f []storageTY.Filter, p *storageTY.Pagination, d []byte) (interface{}, error))
UpdateData loads data
func WriteResponse ¶
func WriteResponse(w http.ResponseWriter, data []byte)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.