Documentation ¶
Index ¶
- Constants
- type Config
- type GrpcService
- func (s *GrpcService) Echo(ctx context.Context, in *api.StringMessage) (*api.StringMessage, error)
- func (s *GrpcService) LoadJwtSecret()
- func (s *GrpcService) Login(ctx context.Context, in *api.LoginReqMessage) (*api.LoginRespMessage, error)
- func (s *GrpcService) RegisterServers(sreg grpc.ServiceRegistrar)
- func (s *GrpcService) Stream() grpc.StreamServerInterceptor
- func (s *GrpcService) Unary() grpc.UnaryServerInterceptor
Constants ¶
View Source
const (
SECRETDEFAULT = "secret"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcService ¶
type GrpcService struct { C Config //服务实现接口 api.UnimplementedWebappServiceServer // 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 (s *GrpcService) Echo(ctx context.Context, in *api.StringMessage) (*api.StringMessage, error)
func (*GrpcService) LoadJwtSecret ¶
func (s *GrpcService) LoadJwtSecret()
func (*GrpcService) Login ¶
func (s *GrpcService) Login(ctx context.Context, in *api.LoginReqMessage) (*api.LoginRespMessage, error)
func (*GrpcService) RegisterServers ¶
func (s *GrpcService) RegisterServers(sreg grpc.ServiceRegistrar)
Click to show internal directories.
Click to hide internal directories.