Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPService ¶
type HTTPService struct {
Scheme string
// contains filtered or unexported fields
}
func (*HTTPService) Init ¶
func (h *HTTPService) Init(cfg HTTPServiceCfg, layout RouteLayout, rspec *RouterSpec, log *logger.Logger) error
func (*HTTPService) Start ¶
func (h *HTTPService) Start() error
func (*HTTPService) Stop ¶
func (h *HTTPService) Stop() error
type HTTPServiceCfg ¶
type HandlerWithError ¶
type HandlerWithError func(http.ResponseWriter, *http.Request) error
func JWTAuth ¶
func JWTAuth(handler HandlerWithError) HandlerWithError
type RouteLayout ¶
first key is endpoint prefix, second key is handler name, value is [http.Method, <endpoint suffix regexp>]
type RouterSpec ¶
type RouterSpec map[string]HandlerWithError
key: handler name * value: func(http.ResponseWriter, *http.Request) error
Click to show internal directories.
Click to hide internal directories.