Documentation
¶
Index ¶
- func RegisterService(desc *ServiceDescriptor, impl interface{}) http.Handler
- func RegisterServiceWithChi(desc *ServiceDescriptor, impl interface{}, router chi.Router) http.Handler
- type DecoderFunc
- type HandlerFunc
- type MethodDescriptor
- type MethodHandlerFunc
- type MiddlewareFunc
- type ServiceDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterService ¶
func RegisterService(desc *ServiceDescriptor, impl interface{}) http.Handler
func RegisterServiceWithChi ¶
func RegisterServiceWithChi(desc *ServiceDescriptor, impl interface{}, router chi.Router) http.Handler
Types ¶
type DecoderFunc ¶
type DecoderFunc func(req interface{}) error
func NewDecoderFunc ¶
func NewDecoderFunc(r *http.Request) DecoderFunc
type HandlerFunc ¶
type MethodDescriptor ¶
type MethodDescriptor struct {
MethodName string
HttpMethod string
HttpPath string
Handler MethodHandlerFunc
}
type MethodHandlerFunc ¶
type MethodHandlerFunc func(ctx context.Context, srv interface{}, dec DecoderFunc, middleware MiddlewareFunc) (interface{}, error)
type MiddlewareFunc ¶
type MiddlewareFunc func(HandlerFunc) HandlerFunc
type ServiceDescriptor ¶
type ServiceDescriptor struct {
ServiceName string
HandlerType interface{}
Methods []MethodDescriptor
}
Click to show internal directories.
Click to hide internal directories.