Documentation
¶
Index ¶
- func RegisterService(e *echo.Echo, spec httpadapter.ServiceSpec, connectHandler http.Handler, ...) error
- type Config
- type Option
- func WithConnectOptions(options ...connect.HandlerOption) Option
- func WithErrorMapper(mapper adaptererrors.ErrorMapper) Option
- func WithErrorWriter(writer adaptererrors.ErrorWriter) Option
- func WithGroupPrefix(prefix string) Option
- func WithMethodErrorMapper(service, method string, mapper adaptererrors.ErrorMapper) Option
- func WithMethodErrorMapperKey(key string, mapper adaptererrors.ErrorMapper) Option
- func WithMethodErrorWriter(service, method string, writer adaptererrors.ErrorWriter) Option
- func WithMethodErrorWriterKey(key string, writer adaptererrors.ErrorWriter) Option
- func WithMethodRequestBinder(service, method string, binder binding.RequestBinder) Option
- func WithMethodRequestBinderKey(key string, binder binding.RequestBinder) Option
- func WithMethodResponseWriter(service, method string, writer response.ResponseWriter) Option
- func WithMethodResponseWriterKey(key string, writer response.ResponseWriter) Option
- func WithMethodValidator(service, method string, validator validate.Validator) Option
- func WithMethodValidatorKey(key string, validator validate.Validator) Option
- func WithMiddleware(middlewares ...echo.MiddlewareFunc) Option
- func WithRequestBinder(binder binding.RequestBinder) Option
- func WithResponseWriter(writer response.ResponseWriter) Option
- func WithValidator(validator validate.Validator) Option
- type ServiceRegistrar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterService ¶
func RegisterService(e *echo.Echo, spec httpadapter.ServiceSpec, connectHandler http.Handler, opts ...Option) error
Types ¶
type Config ¶
type Config struct {
GroupPrefix string
Middlewares []echo.MiddlewareFunc
ConnectOptions []connect.HandlerOption
RequestBinder binding.RequestBinder
ResponseWriter response.ResponseWriter
Validator validate.Validator
ErrorMapper adaptererrors.ErrorMapper
ErrorWriter adaptererrors.ErrorWriter
MethodRequestBinders map[string]binding.RequestBinder
MethodWriters map[string]response.ResponseWriter
MethodValidators map[string]validate.Validator
MethodErrorMappers map[string]adaptererrors.ErrorMapper
MethodErrorWriters map[string]adaptererrors.ErrorWriter
}
type Option ¶
type Option func(*Config)
func WithConnectOptions ¶
func WithConnectOptions(options ...connect.HandlerOption) Option
func WithErrorMapper ¶
func WithErrorMapper(mapper adaptererrors.ErrorMapper) Option
func WithErrorWriter ¶
func WithErrorWriter(writer adaptererrors.ErrorWriter) Option
func WithGroupPrefix ¶
func WithMethodErrorMapper ¶
func WithMethodErrorMapper(service, method string, mapper adaptererrors.ErrorMapper) Option
func WithMethodErrorMapperKey ¶
func WithMethodErrorMapperKey(key string, mapper adaptererrors.ErrorMapper) Option
func WithMethodErrorWriter ¶
func WithMethodErrorWriter(service, method string, writer adaptererrors.ErrorWriter) Option
func WithMethodErrorWriterKey ¶
func WithMethodErrorWriterKey(key string, writer adaptererrors.ErrorWriter) Option
func WithMethodRequestBinder ¶
func WithMethodRequestBinder(service, method string, binder binding.RequestBinder) Option
func WithMethodRequestBinderKey ¶
func WithMethodRequestBinderKey(key string, binder binding.RequestBinder) Option
func WithMethodResponseWriter ¶
func WithMethodResponseWriter(service, method string, writer response.ResponseWriter) Option
func WithMethodResponseWriterKey ¶
func WithMethodResponseWriterKey(key string, writer response.ResponseWriter) Option
func WithMethodValidator ¶
func WithMethodValidatorKey ¶
func WithMiddleware ¶
func WithMiddleware(middlewares ...echo.MiddlewareFunc) Option
func WithRequestBinder ¶
func WithRequestBinder(binder binding.RequestBinder) Option
func WithResponseWriter ¶
func WithResponseWriter(writer response.ResponseWriter) Option
func WithValidator ¶
type ServiceRegistrar ¶
type ServiceRegistrar struct {
Spec httpadapter.ServiceSpec
ConnectHandler http.Handler
Config Config
}
Click to show internal directories.
Click to hide internal directories.