Documentation
¶
Index ¶
- Variables
- func AddEndpoint(subject string, group micro.Group, fn Handler, opts ...EndpointOption) error
- func DefaultMicroOptions(cfg micro.Config) *microOpts
- func UUIDMapper(t reflect.Type) []reflect.StructField
- type ContextFunc
- type DecoderFunc
- type EncoderFunc
- type EndpointAttacher
- type EndpointAttacherSet
- 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
- type Endpointer
- type ErrorFunc
- type Handler
- type MicroOption
- type Middleware
- type Schema
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDecodingError = errors.New("decoding error")
)
Functions ¶
func AddEndpoint ¶ added in v0.0.12
func DefaultMicroOptions ¶ added in v0.0.34
func UUIDMapper ¶
func UUIDMapper(t reflect.Type) []reflect.StructField
Types ¶
type ContextFunc ¶ added in v0.0.12
type DecoderFunc ¶ added in v0.0.12
type EncoderFunc ¶ added in v0.0.12
type EndpointAttacher ¶
type EndpointAttacherSet ¶ added in v0.0.8
type EndpointAttacherSet []EndpointAttacher
func (EndpointAttacherSet) Endpoints ¶ added in v0.0.8
func (e EndpointAttacherSet) Endpoints() []EndpointAttacher
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
type Endpointer ¶
type Endpointer interface {
Endpoints() []EndpointAttacher
}
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
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)
Click to show internal directories.
Click to hide internal directories.