service

package
v0.0.0-...-9fe20ad Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Config             *config.ServiceConfig
	AuthRPCs           []string
	RPCBasePath        string
	RegisterGrpcServer func(*grpc.Server, *zlog.ZwitLogger)
	RegisterRestServer func(context.Context, *runtime.ServeMux, string, []grpc.DialOption) error
	UsersServiceClient userspb.UsersServiceClient
	PostsServiceClient postspb.PostsServiceClient
	AuthServiceClient  authpb.AuthServiceClient
	SwaggerFile        string
	Log                *zlog.ZwitLogger
}

func (*Service) AuthInterceptor

func (s *Service) AuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func (*Service) AuthenticateClient

func (s *Service) AuthenticateClient(token string) (*authpb.User, error)

func (*Service) Start

func (s *Service) Start()

func (*Service) StartGRPCServer

func (s *Service) StartGRPCServer(serv *grpc.Server) error

func (*Service) StartRESTServer

func (s *Service) StartRESTServer(serv *http.Server) error

Jump to

Keyboard shortcuts

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