[#265] v2/rpc: Add SendLocalTrust RPC
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
1766228cfd
commit
51d443c6fc
1 changed files with 29 additions and 0 deletions
29
v2/rpc/reputation.go
Normal file
29
v2/rpc/reputation.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/rpc/common"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/reputation"
|
||||
)
|
||||
|
||||
const serviceReputation = serviceNamePrefix + "reputation.ReputationService"
|
||||
|
||||
const (
|
||||
rpcReputationSendLocalTrust = "SendLocalTrust"
|
||||
)
|
||||
|
||||
// SendLocalTrust executes ReputationService.SendLocalTrust RPC.
|
||||
func SendLocalTrust(
|
||||
cli *client.Client,
|
||||
req *reputation.SendLocalTrustRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*reputation.SendLocalTrustResponse, error) {
|
||||
resp := new(reputation.SendLocalTrustResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationSendLocalTrust), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
Loading…
Reference in a new issue