edison

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2022 License: GPL-3.0 Imports: 15 Imported by: 1

README

Edision

Prerequisite

  • github.com/adetxt/protoc-gen-go-edison

WIP...

Documentation

Index

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 New

func New() *Edison

func (*Edison) GRPCServer

func (ed *Edison) GRPCServer() *grpc.Server

func (*Edison) Prepare

func (ed *Edison) Prepare(opts ...Option)

func (*Edison) RegisterGRPCGateway

func (ed *Edison) RegisterGRPCGateway(f GRPCGatewayHandler)

func (*Edison) RestRouter

func (ed *Edison) RestRouter(method, path string, h RestHandler)

func (*Edison) Start

func (ed *Edison) Start()

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 GRPCGatewayHandler func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

type Option

type Option interface {
	Type() OptionType

	Value() interface{}
}

func GracefullShutdown

func GracefullShutdown() Option

func GrpcPort

func GrpcPort(port string) Option

func RestPort

func RestPort(port string) 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL