Skip to content

Instantly share code, notes, and snippets.

@aeharvlee
Last active April 22, 2020 13:49
Show Gist options
  • Save aeharvlee/8abc65f000b54cd0c0feff71370ea10a to your computer and use it in GitHub Desktop.
Save aeharvlee/8abc65f000b54cd0c0feff71370ea10a to your computer and use it in GitHub Desktop.
func (r *BlackIPv4Repository) GetReputationByIPv4(c context.Context, rr *model.ReputationRequest) (reputation *pb.Reputation, err error) {
cli := pb.NewBlackIPv4ServiceClient(r.ClientConn)
l := r.Logger
reputation, err = cli.GetReputationByIPv4(
c,
&pb.ReputationRequest{
StartDate: rr.StartDate, Ipv4: rr.IPv4, Descending: rr.Descending, Limit: rr.Limit, Language: rr.Language,
},
)
if err != nil {
l.Error(err)
}
return reputation, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment