transport

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HandlerGenerateSnowflakeId = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IdGrpc

type IdGrpc struct {
	pb.UnimplementedIdServiceServer

	Grpc     *grpc.Server         `inject:"application.grpc"`
	Endpoint *endpoint.IdEndpoint `inject:""`
	Decoder  *IdGrpcDecoder       `inject:""`
	Encoder  *IdGrpcEncoder       `inject:""`
	// contains filtered or unexported fields
}

func (*IdGrpc) GenerateSnowflakeId

func (t *IdGrpc) GenerateSnowflakeId(ctx context.Context, req *pb.GenerateSnowflakeIdReq) (*pb.GenerateSnowflakeIdRsp, error)

func (*IdGrpc) Register

func (t *IdGrpc) Register() error

type IdGrpcDecoder

type IdGrpcDecoder struct{}

func (*IdGrpcDecoder) GenerateSnowflakeId

func (*IdGrpcDecoder) GenerateSnowflakeId(_ context.Context, r any) (any, error)

type IdGrpcEncoder

type IdGrpcEncoder struct{}

func (*IdGrpcEncoder) GenerateSnowflakeId

func (*IdGrpcEncoder) GenerateSnowflakeId(_ context.Context, r any) (any, error)

type IdHttp

type IdHttp struct {
	Router   *bone.Router         `inject:"application.router"`
	Endpoint *endpoint.IdEndpoint `inject:""`
	Decoder  *IdHttpDecoder       `inject:""`
}

func (*IdHttp) Register

func (t *IdHttp) Register() error

type IdHttpDecoder

type IdHttpDecoder struct{}

func (*IdHttpDecoder) GenerateSnowflakeId

func (*IdHttpDecoder) GenerateSnowflakeId(_ context.Context, r *http.Request) (any, error)

Jump to

Keyboard shortcuts

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