grpcservice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SECRETDEFAULT = "secret"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	ReadJwtSecret() (secret string, err error)
	GetUser() (userName string, passWd string, err error)
}

type GrpcService

type GrpcService struct {
	C Config

	//服务实现接口
	api.UnimplementedApiServiceServer
	// contains filtered or unexported fields
}

func NewService

func NewService(c Config) *GrpcService

New returns a Service to be registered at a grpc.Server

func (*GrpcService) Echo

func (*GrpcService) GetRESTfulHttpMux

func (s *GrpcService) GetRESTfulHttpMux(httpBind string, https *grpcwebserver.HttpsConf) *grpcwebserver.RESTfulMux

func (*GrpcService) LoadJwtSecret

func (s *GrpcService) LoadJwtSecret()

func (*GrpcService) Login

func (*GrpcService) RegisterServers

func (s *GrpcService) RegisterServers(sreg grpc.ServiceRegistrar)

func (*GrpcService) Stream

stream拦截器

func (*GrpcService) Unary

一元拦截器

Jump to

Keyboard shortcuts

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