Documentation ¶
Index ¶
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter(api APIHandler) *mux.Router
- type APIHandler
- func (handler APIHandler) FeatureAccess(w http.ResponseWriter, r *http.Request)
- func (handler APIHandler) FeatureCreate(w http.ResponseWriter, r *http.Request)
- func (handler APIHandler) FeatureEdit(w http.ResponseWriter, r *http.Request)
- func (handler APIHandler) FeatureIndex(w http.ResponseWriter, r *http.Request)
- func (handler APIHandler) FeatureRemove(w http.ResponseWriter, r *http.Request)
- func (handler APIHandler) FeatureShow(w http.ResponseWriter, r *http.Request)
- func (handler APIHandler) FeaturesAccess(w http.ResponseWriter, r *http.Request)
- type APIMessage
- type AccessRequest
- type Route
- type Routes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouter ¶
func NewRouter(api APIHandler) *mux.Router
Bind routes to handlers and create a router
Types ¶
type APIHandler ¶
type APIHandler struct {
FeatureService services.FeatureService
}
Handles incoming requests
func (APIHandler) FeatureAccess ¶
func (handler APIHandler) FeatureAccess(w http.ResponseWriter, r *http.Request)
func (APIHandler) FeatureCreate ¶
func (handler APIHandler) FeatureCreate(w http.ResponseWriter, r *http.Request)
func (APIHandler) FeatureEdit ¶
func (handler APIHandler) FeatureEdit(w http.ResponseWriter, r *http.Request)
func (APIHandler) FeatureIndex ¶
func (handler APIHandler) FeatureIndex(w http.ResponseWriter, r *http.Request)
func (APIHandler) FeatureRemove ¶
func (handler APIHandler) FeatureRemove(w http.ResponseWriter, r *http.Request)
func (APIHandler) FeatureShow ¶
func (handler APIHandler) FeatureShow(w http.ResponseWriter, r *http.Request)
func (APIHandler) FeaturesAccess ¶
func (handler APIHandler) FeaturesAccess(w http.ResponseWriter, r *http.Request)
type APIMessage ¶
type APIMessage struct { // A status message Status string `json:"status"` // A human readable message Message string `json:"message"` // contains filtered or unexported fields }
A simple structure to respond with error messages
type AccessRequest ¶
Describes the request when checking the access to a feature
Click to show internal directories.
Click to hide internal directories.