service

package
v0.0.0-...-b46bf14 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountryServer

type CountryServer struct {
	grpc.UnimplementedCountriesServer
	// contains filtered or unexported fields
}

CountryServer Is a server that will listen on a random available port specifically used for testing GRPC functions.

func (*CountryServer) Create

func (cs *CountryServer) Create(ctx context.Context, country *pb.Country) (*pb.Country, error)

Create adds a country to the saved country list

func (*CountryServer) Delete

func (cs *CountryServer) Delete(ctx context.Context, country *pb.Country) (*pb.StatusResponse, error)

Delete removes a country from the saved countries list.

func (*CountryServer) List

func (cs *CountryServer) List(value *emptypb.Empty, stream grpc.Countries_ListServer) (err error)

List pulls a list of countries from the saved country list

func (*CountryServer) Update

func (cs *CountryServer) Update(ctx context.Context, country *pb.Country) (*pb.Country, error)

Update updates an existing country if it exists in the map, otherwise it adds it.

Jump to

Keyboard shortcuts

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