Documentation
¶
Index ¶
- Variables
- func AddEndpoint(subject string, group micro.Group, fn Handler, opts ...EndpointOption) error
- func MicroOptions(cfg micro.Config) *microOpts
- func UUIDMapper(t reflect.Type) []reflect.StructField
- type AttacherFunc
- type AttacherListFunc
- type ContextFunc
- type DecoderFunc
- type EncoderFunc
- type EndpointAttacher
- type EndpointOption
- func WithContext(ctx context.Context) EndpointOption
- func WithContextFn(fn ContextFunc) EndpointOption
- func WithDecoderFn(fn DecoderFunc) EndpointOption
- func WithEncoderFn(fn EncoderFunc) EndpointOption
- func WithErrFn(fn ErrorFunc) EndpointOption
- func WithJsonSchema(reflector jsonschema.Reflector, req interface{}, res interface{}) EndpointOption
- func WithLogger(logger *zap.SugaredLogger, args ...interface{}) EndpointOption
- func WithLoggerRequestFields(args ...interface{}) EndpointOption
- func WithMiddlewares(mws ...Middleware) EndpointOption
- func WithTimeout(t time.Duration) EndpointOption
- func WrapEndpointOptions(mo MicroEndpointConfig, subject string, baseOptions []EndpointOption) []EndpointOption
- type ErrorFunc
- type Handler
- type HandlerTyped
- type MicroEndpointConfig
- type MicroOption
- type Middleware
- type Schema
- type ServiceError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDecodingError = errors.New("decoding error")
)
Functions ¶
func AddEndpoint ¶ added in v0.0.12
func MicroOptions ¶ added in v0.0.35
func UUIDMapper ¶
func UUIDMapper(t reflect.Type) []reflect.StructField
Types ¶
type AttacherFunc ¶ added in v0.0.35
type AttacherListFunc ¶ added in v0.0.35
type AttacherListFunc func() []AttacherFunc
type ContextFunc ¶ added in v0.0.12
type DecoderFunc ¶ added in v0.0.12
type EncoderFunc ¶ added in v0.0.12
type EndpointAttacher ¶
type EndpointAttacher AttacherListFunc
type EndpointOption ¶ added in v0.0.12
type EndpointOption func(*endpointOpts) error
func WithContext ¶
func WithContext(ctx context.Context) EndpointOption
func WithContextFn ¶ added in v0.0.12
func WithContextFn(fn ContextFunc) EndpointOption
func WithDecoderFn ¶ added in v0.0.12
func WithDecoderFn(fn DecoderFunc) EndpointOption
func WithEncoderFn ¶ added in v0.0.12
func WithEncoderFn(fn EncoderFunc) EndpointOption
func WithErrFn ¶ added in v0.0.12
func WithErrFn(fn ErrorFunc) EndpointOption
func WithJsonSchema ¶ added in v0.0.12
func WithJsonSchema(reflector jsonschema.Reflector, req interface{}, res interface{}) EndpointOption
func WithLogger ¶ added in v0.0.34
func WithLogger(logger *zap.SugaredLogger, args ...interface{}) EndpointOption
func WithLoggerRequestFields ¶ added in v0.0.34
func WithLoggerRequestFields(args ...interface{}) EndpointOption
func WithMiddlewares ¶ added in v0.0.12
func WithMiddlewares(mws ...Middleware) EndpointOption
func WithTimeout ¶ added in v0.0.12
func WithTimeout(t time.Duration) EndpointOption
func WrapEndpointOptions ¶ added in v0.0.35
func WrapEndpointOptions(mo MicroEndpointConfig, subject string, baseOptions []EndpointOption) []EndpointOption
type Handler ¶ added in v0.0.12
func WrapTypedEndpoint ¶ added in v0.0.35
func WrapTypedEndpoint[R any, T any](fn HandlerTyped[R, T]) Handler
type HandlerTyped ¶ added in v0.0.35
type MicroEndpointConfig ¶ added in v0.0.35
type MicroEndpointConfig struct {
// contains filtered or unexported fields
}
type MicroOption ¶ added in v0.0.34
type MicroOption func(*microOpts) error
func WithErrorFunc ¶ added in v0.0.34
func WithErrorFunc(fn ErrorFunc) MicroOption
func WithMicroLogger ¶ added in v0.0.34
func WithMicroLogger(logger *zap.SugaredLogger) MicroOption
func WithMicroMiddlewares ¶ added in v0.0.42
func WithMicroMiddlewares(mws ...Middleware) MicroOption
type Middleware ¶ added in v0.0.12
type Schema ¶ added in v0.0.12
func GenerateJsonSchema ¶ added in v0.0.12
func GenerateJsonSchema(reflector jsonschema.Reflector, req interface{}, res interface{}) (*Schema, error)
type ServiceError ¶ added in v0.0.40
type ServiceError struct {
// contains filtered or unexported fields
}
func (*ServiceError) Error ¶ added in v0.0.40
func (e *ServiceError) Error() string
func (*ServiceError) ErrorParts ¶ added in v0.0.40
Click to show internal directories.
Click to hide internal directories.