Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BirthdayToTime ¶
BirthdayToTime converts the *pb.Pet.Birthday field to a time.Time object.
Types ¶
type Data ¶
type Data interface { // AddPets adds pet entries into storage. AddPets(ctx context.Context, pets []*pb.Pet) error // UpdatePets updates pet entries in storage. UpdatePets(ctx context.Context, pets []*pb.Pet) error // DeletePets deletes pets in storage by their ID. Will not error // on IDs not found. DeletePets(ctx context.Context, ids []string) error // SearchPets searches storage for pet entries that match the // filter. SearchPets(ctx context.Context, filter *pb.SearchPetsReq) chan SearchItem }
Data represents our data storage.
type SearchItem ¶
type SearchItem struct { // Pet is the pet that matched the search filters. Pet *pb.Pet // Error indicates that there was an error. If set the channel // will close after this entry. Error error }
SearchItem is an item returned by a search.
Click to show internal directories.
Click to hide internal directories.