Documentation ¶
Index ¶
- type Service
- func (s *Service) AddPet(ctx context.Context, req *proto.AddPetRequest) (*proto.AddPetResponse, error)
- func (s *Service) GetPet(ctx context.Context, req *proto.GetPetRequest) (*proto.GetPetResponse, error)
- func (s *Service) GetPets(ctx context.Context, req *proto.GetPetsRequest) (*proto.GetPetsResponse, error)
- type Servicer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { proto.UnimplementedPetsAPIServer // contains filtered or unexported fields }
Service holds onto the state of the Pets service.
func NewService ¶
NewService creates an instance of a Pets Service.
func (*Service) AddPet ¶
func (s *Service) AddPet(ctx context.Context, req *proto.AddPetRequest) (*proto.AddPetResponse, error)
AddPet adds a pet to a database of pets.
func (*Service) GetPet ¶
func (s *Service) GetPet(ctx context.Context, req *proto.GetPetRequest) (*proto.GetPetResponse, error)
GetPet fetches a pet by type/breed.
func (*Service) GetPets ¶
func (s *Service) GetPets(ctx context.Context, req *proto.GetPetsRequest) (*proto.GetPetsResponse, error)
GetPets fetches a list of pets.
type Servicer ¶
type Servicer interface { proto.PetsAPIServer }
Servicer provides the transport-agnostic API for Pets
Click to show internal directories.
Click to hide internal directories.