service

package
v0.0.0-...-cc668c3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingServerInterceptor

func LoggingServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

LoggingServerInterceptor logs the incoming request, calls the handler it was intended for logs the response it got and then returns the response and any error.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a very simple service implementation

func New

func New() *Service

func (*Service) AddMap

func (s *Service) AddMap(ctx context.Context, m *apipb.Map) (*apipb.AddMapResponse, error)

func (*Service) DeleteMap

func (s *Service) DeleteMap(ctx context.Context, req *apipb.DeleteMapRequest) (*emptypb.Empty, error)

func (*Service) GetMap

func (s *Service) GetMap(ctx context.Context, req *apipb.GetMapRequest) (*apipb.Map, error)

func (*Service) ListMaps

func (s *Service) ListMaps(ctx context.Context, _ *emptypb.Empty) (*apipb.ListMapsResponse, error)

func (*Service) Update

func (s *Service) Update(ctx context.Context, m *apipb.Map) (*emptypb.Empty, error)

Jump to

Keyboard shortcuts

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