Documentation ¶
Index ¶
- type Edison
- func (ed *Edison) GRPCServer() *grpc.Server
- func (ed *Edison) Prepare(opts ...Option)
- func (ed *Edison) RegisterGRPCGateway(f GRPCGatewayHandler)
- func (ed *Edison) RestRouter(method, path string, h RestHandler)
- func (ed *Edison) Start()
- func (ed *Edison) UnaryServerInterceptor(interceptors ...grpc.UnaryServerInterceptor)
- type EdisonJSONSerializer
- type GRPCGatewayHandler
- type Option
- type OptionType
- type RestContext
- type RestHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edison ¶
type Edison struct {
// contains filtered or unexported fields
}
func (*Edison) GRPCServer ¶
func (*Edison) RegisterGRPCGateway ¶
func (ed *Edison) RegisterGRPCGateway(f GRPCGatewayHandler)
func (*Edison) RestRouter ¶
func (ed *Edison) RestRouter(method, path string, h RestHandler)
func (*Edison) UnaryServerInterceptor ¶ added in v0.0.3
func (ed *Edison) UnaryServerInterceptor(interceptors ...grpc.UnaryServerInterceptor)
type EdisonJSONSerializer ¶
type EdisonJSONSerializer struct {
echo.DefaultJSONSerializer
}
func (EdisonJSONSerializer) Serialize ¶
func (d EdisonJSONSerializer) Serialize(c echo.Context, i interface{}, indent string) error
type GRPCGatewayHandler ¶
type Option ¶
type Option interface { Type() OptionType Value() interface{} }
func GracefullShutdown ¶
func GracefullShutdown() Option
type OptionType ¶
type OptionType int
const ( OptRestPort OptionType = iota OptGrcpPort OptGracefullShutdown )
type RestContext ¶
type RestContext struct {
EchoContext echo.Context
}
func (*RestContext) Bind ¶
func (c *RestContext) Bind(i interface{}) error
type RestHandler ¶
type RestHandler func(ctx context.Context, clientCtx RestContext) error
Click to show internal directories.
Click to hide internal directories.