widgetsService

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Unlicense Imports: 13 Imported by: 0

Documentation

Overview

Code generated by ../../../scripts/grpcserver.sh widgets. DO NOT EDIT.

Code generated by ../../../scripts/grpcserver.sh widgets. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Run initializes the Service struct and executes its Run method. The Service struct specifies the grpc server code and any other interfaces to external services defined in connections.go.

Types

type GRPCService

type GRPCService struct {
	Port string

	Server *grpc.Server
}

GRPCService represents an incoming connection i.e a server that handles GRPC messages sent from a client.

func (*GRPCService) Stop

func (g *GRPCService) Stop()

type LoggerInterface

type LoggerInterface interface {
	Open() error
	Close()
	Debug() *zerolog.Event
	Fatal() *zerolog.Event
	Info() *zerolog.Event
}

LoggerInterface corresponds to most interfaces that have an Open/Close interfaces.

type Service

type Service struct {
	widgetsAPI.UnimplementedWidgetsServer

	// An interface as we may want to mock it out in tests.
	Logger LoggerInterface

	// A concrete implementation of a GRPC service.
	GRPC GRPCService
}

implments the widgetsAPI.WidgetsServer interfacw

func (*Service) Connect

func (s *Service) Connect() error

func (*Service) Create

func (*Service) Delete

func (s *Service) Delete(
	ctx context.Context,
	r *widgetsAPI.DeleteRequest,
) (*empty.Empty, error)

func (*Service) FindByID

func (s *Service) FindByID(
	ctx context.Context,
	r *widgetsAPI.FindRequest,
) (*widgetsAPI.Widget, error)

func (*Service) List

func (*Service) Run

func (s *Service) Run() error

func (*Service) StartGRPCService

func (s *Service) StartGRPCService() error

StartGRPCService initialises the GRPC service structs generated in thee qpis package and starts the GRPC service.

func (*Service) Update

Jump to

Keyboard shortcuts

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