Documentation ¶
Index ¶
- type Filter
- func (f *Filter) DELETE(resource string, authenticator rt_synthesis.AuthWrapper, ...)
- func (f *Filter) GET(resource string, authenticator rt_synthesis.AuthWrapper, ...)
- func (f *Filter) OPTIONS(resource string, _ httprouter.Handle)
- func (f *Filter) PATCH(resource string, authenticator rt_synthesis.AuthWrapper, ...)
- func (f *Filter) POST(resource string, authenticator rt_synthesis.AuthWrapper, ...)
- func (f *Filter) PUT(resource string, authenticator rt_synthesis.AuthWrapper, ...)
- func (f *Filter) Route() *httprouter.Router
- func (f *Filter) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (f *Filter) SetCustomHeader(key string)
- func (f *Filter) SetDebug()
- func (f *Filter) SetOrigin(origin string)
- type HttpHandlerHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { RawRoute *httprouter.Router //RawRoute field holds raw httprouter. multiplexer // contains filtered or unexported fields }
Filter provides header filtering mechanism based on synthesis.AuthWrapper or response headers related to CORS or other security mechanisms. It acts as an overlay of httprouter..
func NewFilter ¶
func NewFilter(authorizer ...rt_synthesis.AuthWrapper) *Filter
NewFilter generate new http filter instance associated to httprouter. instance. An authorizer function can be set to authorize/authenticate users. If nil authorizer given, authorization process for routes will be removed.
func (*Filter) DELETE ¶
func (f *Filter) DELETE(resource string, authenticator rt_synthesis.AuthWrapper, handler httprouter.Handle)
func (*Filter) GET ¶
func (f *Filter) GET(resource string, authenticator rt_synthesis.AuthWrapper, handler httprouter.Handle)
func (*Filter) PATCH ¶
func (f *Filter) PATCH(resource string, authenticator rt_synthesis.AuthWrapper, handler httprouter.Handle)
func (*Filter) POST ¶
func (f *Filter) POST(resource string, authenticator rt_synthesis.AuthWrapper, handler httprouter.Handle)
func (*Filter) PUT ¶
func (f *Filter) PUT(resource string, authenticator rt_synthesis.AuthWrapper, handler httprouter.Handle)
func (*Filter) Route ¶
func (f *Filter) Route() *httprouter.Router
func (*Filter) SetCustomHeader ¶
SetCustomHeader sets a custom header for the service endpoint
type HttpHandlerHandler ¶
type HttpHandlerHandler interface { GET(string, rt_synthesis.AuthWrapper, httprouter.Handle) POST(string, rt_synthesis.AuthWrapper, httprouter.Handle) PUT(string, rt_synthesis.AuthWrapper, httprouter.Handle) DELETE(string, rt_synthesis.AuthWrapper, httprouter.Handle) PATCH(string, rt_synthesis.AuthWrapper, httprouter.Handle) OPTIONS(string, httprouter.Handle) ServeHTTP(http.ResponseWriter, *http.Request) }
Click to show internal directories.
Click to hide internal directories.