Synchronize namings with NeoFS API v2.6.0

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-05-07 12:34:24 +03:00 committed by Alex Vanin
parent fcb2cce8a0
commit 099347d3bc
13 changed files with 586 additions and 577 deletions

View file

@ -13,45 +13,45 @@ import (
// Reputation contains methods for working with Reputation system values.
type Reputation interface {
// SendLocalTrust sends local trust values of local peer.
SendLocalTrust(context.Context, SendLocalTrustPrm, ...CallOption) (*SendLocalTrustRes, error)
// AnnounceLocalTrust announces local trust values of local peer.
AnnounceLocalTrust(context.Context, AnnounceLocalTrustPrm, ...CallOption) (*AnnounceLocalTrustRes, error)
// SendIntermediateTrust sends the intermediate result of the iterative algorithm for calculating
// AnnounceIntermediateTrust announces the intermediate result of the iterative algorithm for calculating
// the global reputation of the node.
SendIntermediateTrust(context.Context, SendIntermediateTrustPrm, ...CallOption) (*SendIntermediateTrustRes, error)
AnnounceIntermediateTrust(context.Context, AnnounceIntermediateTrustPrm, ...CallOption) (*AnnounceIntermediateTrustRes, error)
}
// SendLocalTrustPrm groups parameters of SendLocalTrust operation.
type SendLocalTrustPrm struct {
// AnnounceLocalTrustPrm groups parameters of AnnounceLocalTrust operation.
type AnnounceLocalTrustPrm struct {
epoch uint64
trusts []*reputation.Trust
}
// Epoch returns epoch in which the trust was assessed.
func (x SendLocalTrustPrm) Epoch() uint64 {
func (x AnnounceLocalTrustPrm) Epoch() uint64 {
return x.epoch
}
// SetEpoch sets epoch in which the trust was assessed.
func (x *SendLocalTrustPrm) SetEpoch(epoch uint64) {
func (x *AnnounceLocalTrustPrm) SetEpoch(epoch uint64) {
x.epoch = epoch
}
// Trusts returns list of local trust values.
func (x SendLocalTrustPrm) Trusts() []*reputation.Trust {
func (x AnnounceLocalTrustPrm) Trusts() []*reputation.Trust {
return x.trusts
}
// SetTrusts sets list of local trust values.
func (x *SendLocalTrustPrm) SetTrusts(trusts []*reputation.Trust) {
func (x *AnnounceLocalTrustPrm) SetTrusts(trusts []*reputation.Trust) {
x.trusts = trusts
}
// SendLocalTrustPrm groups results of SendLocalTrust operation.
type SendLocalTrustRes struct{}
// AnnounceLocalTrustRes groups results of AnnounceLocalTrust operation.
type AnnounceLocalTrustRes struct{}
func (c *clientImpl) SendLocalTrust(ctx context.Context, prm SendLocalTrustPrm, opts ...CallOption) (*SendLocalTrustRes, error) {
func (c *clientImpl) AnnounceLocalTrust(ctx context.Context, prm AnnounceLocalTrustPrm, opts ...CallOption) (*AnnounceLocalTrustRes, error) {
// apply all available options
callOptions := c.defaultCallOptions()
@ -59,11 +59,11 @@ func (c *clientImpl) SendLocalTrust(ctx context.Context, prm SendLocalTrustPrm,
opts[i](callOptions)
}
reqBody := new(v2reputation.SendLocalTrustRequestBody)
reqBody := new(v2reputation.AnnounceLocalTrustRequestBody)
reqBody.SetEpoch(prm.Epoch())
reqBody.SetTrusts(reputation.TrustsToV2(prm.Trusts()))
req := new(v2reputation.SendLocalTrustRequest)
req := new(v2reputation.AnnounceLocalTrustRequest)
req.SetBody(reqBody)
req.SetMetaHeader(v2MetaHeaderFromOpts(callOptions))
@ -72,7 +72,7 @@ func (c *clientImpl) SendLocalTrust(ctx context.Context, prm SendLocalTrustPrm,
return nil, err
}
resp, err := rpcapi.SendLocalTrust(c.Raw(), req, client.WithContext(ctx))
resp, err := rpcapi.AnnounceLocalTrust(c.Raw(), req, client.WithContext(ctx))
if err != nil {
return nil, err
}
@ -82,11 +82,11 @@ func (c *clientImpl) SendLocalTrust(ctx context.Context, prm SendLocalTrustPrm,
return nil, errors.Wrap(err, "can't verify response message")
}
return new(SendLocalTrustRes), nil
return new(AnnounceLocalTrustRes), nil
}
// SendIntermediateTrustPrm groups parameters of SendIntermediateTrust operation.
type SendIntermediateTrustPrm struct {
// AnnounceIntermediateTrustPrm groups parameters of AnnounceIntermediateTrust operation.
type AnnounceIntermediateTrustPrm struct {
epoch uint64
iter uint32
@ -94,38 +94,38 @@ type SendIntermediateTrustPrm struct {
trust *reputation.PeerToPeerTrust
}
func (x *SendIntermediateTrustPrm) Epoch() uint64 {
func (x *AnnounceIntermediateTrustPrm) Epoch() uint64 {
return x.epoch
}
func (x *SendIntermediateTrustPrm) SetEpoch(epoch uint64) {
func (x *AnnounceIntermediateTrustPrm) SetEpoch(epoch uint64) {
x.epoch = epoch
}
// Iteration returns sequence number of the iteration.
func (x SendIntermediateTrustPrm) Iteration() uint32 {
func (x AnnounceIntermediateTrustPrm) Iteration() uint32 {
return x.iter
}
// SetIteration sets sequence number of the iteration.
func (x *SendIntermediateTrustPrm) SetIteration(iter uint32) {
func (x *AnnounceIntermediateTrustPrm) SetIteration(iter uint32) {
x.iter = iter
}
// Trust returns current global trust value computed at the specified iteration.
func (x SendIntermediateTrustPrm) Trust() *reputation.PeerToPeerTrust {
func (x AnnounceIntermediateTrustPrm) Trust() *reputation.PeerToPeerTrust {
return x.trust
}
// SetTrust sets current global trust value computed at the specified iteration.
func (x *SendIntermediateTrustPrm) SetTrust(trust *reputation.PeerToPeerTrust) {
func (x *AnnounceIntermediateTrustPrm) SetTrust(trust *reputation.PeerToPeerTrust) {
x.trust = trust
}
// SendIntermediateTrustRes groups results of SendIntermediateTrust operation.
type SendIntermediateTrustRes struct{}
// AnnounceIntermediateTrustRes groups results of AnnounceIntermediateTrust operation.
type AnnounceIntermediateTrustRes struct{}
func (c *clientImpl) SendIntermediateTrust(ctx context.Context, prm SendIntermediateTrustPrm, opts ...CallOption) (*SendIntermediateTrustRes, error) {
func (c *clientImpl) AnnounceIntermediateTrust(ctx context.Context, prm AnnounceIntermediateTrustPrm, opts ...CallOption) (*AnnounceIntermediateTrustRes, error) {
// apply all available options
callOptions := c.defaultCallOptions()
@ -133,12 +133,12 @@ func (c *clientImpl) SendIntermediateTrust(ctx context.Context, prm SendIntermed
opts[i](callOptions)
}
reqBody := new(v2reputation.SendIntermediateResultRequestBody)
reqBody := new(v2reputation.AnnounceIntermediateResultRequestBody)
reqBody.SetEpoch(prm.Epoch())
reqBody.SetIteration(prm.Iteration())
reqBody.SetTrust(prm.Trust().ToV2())
req := new(v2reputation.SendIntermediateResultRequest)
req := new(v2reputation.AnnounceIntermediateResultRequest)
req.SetBody(reqBody)
req.SetMetaHeader(v2MetaHeaderFromOpts(callOptions))
@ -147,7 +147,7 @@ func (c *clientImpl) SendIntermediateTrust(ctx context.Context, prm SendIntermed
return nil, err
}
resp, err := rpcapi.SendIntermediateResult(c.Raw(), req, client.WithContext(ctx))
resp, err := rpcapi.AnnounceIntermediateResult(c.Raw(), req, client.WithContext(ctx))
if err != nil {
return nil, err
}
@ -157,5 +157,5 @@ func (c *clientImpl) SendIntermediateTrust(ctx context.Context, prm SendIntermed
return nil, errors.Wrap(err, "can't verify response message")
}
return new(SendIntermediateTrustRes), nil
return new(AnnounceIntermediateTrustRes), nil
}

View file

@ -24,7 +24,7 @@ func PeerIDFromV2(id *reputation.PeerID) *PeerID {
// SetPublicKey sets peer ID as a compressed public key.
func (x *PeerID) SetPublicKey(v [crypto.PublicKeyCompressedSize]byte) {
(*reputation.PeerID)(x).
SetValue(v[:])
SetPublicKey(v[:])
}
// ToV2 converts PeerID to NeoFS API v2 reputation.PeerID message.
@ -35,8 +35,8 @@ func (x *PeerID) ToV2() *reputation.PeerID {
// Equal returns true if identifiers are identical.
func (x *PeerID) Equal(x2 *PeerID) bool {
return bytes.Equal(
(*reputation.PeerID)(x).GetValue(),
(*reputation.PeerID)(x2).GetValue(),
(*reputation.PeerID)(x).GetPublicKey(),
(*reputation.PeerID)(x2).GetPublicKey(),
)
}
@ -47,7 +47,7 @@ func (x *PeerID) Parse(s string) error {
return err
}
(*reputation.PeerID)(x).SetValue(data)
(*reputation.PeerID)(x).SetPublicKey(data)
return nil
}
@ -56,7 +56,7 @@ func (x *PeerID) Parse(s string) error {
func (x *PeerID) String() string {
return base58.Encode(
(*reputation.PeerID)(x).
GetValue(),
GetPublicKey(),
)
}

View file

@ -16,7 +16,7 @@ func (x *PeerID) ToGRPCMessage() grpc.Message {
if x != nil {
m = new(reputation.PeerID)
m.SetValue(x.val)
m.SetPublicKey(x.publicKey)
}
return m
@ -32,7 +32,7 @@ func (x *PeerID) FromGRPCMessage(m grpc.Message) error {
return message.NewUnexpectedMessageType(m, v)
}
x.val = v.GetValue()
x.publicKey = v.GetPublicKey()
return nil
}
@ -300,13 +300,13 @@ func (x *GlobalTrust) FromGRPCMessage(m grpc.Message) error {
return err
}
// ToGRPCMessage converts SendLocalTrustRequestBody to gRPC-generated
// reputation.SendLocalTrustRequest_Body message.
func (x *SendLocalTrustRequestBody) ToGRPCMessage() grpc.Message {
var m *reputation.SendLocalTrustRequest_Body
// ToGRPCMessage converts AnnounceLocalTrustRequestBody to gRPC-generated
// reputation.AnnounceLocalTrustRequest_Body message.
func (x *AnnounceLocalTrustRequestBody) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceLocalTrustRequest_Body
if x != nil {
m = new(reputation.SendLocalTrustRequest_Body)
m = new(reputation.AnnounceLocalTrustRequest_Body)
m.SetEpoch(x.epoch)
m.SetTrusts(TrustsToGRPC(x.trusts))
@ -315,12 +315,12 @@ func (x *SendLocalTrustRequestBody) ToGRPCMessage() grpc.Message {
return m
}
// FromGRPCMessage tries to restore SendLocalTrustRequestBody from grpc.Message.
// FromGRPCMessage tries to restore AnnounceLocalTrustRequestBody from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendLocalTrustRequest_Body message.
func (x *SendLocalTrustRequestBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendLocalTrustRequest_Body)
// a gRPC-generated reputation.AnnounceLocalTrustRequest_Body message.
func (x *AnnounceLocalTrustRequestBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceLocalTrustRequest_Body)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -337,27 +337,27 @@ func (x *SendLocalTrustRequestBody) FromGRPCMessage(m grpc.Message) error {
return nil
}
// ToGRPCMessage converts SendLocalTrustRequest to gRPC-generated
// reputation.SendLocalTrustRequest message.
func (x *SendLocalTrustRequest) ToGRPCMessage() grpc.Message {
var m *reputation.SendLocalTrustRequest
// ToGRPCMessage converts AnnounceLocalTrustRequest to gRPC-generated
// reputation.AnnounceLocalTrustRequest message.
func (x *AnnounceLocalTrustRequest) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceLocalTrustRequest
if x != nil {
m = new(reputation.SendLocalTrustRequest)
m = new(reputation.AnnounceLocalTrustRequest)
m.SetBody(x.body.ToGRPCMessage().(*reputation.SendLocalTrustRequest_Body))
m.SetBody(x.body.ToGRPCMessage().(*reputation.AnnounceLocalTrustRequest_Body))
x.RequestHeaders.ToMessage(m)
}
return m
}
// FromGRPCMessage tries to restore SendLocalTrustRequest from grpc.Message.
// FromGRPCMessage tries to restore AnnounceLocalTrustRequest from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendLocalTrustRequest message.
func (x *SendLocalTrustRequest) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendLocalTrustRequest)
// a gRPC-generated reputation.AnnounceLocalTrustRequest message.
func (x *AnnounceLocalTrustRequest) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceLocalTrustRequest)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -369,7 +369,7 @@ func (x *SendLocalTrustRequest) FromGRPCMessage(m grpc.Message) error {
x.body = nil
} else {
if x.body == nil {
x.body = new(SendLocalTrustRequestBody)
x.body = new(AnnounceLocalTrustRequestBody)
}
err = x.body.FromGRPCMessage(body)
@ -381,24 +381,24 @@ func (x *SendLocalTrustRequest) FromGRPCMessage(m grpc.Message) error {
return x.RequestHeaders.FromMessage(v)
}
// ToGRPCMessage converts SendLocalTrustResponseBody to gRPC-generated
// reputation.SendLocalTrustResponse_Body message.
func (x *SendLocalTrustResponseBody) ToGRPCMessage() grpc.Message {
var m *reputation.SendLocalTrustResponse_Body
// ToGRPCMessage converts AnnounceLocalTrustResponseBody to gRPC-generated
// reputation.AnnounceLocalTrustResponse_Body message.
func (x *AnnounceLocalTrustResponseBody) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceLocalTrustResponse_Body
if x != nil {
m = new(reputation.SendLocalTrustResponse_Body)
m = new(reputation.AnnounceLocalTrustResponse_Body)
}
return m
}
// FromGRPCMessage tries to restore SendLocalTrustResponseBody from grpc.Message.
// FromGRPCMessage tries to restore AnnounceLocalTrustResponseBody from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendLocalTrustResponse_Body message.
func (x *SendLocalTrustResponseBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendLocalTrustResponse_Body)
// a gRPC-generated reputation.AnnounceLocalTrustResponse_Body message.
func (x *AnnounceLocalTrustResponseBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceLocalTrustResponse_Body)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -406,27 +406,27 @@ func (x *SendLocalTrustResponseBody) FromGRPCMessage(m grpc.Message) error {
return nil
}
// ToGRPCMessage converts SendLocalTrustResponse to gRPC-generated
// reputation.SendLocalTrustResponse message.
func (x *SendLocalTrustResponse) ToGRPCMessage() grpc.Message {
var m *reputation.SendLocalTrustResponse
// ToGRPCMessage converts AnnounceLocalTrustResponse to gRPC-generated
// reputation.AnnounceLocalTrustResponse message.
func (x *AnnounceLocalTrustResponse) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceLocalTrustResponse
if x != nil {
m = new(reputation.SendLocalTrustResponse)
m = new(reputation.AnnounceLocalTrustResponse)
m.SetBody(x.body.ToGRPCMessage().(*reputation.SendLocalTrustResponse_Body))
m.SetBody(x.body.ToGRPCMessage().(*reputation.AnnounceLocalTrustResponse_Body))
x.ResponseHeaders.ToMessage(m)
}
return m
}
// FromGRPCMessage tries to restore SendLocalTrustResponse from grpc.Message.
// FromGRPCMessage tries to restore AnnounceLocalTrustResponse from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendLocalTrustResponse message.
func (x *SendLocalTrustResponse) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendLocalTrustResponse)
// a gRPC-generated reputation.AnnounceLocalTrustResponse message.
func (x *AnnounceLocalTrustResponse) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceLocalTrustResponse)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -438,7 +438,7 @@ func (x *SendLocalTrustResponse) FromGRPCMessage(m grpc.Message) error {
x.body = nil
} else {
if x.body == nil {
x.body = new(SendLocalTrustResponseBody)
x.body = new(AnnounceLocalTrustResponseBody)
}
err = x.body.FromGRPCMessage(body)
@ -450,13 +450,13 @@ func (x *SendLocalTrustResponse) FromGRPCMessage(m grpc.Message) error {
return x.ResponseHeaders.FromMessage(v)
}
// ToGRPCMessage converts SendIntermediateResultRequestBody to gRPC-generated
// reputation.SendIntermediateResultRequest_Body message.
func (x *SendIntermediateResultRequestBody) ToGRPCMessage() grpc.Message {
var m *reputation.SendIntermediateResultRequest_Body
// ToGRPCMessage converts AnnounceIntermediateResultRequestBody to gRPC-generated
// reputation.AnnounceIntermediateResultRequest_Body message.
func (x *AnnounceIntermediateResultRequestBody) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceIntermediateResultRequest_Body
if x != nil {
m = new(reputation.SendIntermediateResultRequest_Body)
m = new(reputation.AnnounceIntermediateResultRequest_Body)
m.SetEpoch(x.epoch)
m.SetIteration(x.iter)
@ -466,12 +466,12 @@ func (x *SendIntermediateResultRequestBody) ToGRPCMessage() grpc.Message {
return m
}
// FromGRPCMessage tries to restore SendIntermediateResultRequestBody from grpc.Message.
// FromGRPCMessage tries to restore AnnounceIntermediateResultRequestBody from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendIntermediateResultRequest_Body message.
func (x *SendIntermediateResultRequestBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendIntermediateResultRequest_Body)
// a gRPC-generated reputation.AnnounceIntermediateResultRequest_Body message.
func (x *AnnounceIntermediateResultRequestBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceIntermediateResultRequest_Body)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -496,27 +496,27 @@ func (x *SendIntermediateResultRequestBody) FromGRPCMessage(m grpc.Message) erro
return nil
}
// ToGRPCMessage converts SendIntermediateResultRequest to gRPC-generated
// reputation.SendIntermediateResultRequest message.
func (x *SendIntermediateResultRequest) ToGRPCMessage() grpc.Message {
var m *reputation.SendIntermediateResultRequest
// ToGRPCMessage converts AnnounceIntermediateResultRequest to gRPC-generated
// reputation.AnnounceIntermediateResultRequest message.
func (x *AnnounceIntermediateResultRequest) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceIntermediateResultRequest
if x != nil {
m = new(reputation.SendIntermediateResultRequest)
m = new(reputation.AnnounceIntermediateResultRequest)
m.SetBody(x.body.ToGRPCMessage().(*reputation.SendIntermediateResultRequest_Body))
m.SetBody(x.body.ToGRPCMessage().(*reputation.AnnounceIntermediateResultRequest_Body))
x.RequestHeaders.ToMessage(m)
}
return m
}
// FromGRPCMessage tries to restore SendIntermediateResultRequest from grpc.Message.
// FromGRPCMessage tries to restore AnnounceIntermediateResultRequest from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendIntermediateResultRequest message.
func (x *SendIntermediateResultRequest) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendIntermediateResultRequest)
// a gRPC-generated reputation.AnnounceIntermediateResultRequest message.
func (x *AnnounceIntermediateResultRequest) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceIntermediateResultRequest)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -528,7 +528,7 @@ func (x *SendIntermediateResultRequest) FromGRPCMessage(m grpc.Message) error {
x.body = nil
} else {
if x.body == nil {
x.body = new(SendIntermediateResultRequestBody)
x.body = new(AnnounceIntermediateResultRequestBody)
}
err = x.body.FromGRPCMessage(body)
@ -540,24 +540,24 @@ func (x *SendIntermediateResultRequest) FromGRPCMessage(m grpc.Message) error {
return x.RequestHeaders.FromMessage(v)
}
// ToGRPCMessage converts SendIntermediateResultResponseBody to gRPC-generated
// reputation.SendIntermediateResultResponse_Body message.
func (x *SendIntermediateResultResponseBody) ToGRPCMessage() grpc.Message {
var m *reputation.SendIntermediateResultResponse_Body
// ToGRPCMessage converts AnnounceIntermediateResultResponseBody to gRPC-generated
// reputation.AnnounceIntermediateResultResponse_Body message.
func (x *AnnounceIntermediateResultResponseBody) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceIntermediateResultResponse_Body
if x != nil {
m = new(reputation.SendIntermediateResultResponse_Body)
m = new(reputation.AnnounceIntermediateResultResponse_Body)
}
return m
}
// FromGRPCMessage tries to restore SendIntermediateResultResponseBody from grpc.Message.
// FromGRPCMessage tries to restore AnnounceIntermediateResultResponseBody from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendIntermediateResultResponse_Body message.
func (x *SendIntermediateResultResponseBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendIntermediateResultResponse_Body)
// a gRPC-generated reputation.AnnounceIntermediateResultResponse_Body message.
func (x *AnnounceIntermediateResultResponseBody) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceIntermediateResultResponse_Body)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -565,27 +565,27 @@ func (x *SendIntermediateResultResponseBody) FromGRPCMessage(m grpc.Message) err
return nil
}
// ToGRPCMessage converts SendIntermediateResultResponse to gRPC-generated
// reputation.SendIntermediateResultResponse message.
func (x *SendIntermediateResultResponse) ToGRPCMessage() grpc.Message {
var m *reputation.SendIntermediateResultResponse
// ToGRPCMessage converts AnnounceIntermediateResultResponse to gRPC-generated
// reputation.AnnounceIntermediateResultResponse message.
func (x *AnnounceIntermediateResultResponse) ToGRPCMessage() grpc.Message {
var m *reputation.AnnounceIntermediateResultResponse
if x != nil {
m = new(reputation.SendIntermediateResultResponse)
m = new(reputation.AnnounceIntermediateResultResponse)
m.SetBody(x.body.ToGRPCMessage().(*reputation.SendIntermediateResultResponse_Body))
m.SetBody(x.body.ToGRPCMessage().(*reputation.AnnounceIntermediateResultResponse_Body))
x.ResponseHeaders.ToMessage(m)
}
return m
}
// FromGRPCMessage tries to restore SendIntermediateResultResponse from grpc.Message.
// FromGRPCMessage tries to restore AnnounceIntermediateResultResponse from grpc.Message.
//
// Returns message.ErrUnexpectedMessageType if m is not
// a gRPC-generated reputation.SendIntermediateResultResponse message.
func (x *SendIntermediateResultResponse) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.SendIntermediateResultResponse)
// a gRPC-generated reputation.AnnounceIntermediateResultResponse message.
func (x *AnnounceIntermediateResultResponse) FromGRPCMessage(m grpc.Message) error {
v, ok := m.(*reputation.AnnounceIntermediateResultResponse)
if !ok {
return message.NewUnexpectedMessageType(m, v)
}
@ -597,7 +597,7 @@ func (x *SendIntermediateResultResponse) FromGRPCMessage(m grpc.Message) error {
x.body = nil
} else {
if x.body == nil {
x.body = new(SendIntermediateResultResponseBody)
x.body = new(AnnounceIntermediateResultResponseBody)
}
err = x.body.FromGRPCMessage(body)

View file

@ -5,119 +5,119 @@ import (
)
// SetEpoch sets epoch in which the trust was assessed.
func (x *SendLocalTrustRequest_Body) SetEpoch(v uint64) {
func (x *AnnounceLocalTrustRequest_Body) SetEpoch(v uint64) {
if x != nil {
x.Epoch = v
}
}
// SetTrusts sets list of normalized trust values.
func (x *SendLocalTrustRequest_Body) SetTrusts(v []*Trust) {
func (x *AnnounceLocalTrustRequest_Body) SetTrusts(v []*Trust) {
if x != nil {
x.Trusts = v
}
}
// SetBody sets body of the request.
func (x *SendLocalTrustRequest) SetBody(v *SendLocalTrustRequest_Body) {
func (x *AnnounceLocalTrustRequest) SetBody(v *AnnounceLocalTrustRequest_Body) {
if x != nil {
x.Body = v
}
}
// SetMetaHeader sets meta header of the request.
func (x *SendLocalTrustRequest) SetMetaHeader(v *session.RequestMetaHeader) {
func (x *AnnounceLocalTrustRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if x != nil {
x.MetaHeader = v
}
}
// SetVerifyHeader sets verification header of the request.
func (x *SendLocalTrustRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
func (x *AnnounceLocalTrustRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if x != nil {
x.VerifyHeader = v
}
}
// SetBody sets body of the response.
func (x *SendLocalTrustResponse) SetBody(v *SendLocalTrustResponse_Body) {
func (x *AnnounceLocalTrustResponse) SetBody(v *AnnounceLocalTrustResponse_Body) {
if x != nil {
x.Body = v
}
}
// SetMetaHeader sets meta header of the response.
func (x *SendLocalTrustResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
func (x *AnnounceLocalTrustResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if x != nil {
x.MetaHeader = v
}
}
// SetVerifyHeader sets verification header of the response.
func (x *SendLocalTrustResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
func (x *AnnounceLocalTrustResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if x != nil {
x.VerifyHeader = v
}
}
// SetEpoch sets epoch in which the intermediate trust was assessed.
func (x *SendIntermediateResultRequest_Body) SetEpoch(v uint64) {
func (x *AnnounceIntermediateResultRequest_Body) SetEpoch(v uint64) {
if x != nil {
x.Epoch = v
}
}
// SetIteration sets sequence number of the iteration.
func (x *SendIntermediateResultRequest_Body) SetIteration(v uint32) {
func (x *AnnounceIntermediateResultRequest_Body) SetIteration(v uint32) {
if x != nil {
x.Iteration = v
}
}
// SetTrust sets current global trust value.
func (x *SendIntermediateResultRequest_Body) SetTrust(v *PeerToPeerTrust) {
func (x *AnnounceIntermediateResultRequest_Body) SetTrust(v *PeerToPeerTrust) {
if x != nil {
x.Trust = v
}
}
// SetBody sets body of the request.
func (x *SendIntermediateResultRequest) SetBody(v *SendIntermediateResultRequest_Body) {
func (x *AnnounceIntermediateResultRequest) SetBody(v *AnnounceIntermediateResultRequest_Body) {
if x != nil {
x.Body = v
}
}
// SetMetaHeader sets meta header of the request.
func (x *SendIntermediateResultRequest) SetMetaHeader(v *session.RequestMetaHeader) {
func (x *AnnounceIntermediateResultRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if x != nil {
x.MetaHeader = v
}
}
// SetVerifyHeader sets verification header of the request.
func (x *SendIntermediateResultRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
func (x *AnnounceIntermediateResultRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if x != nil {
x.VerifyHeader = v
}
}
// SetBody sets body of the response.
func (x *SendIntermediateResultResponse) SetBody(v *SendIntermediateResultResponse_Body) {
func (x *AnnounceIntermediateResultResponse) SetBody(v *AnnounceIntermediateResultResponse_Body) {
if x != nil {
x.Body = v
}
}
// SetMetaHeader sets meta header of the response.
func (x *SendIntermediateResultResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
func (x *AnnounceIntermediateResultResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if x != nil {
x.MetaHeader = v
}
}
// SetVerifyHeader sets verification header of the response.
func (x *SendIntermediateResultResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
func (x *AnnounceIntermediateResultResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if x != nil {
x.VerifyHeader = v
}

View file

@ -30,14 +30,14 @@ const (
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Request to send local trust.
type SendLocalTrustRequest struct {
// Announce node's local trust information.
type AnnounceLocalTrustRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Body of the request message.
Body *SendLocalTrustRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Body *AnnounceLocalTrustRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *grpc.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"`
@ -47,8 +47,8 @@ type SendLocalTrustRequest struct {
VerifyHeader *grpc.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"`
}
func (x *SendLocalTrustRequest) Reset() {
*x = SendLocalTrustRequest{}
func (x *AnnounceLocalTrustRequest) Reset() {
*x = AnnounceLocalTrustRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -56,13 +56,13 @@ func (x *SendLocalTrustRequest) Reset() {
}
}
func (x *SendLocalTrustRequest) String() string {
func (x *AnnounceLocalTrustRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendLocalTrustRequest) ProtoMessage() {}
func (*AnnounceLocalTrustRequest) ProtoMessage() {}
func (x *SendLocalTrustRequest) ProtoReflect() protoreflect.Message {
func (x *AnnounceLocalTrustRequest) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -74,40 +74,40 @@ func (x *SendLocalTrustRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SendLocalTrustRequest.ProtoReflect.Descriptor instead.
func (*SendLocalTrustRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceLocalTrustRequest.ProtoReflect.Descriptor instead.
func (*AnnounceLocalTrustRequest) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{0}
}
func (x *SendLocalTrustRequest) GetBody() *SendLocalTrustRequest_Body {
func (x *AnnounceLocalTrustRequest) GetBody() *AnnounceLocalTrustRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *SendLocalTrustRequest) GetMetaHeader() *grpc.RequestMetaHeader {
func (x *AnnounceLocalTrustRequest) GetMetaHeader() *grpc.RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *SendLocalTrustRequest) GetVerifyHeader() *grpc.RequestVerificationHeader {
func (x *AnnounceLocalTrustRequest) GetVerifyHeader() *grpc.RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
// Response to request to send local trust.
type SendLocalTrustResponse struct {
// Node's local trust information announce response.
type AnnounceLocalTrustResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Body of the response message.
Body *SendLocalTrustResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Body *AnnounceLocalTrustResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *grpc.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"`
@ -117,8 +117,8 @@ type SendLocalTrustResponse struct {
VerifyHeader *grpc.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"`
}
func (x *SendLocalTrustResponse) Reset() {
*x = SendLocalTrustResponse{}
func (x *AnnounceLocalTrustResponse) Reset() {
*x = AnnounceLocalTrustResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -126,13 +126,13 @@ func (x *SendLocalTrustResponse) Reset() {
}
}
func (x *SendLocalTrustResponse) String() string {
func (x *AnnounceLocalTrustResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendLocalTrustResponse) ProtoMessage() {}
func (*AnnounceLocalTrustResponse) ProtoMessage() {}
func (x *SendLocalTrustResponse) ProtoReflect() protoreflect.Message {
func (x *AnnounceLocalTrustResponse) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -144,40 +144,40 @@ func (x *SendLocalTrustResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SendLocalTrustResponse.ProtoReflect.Descriptor instead.
func (*SendLocalTrustResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceLocalTrustResponse.ProtoReflect.Descriptor instead.
func (*AnnounceLocalTrustResponse) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{1}
}
func (x *SendLocalTrustResponse) GetBody() *SendLocalTrustResponse_Body {
func (x *AnnounceLocalTrustResponse) GetBody() *AnnounceLocalTrustResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *SendLocalTrustResponse) GetMetaHeader() *grpc.ResponseMetaHeader {
func (x *AnnounceLocalTrustResponse) GetMetaHeader() *grpc.ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *SendLocalTrustResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader {
func (x *AnnounceLocalTrustResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
// Request to send intermediate global trust.
type SendIntermediateResultRequest struct {
// Announce intermediate global trust information.
type AnnounceIntermediateResultRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Body of the request message.
Body *SendIntermediateResultRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Body *AnnounceIntermediateResultRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *grpc.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"`
@ -187,8 +187,8 @@ type SendIntermediateResultRequest struct {
VerifyHeader *grpc.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"`
}
func (x *SendIntermediateResultRequest) Reset() {
*x = SendIntermediateResultRequest{}
func (x *AnnounceIntermediateResultRequest) Reset() {
*x = AnnounceIntermediateResultRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -196,13 +196,13 @@ func (x *SendIntermediateResultRequest) Reset() {
}
}
func (x *SendIntermediateResultRequest) String() string {
func (x *AnnounceIntermediateResultRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendIntermediateResultRequest) ProtoMessage() {}
func (*AnnounceIntermediateResultRequest) ProtoMessage() {}
func (x *SendIntermediateResultRequest) ProtoReflect() protoreflect.Message {
func (x *AnnounceIntermediateResultRequest) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -214,40 +214,40 @@ func (x *SendIntermediateResultRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SendIntermediateResultRequest.ProtoReflect.Descriptor instead.
func (*SendIntermediateResultRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceIntermediateResultRequest.ProtoReflect.Descriptor instead.
func (*AnnounceIntermediateResultRequest) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{2}
}
func (x *SendIntermediateResultRequest) GetBody() *SendIntermediateResultRequest_Body {
func (x *AnnounceIntermediateResultRequest) GetBody() *AnnounceIntermediateResultRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *SendIntermediateResultRequest) GetMetaHeader() *grpc.RequestMetaHeader {
func (x *AnnounceIntermediateResultRequest) GetMetaHeader() *grpc.RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *SendIntermediateResultRequest) GetVerifyHeader() *grpc.RequestVerificationHeader {
func (x *AnnounceIntermediateResultRequest) GetVerifyHeader() *grpc.RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
// Response to request to send intermediate global trust.
type SendIntermediateResultResponse struct {
// Intermediate global trust information announce response.
type AnnounceIntermediateResultResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Body of the response message.
Body *SendIntermediateResultResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Body *AnnounceIntermediateResultResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
MetaHeader *grpc.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"`
@ -257,8 +257,8 @@ type SendIntermediateResultResponse struct {
VerifyHeader *grpc.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"`
}
func (x *SendIntermediateResultResponse) Reset() {
*x = SendIntermediateResultResponse{}
func (x *AnnounceIntermediateResultResponse) Reset() {
*x = AnnounceIntermediateResultResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -266,13 +266,13 @@ func (x *SendIntermediateResultResponse) Reset() {
}
}
func (x *SendIntermediateResultResponse) String() string {
func (x *AnnounceIntermediateResultResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendIntermediateResultResponse) ProtoMessage() {}
func (*AnnounceIntermediateResultResponse) ProtoMessage() {}
func (x *SendIntermediateResultResponse) ProtoReflect() protoreflect.Message {
func (x *AnnounceIntermediateResultResponse) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -284,48 +284,48 @@ func (x *SendIntermediateResultResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SendIntermediateResultResponse.ProtoReflect.Descriptor instead.
func (*SendIntermediateResultResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceIntermediateResultResponse.ProtoReflect.Descriptor instead.
func (*AnnounceIntermediateResultResponse) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{3}
}
func (x *SendIntermediateResultResponse) GetBody() *SendIntermediateResultResponse_Body {
func (x *AnnounceIntermediateResultResponse) GetBody() *AnnounceIntermediateResultResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *SendIntermediateResultResponse) GetMetaHeader() *grpc.ResponseMetaHeader {
func (x *AnnounceIntermediateResultResponse) GetMetaHeader() *grpc.ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *SendIntermediateResultResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader {
func (x *AnnounceIntermediateResultResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
// Request body structure.
type SendLocalTrustRequest_Body struct {
// Announce node's local trust information.
type AnnounceLocalTrustRequest_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The number of the epoch in which the trust was assessed.
// Trust assessment Epoch number
Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
// List of normalized local trust values of the client to the NeoFS peers.
// The value is calculated according to EigenTrust++ algorithm
// and must be in the range [0;1].
// List of normalized local trust values to other NeoFS nodes. The value
// is calculated according to EigenTrust++ algorithm and must be a
// floating point number in the [0;1] range.
Trusts []*Trust `protobuf:"bytes,2,rep,name=trusts,proto3" json:"trusts,omitempty"`
}
func (x *SendLocalTrustRequest_Body) Reset() {
*x = SendLocalTrustRequest_Body{}
func (x *AnnounceLocalTrustRequest_Body) Reset() {
*x = AnnounceLocalTrustRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -333,13 +333,13 @@ func (x *SendLocalTrustRequest_Body) Reset() {
}
}
func (x *SendLocalTrustRequest_Body) String() string {
func (x *AnnounceLocalTrustRequest_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendLocalTrustRequest_Body) ProtoMessage() {}
func (*AnnounceLocalTrustRequest_Body) ProtoMessage() {}
func (x *SendLocalTrustRequest_Body) ProtoReflect() protoreflect.Message {
func (x *AnnounceLocalTrustRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -351,34 +351,36 @@ func (x *SendLocalTrustRequest_Body) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SendLocalTrustRequest_Body.ProtoReflect.Descriptor instead.
func (*SendLocalTrustRequest_Body) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceLocalTrustRequest_Body.ProtoReflect.Descriptor instead.
func (*AnnounceLocalTrustRequest_Body) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{0, 0}
}
func (x *SendLocalTrustRequest_Body) GetEpoch() uint64 {
func (x *AnnounceLocalTrustRequest_Body) GetEpoch() uint64 {
if x != nil {
return x.Epoch
}
return 0
}
func (x *SendLocalTrustRequest_Body) GetTrusts() []*Trust {
func (x *AnnounceLocalTrustRequest_Body) GetTrusts() []*Trust {
if x != nil {
return x.Trusts
}
return nil
}
// Response body structure.
type SendLocalTrustResponse_Body struct {
// Response to the node's local trust information announce has an empty body
// because the trust exchange operation is asynchronous. If Trust information
// will not pass sanity checks it is silently ignored.
type AnnounceLocalTrustResponse_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *SendLocalTrustResponse_Body) Reset() {
*x = SendLocalTrustResponse_Body{}
func (x *AnnounceLocalTrustResponse_Body) Reset() {
*x = AnnounceLocalTrustResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -386,13 +388,13 @@ func (x *SendLocalTrustResponse_Body) Reset() {
}
}
func (x *SendLocalTrustResponse_Body) String() string {
func (x *AnnounceLocalTrustResponse_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendLocalTrustResponse_Body) ProtoMessage() {}
func (*AnnounceLocalTrustResponse_Body) ProtoMessage() {}
func (x *SendLocalTrustResponse_Body) ProtoReflect() protoreflect.Message {
func (x *AnnounceLocalTrustResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -404,27 +406,27 @@ func (x *SendLocalTrustResponse_Body) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SendLocalTrustResponse_Body.ProtoReflect.Descriptor instead.
func (*SendLocalTrustResponse_Body) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceLocalTrustResponse_Body.ProtoReflect.Descriptor instead.
func (*AnnounceLocalTrustResponse_Body) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{1, 0}
}
// Request body structure.
type SendIntermediateResultRequest_Body struct {
// Announce intermediate global trust information.
type AnnounceIntermediateResultRequest_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The number of the epoch in which the iteration was executed.
// Iteration execution Epoch number
Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
// Sequence number of the iteration.
// Iteration sequence number
Iteration uint32 `protobuf:"varint,2,opt,name=iteration,proto3" json:"iteration,omitempty"`
// Current global trust value computed at the specified iteration.
// Current global trust value calculated at the specified iteration
Trust *PeerToPeerTrust `protobuf:"bytes,3,opt,name=trust,proto3" json:"trust,omitempty"`
}
func (x *SendIntermediateResultRequest_Body) Reset() {
*x = SendIntermediateResultRequest_Body{}
func (x *AnnounceIntermediateResultRequest_Body) Reset() {
*x = AnnounceIntermediateResultRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -432,13 +434,13 @@ func (x *SendIntermediateResultRequest_Body) Reset() {
}
}
func (x *SendIntermediateResultRequest_Body) String() string {
func (x *AnnounceIntermediateResultRequest_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendIntermediateResultRequest_Body) ProtoMessage() {}
func (*AnnounceIntermediateResultRequest_Body) ProtoMessage() {}
func (x *SendIntermediateResultRequest_Body) ProtoReflect() protoreflect.Message {
func (x *AnnounceIntermediateResultRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -450,41 +452,43 @@ func (x *SendIntermediateResultRequest_Body) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
// Deprecated: Use SendIntermediateResultRequest_Body.ProtoReflect.Descriptor instead.
func (*SendIntermediateResultRequest_Body) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceIntermediateResultRequest_Body.ProtoReflect.Descriptor instead.
func (*AnnounceIntermediateResultRequest_Body) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{2, 0}
}
func (x *SendIntermediateResultRequest_Body) GetEpoch() uint64 {
func (x *AnnounceIntermediateResultRequest_Body) GetEpoch() uint64 {
if x != nil {
return x.Epoch
}
return 0
}
func (x *SendIntermediateResultRequest_Body) GetIteration() uint32 {
func (x *AnnounceIntermediateResultRequest_Body) GetIteration() uint32 {
if x != nil {
return x.Iteration
}
return 0
}
func (x *SendIntermediateResultRequest_Body) GetTrust() *PeerToPeerTrust {
func (x *AnnounceIntermediateResultRequest_Body) GetTrust() *PeerToPeerTrust {
if x != nil {
return x.Trust
}
return nil
}
// Response body structure.
type SendIntermediateResultResponse_Body struct {
// Response to the node's intermediate global trust information announce has
// an empty body because the trust exchange operation is asynchronous. If
// Trust information will not pass sanity checks it is silently ignored.
type AnnounceIntermediateResultResponse_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *SendIntermediateResultResponse_Body) Reset() {
*x = SendIntermediateResultResponse_Body{}
func (x *AnnounceIntermediateResultResponse_Body) Reset() {
*x = AnnounceIntermediateResultResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -492,13 +496,13 @@ func (x *SendIntermediateResultResponse_Body) Reset() {
}
}
func (x *SendIntermediateResultResponse_Body) String() string {
func (x *AnnounceIntermediateResultResponse_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendIntermediateResultResponse_Body) ProtoMessage() {}
func (*AnnounceIntermediateResultResponse_Body) ProtoMessage() {}
func (x *SendIntermediateResultResponse_Body) ProtoReflect() protoreflect.Message {
func (x *AnnounceIntermediateResultResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_v2_reputation_grpc_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -510,8 +514,8 @@ func (x *SendIntermediateResultResponse_Body) ProtoReflect() protoreflect.Messag
return mi.MessageOf(x)
}
// Deprecated: Use SendIntermediateResultResponse_Body.ProtoReflect.Descriptor instead.
func (*SendIntermediateResultResponse_Body) Descriptor() ([]byte, []int) {
// Deprecated: Use AnnounceIntermediateResultResponse_Body.ProtoReflect.Descriptor instead.
func (*AnnounceIntermediateResultResponse_Body) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_service_proto_rawDescGZIP(), []int{3, 0}
}
@ -525,32 +529,33 @@ var file_v2_reputation_grpc_service_proto_rawDesc = []byte{
0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70,
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x02, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x44, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72,
0x75, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52,
0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65,
0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x6f,
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0d,
0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56,
0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a,
0x51, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x33, 0x0a,
0x06, 0x74, 0x72, 0x75, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x06, 0x74, 0x72, 0x75, 0x73,
0x74, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a,
0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6e, 0x65,
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x02, 0x0a, 0x19, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e,
0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x34, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65,
0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63,
0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a,
0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73,
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65,
0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x68,
0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65,
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66,
0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x51, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x33, 0x0a, 0x06, 0x74, 0x72, 0x75, 0x73, 0x74, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x75,
0x73, 0x74, 0x52, 0x06, 0x74, 0x72, 0x75, 0x73, 0x74, 0x73, 0x22, 0x8b, 0x02, 0x0a, 0x1a, 0x41,
0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x04, 0x62, 0x6f, 0x64,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41,
0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04,
0x62, 0x6f, 0x64, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x6f, 0x2e,
@ -562,36 +567,37 @@ var file_v2_reputation_grpc_service_proto_rawDesc = []byte{
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x80, 0x03, 0x0a, 0x1d, 0x53, 0x65, 0x6e,
0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x04, 0x62, 0x6f,
0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66,
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f,
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61,
0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12,
0x51, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x1a, 0x77, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70,
0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68,
0x12, 0x1c, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b,
0x0a, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x54,
0x72, 0x75, 0x73, 0x74, 0x52, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x22, 0x93, 0x02, 0x0a, 0x1e,
0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d,
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6e,
0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x88, 0x03, 0x0a, 0x21, 0x41, 0x6e, 0x6e,
0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74,
0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50,
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64,
0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65,
0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74,
0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66,
0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c,
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65,
0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x77, 0x0a, 0x04, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x69, 0x74, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65,
0x72, 0x54, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x05, 0x74, 0x72,
0x75, 0x73, 0x74, 0x22, 0x9b, 0x02, 0x0a, 0x22, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65,
0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75,
0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x04, 0x62, 0x6f,
0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66,
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64,
0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x46, 0x0a,
0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
@ -604,30 +610,31 @@ var file_v2_reputation_grpc_service_proto_rawDesc = []byte{
0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72,
0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64,
0x79, 0x32, 0x86, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4c,
0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e,
0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65,
0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74,
0x79, 0x32, 0x9e, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x41, 0x6e, 0x6e, 0x6f, 0x75,
0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x12, 0x2f, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4c, 0x6f, 0x63,
0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30,
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x8f, 0x01, 0x0a, 0x1a, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74,
0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
0x33, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64,
0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75,
0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x62, 0x5a, 0x3f, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64,
0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f,
0x76, 0x32, 0x2f, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x3b, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x1e,
0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
0x41, 0x50, 0x49, 0x2e, 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x37, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49,
0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66,
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64,
0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x42, 0x62, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x6e, 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73,
0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x70, 0x75, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x72, 0x65, 0x70, 0x75, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x1e, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x52, 0x65, 0x70, 0x75,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -644,40 +651,40 @@ func file_v2_reputation_grpc_service_proto_rawDescGZIP() []byte {
var file_v2_reputation_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_v2_reputation_grpc_service_proto_goTypes = []interface{}{
(*SendLocalTrustRequest)(nil), // 0: neo.fs.v2.reputation.SendLocalTrustRequest
(*SendLocalTrustResponse)(nil), // 1: neo.fs.v2.reputation.SendLocalTrustResponse
(*SendIntermediateResultRequest)(nil), // 2: neo.fs.v2.reputation.SendIntermediateResultRequest
(*SendIntermediateResultResponse)(nil), // 3: neo.fs.v2.reputation.SendIntermediateResultResponse
(*SendLocalTrustRequest_Body)(nil), // 4: neo.fs.v2.reputation.SendLocalTrustRequest.Body
(*SendLocalTrustResponse_Body)(nil), // 5: neo.fs.v2.reputation.SendLocalTrustResponse.Body
(*SendIntermediateResultRequest_Body)(nil), // 6: neo.fs.v2.reputation.SendIntermediateResultRequest.Body
(*SendIntermediateResultResponse_Body)(nil), // 7: neo.fs.v2.reputation.SendIntermediateResultResponse.Body
(*grpc.RequestMetaHeader)(nil), // 8: neo.fs.v2.session.RequestMetaHeader
(*grpc.RequestVerificationHeader)(nil), // 9: neo.fs.v2.session.RequestVerificationHeader
(*grpc.ResponseMetaHeader)(nil), // 10: neo.fs.v2.session.ResponseMetaHeader
(*grpc.ResponseVerificationHeader)(nil), // 11: neo.fs.v2.session.ResponseVerificationHeader
(*Trust)(nil), // 12: neo.fs.v2.reputation.Trust
(*PeerToPeerTrust)(nil), // 13: neo.fs.v2.reputation.PeerToPeerTrust
(*AnnounceLocalTrustRequest)(nil), // 0: neo.fs.v2.reputation.AnnounceLocalTrustRequest
(*AnnounceLocalTrustResponse)(nil), // 1: neo.fs.v2.reputation.AnnounceLocalTrustResponse
(*AnnounceIntermediateResultRequest)(nil), // 2: neo.fs.v2.reputation.AnnounceIntermediateResultRequest
(*AnnounceIntermediateResultResponse)(nil), // 3: neo.fs.v2.reputation.AnnounceIntermediateResultResponse
(*AnnounceLocalTrustRequest_Body)(nil), // 4: neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body
(*AnnounceLocalTrustResponse_Body)(nil), // 5: neo.fs.v2.reputation.AnnounceLocalTrustResponse.Body
(*AnnounceIntermediateResultRequest_Body)(nil), // 6: neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body
(*AnnounceIntermediateResultResponse_Body)(nil), // 7: neo.fs.v2.reputation.AnnounceIntermediateResultResponse.Body
(*grpc.RequestMetaHeader)(nil), // 8: neo.fs.v2.session.RequestMetaHeader
(*grpc.RequestVerificationHeader)(nil), // 9: neo.fs.v2.session.RequestVerificationHeader
(*grpc.ResponseMetaHeader)(nil), // 10: neo.fs.v2.session.ResponseMetaHeader
(*grpc.ResponseVerificationHeader)(nil), // 11: neo.fs.v2.session.ResponseVerificationHeader
(*Trust)(nil), // 12: neo.fs.v2.reputation.Trust
(*PeerToPeerTrust)(nil), // 13: neo.fs.v2.reputation.PeerToPeerTrust
}
var file_v2_reputation_grpc_service_proto_depIdxs = []int32{
4, // 0: neo.fs.v2.reputation.SendLocalTrustRequest.body:type_name -> neo.fs.v2.reputation.SendLocalTrustRequest.Body
8, // 1: neo.fs.v2.reputation.SendLocalTrustRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader
9, // 2: neo.fs.v2.reputation.SendLocalTrustRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader
5, // 3: neo.fs.v2.reputation.SendLocalTrustResponse.body:type_name -> neo.fs.v2.reputation.SendLocalTrustResponse.Body
10, // 4: neo.fs.v2.reputation.SendLocalTrustResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader
11, // 5: neo.fs.v2.reputation.SendLocalTrustResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader
6, // 6: neo.fs.v2.reputation.SendIntermediateResultRequest.body:type_name -> neo.fs.v2.reputation.SendIntermediateResultRequest.Body
8, // 7: neo.fs.v2.reputation.SendIntermediateResultRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader
9, // 8: neo.fs.v2.reputation.SendIntermediateResultRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader
7, // 9: neo.fs.v2.reputation.SendIntermediateResultResponse.body:type_name -> neo.fs.v2.reputation.SendIntermediateResultResponse.Body
10, // 10: neo.fs.v2.reputation.SendIntermediateResultResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader
11, // 11: neo.fs.v2.reputation.SendIntermediateResultResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader
12, // 12: neo.fs.v2.reputation.SendLocalTrustRequest.Body.trusts:type_name -> neo.fs.v2.reputation.Trust
13, // 13: neo.fs.v2.reputation.SendIntermediateResultRequest.Body.trust:type_name -> neo.fs.v2.reputation.PeerToPeerTrust
0, // 14: neo.fs.v2.reputation.ReputationService.SendLocalTrust:input_type -> neo.fs.v2.reputation.SendLocalTrustRequest
2, // 15: neo.fs.v2.reputation.ReputationService.SendIntermediateResult:input_type -> neo.fs.v2.reputation.SendIntermediateResultRequest
1, // 16: neo.fs.v2.reputation.ReputationService.SendLocalTrust:output_type -> neo.fs.v2.reputation.SendLocalTrustResponse
3, // 17: neo.fs.v2.reputation.ReputationService.SendIntermediateResult:output_type -> neo.fs.v2.reputation.SendIntermediateResultResponse
4, // 0: neo.fs.v2.reputation.AnnounceLocalTrustRequest.body:type_name -> neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body
8, // 1: neo.fs.v2.reputation.AnnounceLocalTrustRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader
9, // 2: neo.fs.v2.reputation.AnnounceLocalTrustRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader
5, // 3: neo.fs.v2.reputation.AnnounceLocalTrustResponse.body:type_name -> neo.fs.v2.reputation.AnnounceLocalTrustResponse.Body
10, // 4: neo.fs.v2.reputation.AnnounceLocalTrustResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader
11, // 5: neo.fs.v2.reputation.AnnounceLocalTrustResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader
6, // 6: neo.fs.v2.reputation.AnnounceIntermediateResultRequest.body:type_name -> neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body
8, // 7: neo.fs.v2.reputation.AnnounceIntermediateResultRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader
9, // 8: neo.fs.v2.reputation.AnnounceIntermediateResultRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader
7, // 9: neo.fs.v2.reputation.AnnounceIntermediateResultResponse.body:type_name -> neo.fs.v2.reputation.AnnounceIntermediateResultResponse.Body
10, // 10: neo.fs.v2.reputation.AnnounceIntermediateResultResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader
11, // 11: neo.fs.v2.reputation.AnnounceIntermediateResultResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader
12, // 12: neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body.trusts:type_name -> neo.fs.v2.reputation.Trust
13, // 13: neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body.trust:type_name -> neo.fs.v2.reputation.PeerToPeerTrust
0, // 14: neo.fs.v2.reputation.ReputationService.AnnounceLocalTrust:input_type -> neo.fs.v2.reputation.AnnounceLocalTrustRequest
2, // 15: neo.fs.v2.reputation.ReputationService.AnnounceIntermediateResult:input_type -> neo.fs.v2.reputation.AnnounceIntermediateResultRequest
1, // 16: neo.fs.v2.reputation.ReputationService.AnnounceLocalTrust:output_type -> neo.fs.v2.reputation.AnnounceLocalTrustResponse
3, // 17: neo.fs.v2.reputation.ReputationService.AnnounceIntermediateResult:output_type -> neo.fs.v2.reputation.AnnounceIntermediateResultResponse
16, // [16:18] is the sub-list for method output_type
14, // [14:16] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
@ -693,7 +700,7 @@ func file_v2_reputation_grpc_service_proto_init() {
file_v2_reputation_grpc_types_proto_init()
if !protoimpl.UnsafeEnabled {
file_v2_reputation_grpc_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendLocalTrustRequest); i {
switch v := v.(*AnnounceLocalTrustRequest); i {
case 0:
return &v.state
case 1:
@ -705,7 +712,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendLocalTrustResponse); i {
switch v := v.(*AnnounceLocalTrustResponse); i {
case 0:
return &v.state
case 1:
@ -717,7 +724,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendIntermediateResultRequest); i {
switch v := v.(*AnnounceIntermediateResultRequest); i {
case 0:
return &v.state
case 1:
@ -729,7 +736,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendIntermediateResultResponse); i {
switch v := v.(*AnnounceIntermediateResultResponse); i {
case 0:
return &v.state
case 1:
@ -741,7 +748,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendLocalTrustRequest_Body); i {
switch v := v.(*AnnounceLocalTrustRequest_Body); i {
case 0:
return &v.state
case 1:
@ -753,7 +760,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendLocalTrustResponse_Body); i {
switch v := v.(*AnnounceLocalTrustResponse_Body); i {
case 0:
return &v.state
case 1:
@ -765,7 +772,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendIntermediateResultRequest_Body); i {
switch v := v.(*AnnounceIntermediateResultRequest_Body); i {
case 0:
return &v.state
case 1:
@ -777,7 +784,7 @@ func file_v2_reputation_grpc_service_proto_init() {
}
}
file_v2_reputation_grpc_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendIntermediateResultResponse_Body); i {
switch v := v.(*AnnounceIntermediateResultResponse_Body); i {
case 0:
return &v.state
case 1:
@ -821,11 +828,11 @@ const _ = grpc1.SupportPackageIsVersion6
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ReputationServiceClient interface {
// Sends local client trust to any peer from NeoFS network.
SendLocalTrust(ctx context.Context, in *SendLocalTrustRequest, opts ...grpc1.CallOption) (*SendLocalTrustResponse, error)
// Sends the intermediate result of the iterative algorithm
// for calculating the global reputation of the node.
SendIntermediateResult(ctx context.Context, in *SendIntermediateResultRequest, opts ...grpc1.CallOption) (*SendIntermediateResultResponse, error)
// Announce local client trust information to any node in NeoFS network.
AnnounceLocalTrust(ctx context.Context, in *AnnounceLocalTrustRequest, opts ...grpc1.CallOption) (*AnnounceLocalTrustResponse, error)
// Announces the intermediate result of the iterative algorithm for
// calculating the global reputation of the node in NeoFS network.
AnnounceIntermediateResult(ctx context.Context, in *AnnounceIntermediateResultRequest, opts ...grpc1.CallOption) (*AnnounceIntermediateResultResponse, error)
}
type reputationServiceClient struct {
@ -836,18 +843,18 @@ func NewReputationServiceClient(cc grpc1.ClientConnInterface) ReputationServiceC
return &reputationServiceClient{cc}
}
func (c *reputationServiceClient) SendLocalTrust(ctx context.Context, in *SendLocalTrustRequest, opts ...grpc1.CallOption) (*SendLocalTrustResponse, error) {
out := new(SendLocalTrustResponse)
err := c.cc.Invoke(ctx, "/neo.fs.v2.reputation.ReputationService/SendLocalTrust", in, out, opts...)
func (c *reputationServiceClient) AnnounceLocalTrust(ctx context.Context, in *AnnounceLocalTrustRequest, opts ...grpc1.CallOption) (*AnnounceLocalTrustResponse, error) {
out := new(AnnounceLocalTrustResponse)
err := c.cc.Invoke(ctx, "/neo.fs.v2.reputation.ReputationService/AnnounceLocalTrust", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *reputationServiceClient) SendIntermediateResult(ctx context.Context, in *SendIntermediateResultRequest, opts ...grpc1.CallOption) (*SendIntermediateResultResponse, error) {
out := new(SendIntermediateResultResponse)
err := c.cc.Invoke(ctx, "/neo.fs.v2.reputation.ReputationService/SendIntermediateResult", in, out, opts...)
func (c *reputationServiceClient) AnnounceIntermediateResult(ctx context.Context, in *AnnounceIntermediateResultRequest, opts ...grpc1.CallOption) (*AnnounceIntermediateResultResponse, error) {
out := new(AnnounceIntermediateResultResponse)
err := c.cc.Invoke(ctx, "/neo.fs.v2.reputation.ReputationService/AnnounceIntermediateResult", in, out, opts...)
if err != nil {
return nil, err
}
@ -856,60 +863,60 @@ func (c *reputationServiceClient) SendIntermediateResult(ctx context.Context, in
// ReputationServiceServer is the server API for ReputationService service.
type ReputationServiceServer interface {
// Sends local client trust to any peer from NeoFS network.
SendLocalTrust(context.Context, *SendLocalTrustRequest) (*SendLocalTrustResponse, error)
// Sends the intermediate result of the iterative algorithm
// for calculating the global reputation of the node.
SendIntermediateResult(context.Context, *SendIntermediateResultRequest) (*SendIntermediateResultResponse, error)
// Announce local client trust information to any node in NeoFS network.
AnnounceLocalTrust(context.Context, *AnnounceLocalTrustRequest) (*AnnounceLocalTrustResponse, error)
// Announces the intermediate result of the iterative algorithm for
// calculating the global reputation of the node in NeoFS network.
AnnounceIntermediateResult(context.Context, *AnnounceIntermediateResultRequest) (*AnnounceIntermediateResultResponse, error)
}
// UnimplementedReputationServiceServer can be embedded to have forward compatible implementations.
type UnimplementedReputationServiceServer struct {
}
func (*UnimplementedReputationServiceServer) SendLocalTrust(context.Context, *SendLocalTrustRequest) (*SendLocalTrustResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendLocalTrust not implemented")
func (*UnimplementedReputationServiceServer) AnnounceLocalTrust(context.Context, *AnnounceLocalTrustRequest) (*AnnounceLocalTrustResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AnnounceLocalTrust not implemented")
}
func (*UnimplementedReputationServiceServer) SendIntermediateResult(context.Context, *SendIntermediateResultRequest) (*SendIntermediateResultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendIntermediateResult not implemented")
func (*UnimplementedReputationServiceServer) AnnounceIntermediateResult(context.Context, *AnnounceIntermediateResultRequest) (*AnnounceIntermediateResultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AnnounceIntermediateResult not implemented")
}
func RegisterReputationServiceServer(s *grpc1.Server, srv ReputationServiceServer) {
s.RegisterService(&_ReputationService_serviceDesc, srv)
}
func _ReputationService_SendLocalTrust_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
in := new(SendLocalTrustRequest)
func _ReputationService_AnnounceLocalTrust_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
in := new(AnnounceLocalTrustRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReputationServiceServer).SendLocalTrust(ctx, in)
return srv.(ReputationServiceServer).AnnounceLocalTrust(ctx, in)
}
info := &grpc1.UnaryServerInfo{
Server: srv,
FullMethod: "/neo.fs.v2.reputation.ReputationService/SendLocalTrust",
FullMethod: "/neo.fs.v2.reputation.ReputationService/AnnounceLocalTrust",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReputationServiceServer).SendLocalTrust(ctx, req.(*SendLocalTrustRequest))
return srv.(ReputationServiceServer).AnnounceLocalTrust(ctx, req.(*AnnounceLocalTrustRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReputationService_SendIntermediateResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
in := new(SendIntermediateResultRequest)
func _ReputationService_AnnounceIntermediateResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
in := new(AnnounceIntermediateResultRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReputationServiceServer).SendIntermediateResult(ctx, in)
return srv.(ReputationServiceServer).AnnounceIntermediateResult(ctx, in)
}
info := &grpc1.UnaryServerInfo{
Server: srv,
FullMethod: "/neo.fs.v2.reputation.ReputationService/SendIntermediateResult",
FullMethod: "/neo.fs.v2.reputation.ReputationService/AnnounceIntermediateResult",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReputationServiceServer).SendIntermediateResult(ctx, req.(*SendIntermediateResultRequest))
return srv.(ReputationServiceServer).AnnounceIntermediateResult(ctx, req.(*AnnounceIntermediateResultRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -919,12 +926,12 @@ var _ReputationService_serviceDesc = grpc1.ServiceDesc{
HandlerType: (*ReputationServiceServer)(nil),
Methods: []grpc1.MethodDesc{
{
MethodName: "SendLocalTrust",
Handler: _ReputationService_SendLocalTrust_Handler,
MethodName: "AnnounceLocalTrust",
Handler: _ReputationService_AnnounceLocalTrust_Handler,
},
{
MethodName: "SendIntermediateResult",
Handler: _ReputationService_SendIntermediateResult_Handler,
MethodName: "AnnounceIntermediateResult",
Handler: _ReputationService_AnnounceIntermediateResult_Handler,
},
},
Streams: []grpc1.StreamDesc{},

View file

@ -4,10 +4,10 @@ import (
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
)
// SetValue sets binary ID.
func (x *PeerID) SetValue(v []byte) {
// SetPublicKey sets binary public key of ID.
func (x *PeerID) SetPublicKey(v []byte) {
if x != nil {
x.Value = v
x.PublicKey = v
}
}

View file

@ -26,10 +26,8 @@ const (
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// NeoFS unique peer identifier.
//
// `PeerID` is a 33 byte long compressed public key of the node
// stored in network map.
// NeoFS unique peer identifier is 33 byte long compressed public key of the
// node, the same as the one stored in the network map.
//
// String presentation is
// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.
@ -44,8 +42,8 @@ type PeerID struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Peer identifier in a binary format.
Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// Peer node's public key
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
}
func (x *PeerID) Reset() {
@ -80,22 +78,22 @@ func (*PeerID) Descriptor() ([]byte, []int) {
return file_v2_reputation_grpc_types_proto_rawDescGZIP(), []int{0}
}
func (x *PeerID) GetValue() []byte {
func (x *PeerID) GetPublicKey() []byte {
if x != nil {
return x.Value
return x.PublicKey
}
return nil
}
// Trust value to NeoFS network peer.
// Trust level to a NeoFS network peer.
type Trust struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Identifier of the trusted peer.
// Identifier of the trusted peer
Peer *PeerID `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
// Trust value.
// Trust level in [0:1] range
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
}
@ -145,15 +143,15 @@ func (x *Trust) GetValue() float64 {
return 0
}
// Trust value of a peer to a peer.
// Trust level of a peer to a peer.
type PeerToPeerTrust struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Identifier of the trusting peer.
// Identifier of the trusting peer
TrustingPeer *PeerID `protobuf:"bytes,1,opt,name=trusting_peer,json=trustingPeer,proto3" json:"trusting_peer,omitempty"`
// Trust value.
// Trust level
Trust *Trust `protobuf:"bytes,2,opt,name=trust,proto3" json:"trust,omitempty"`
}
@ -203,7 +201,7 @@ func (x *PeerToPeerTrust) GetTrust() *Trust {
return nil
}
// Global trust value to NeoFS network peer.
// Global trust level to NeoFS node.
type GlobalTrust struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -212,7 +210,7 @@ type GlobalTrust struct {
// Message format version. Effectively the version of API library used to create
// the message.
Version *grpc.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// Message body.
// Message body
Body *GlobalTrust_Body `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
// Signature of the binary `body` field by the manager.
Signature *grpc.Signature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
@ -277,9 +275,9 @@ type GlobalTrust_Body struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Node manager ID.
// Node manager ID
Manager *PeerID `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"`
// Global trust value.
// Global trust level
Trust *Trust `protobuf:"bytes,2,opt,name=trust,proto3" json:"trust,omitempty"`
}
@ -337,48 +335,48 @@ var file_v2_reputation_grpc_types_proto_rawDesc = []byte{
0x12, 0x14, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x18, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x66, 0x73, 0x2f,
0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x1e, 0x0a, 0x06, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x4f, 0x0a, 0x05, 0x54, 0x72, 0x75, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x65, 0x65,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50,
0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0x87, 0x01, 0x0a, 0x0f, 0x50, 0x65, 0x65, 0x72, 0x54, 0x6f, 0x50, 0x65, 0x65, 0x72,
0x54, 0x72, 0x75, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x74, 0x72, 0x75, 0x73, 0x74, 0x69, 0x6e,
0x67, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73,
0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x72, 0x75, 0x73,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54,
0x72, 0x75, 0x73, 0x74, 0x52, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x22, 0xa8, 0x02, 0x0a, 0x0b,
0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a,
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x2e,
0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
0x75, 0x72, 0x65, 0x1a, 0x71, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6d,
0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e,
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72,
0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52,
0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x62, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e,
0x65, 0x6f, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x72,
0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x72,
0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x1e, 0x4e, 0x65, 0x6f, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e,
0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x22, 0x27, 0x0a, 0x06, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x54, 0x72, 0x75,
0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70,
0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x04,
0x70, 0x65, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x0f, 0x50,
0x65, 0x65, 0x72, 0x54, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x12, 0x41,
0x0a, 0x0d, 0x74, 0x72, 0x75, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65,
0x72, 0x49, 0x44, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x65,
0x72, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70,
0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x05, 0x74,
0x72, 0x75, 0x73, 0x74, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x54,
0x72, 0x75, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6c, 0x6f,
0x62, 0x61, 0x6c, 0x54, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62,
0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x71, 0x0a, 0x04,
0x42, 0x6f, 0x64, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x65,
0x72, 0x49, 0x44, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x05,
0x74, 0x72, 0x75, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65,
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x52, 0x05, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42,
0x62, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73,
0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x61, 0x70,
0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0xaa, 0x02, 0x1e, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View file

@ -8,7 +8,7 @@ import (
const (
_ = iota
peerIDValFNum
peerIDPubKeyFNum
)
func (x *PeerID) StableMarshal(buf []byte) ([]byte, error) {
@ -20,7 +20,7 @@ func (x *PeerID) StableMarshal(buf []byte) ([]byte, error) {
buf = make([]byte, x.StableSize())
}
_, err := protoutil.BytesMarshal(peerIDValFNum, buf, x.val)
_, err := protoutil.BytesMarshal(peerIDPubKeyFNum, buf, x.publicKey)
if err != nil {
return nil, err
}
@ -29,7 +29,7 @@ func (x *PeerID) StableMarshal(buf []byte) ([]byte, error) {
}
func (x *PeerID) StableSize() (size int) {
size += protoutil.BytesSize(peerIDValFNum, x.val)
size += protoutil.BytesSize(peerIDPubKeyFNum, x.publicKey)
return
}
@ -212,11 +212,11 @@ func (x *GlobalTrust) Unmarshal(data []byte) error {
const (
_ = iota
sendLocalTrustBodyEpochFNum
sendLocalTrustBodyTrustsFNum
announceLocalTrustBodyEpochFNum
announceLocalTrustBodyTrustsFNum
)
func (x *SendLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error) {
func (x *AnnounceLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error) {
if x == nil {
return []byte{}, nil
}
@ -230,7 +230,7 @@ func (x *SendLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error) {
err error
)
n, err = protoutil.UInt64Marshal(sendLocalTrustBodyEpochFNum, buf[offset:], x.epoch)
n, err = protoutil.UInt64Marshal(announceLocalTrustBodyEpochFNum, buf[offset:], x.epoch)
if err != nil {
return nil, err
}
@ -238,7 +238,7 @@ func (x *SendLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error) {
offset += n
for i := range x.trusts {
n, err = protoutil.NestedStructureMarshal(sendLocalTrustBodyTrustsFNum, buf[offset:], x.trusts[i])
n, err = protoutil.NestedStructureMarshal(announceLocalTrustBodyTrustsFNum, buf[offset:], x.trusts[i])
if err != nil {
return nil, err
}
@ -249,40 +249,40 @@ func (x *SendLocalTrustRequestBody) StableMarshal(buf []byte) ([]byte, error) {
return buf, nil
}
func (x *SendLocalTrustRequestBody) StableSize() (size int) {
size += protoutil.UInt64Size(sendLocalTrustBodyEpochFNum, x.epoch)
func (x *AnnounceLocalTrustRequestBody) StableSize() (size int) {
size += protoutil.UInt64Size(announceLocalTrustBodyEpochFNum, x.epoch)
for i := range x.trusts {
size += protoutil.NestedStructureSize(sendLocalTrustBodyTrustsFNum, x.trusts[i])
size += protoutil.NestedStructureSize(announceLocalTrustBodyTrustsFNum, x.trusts[i])
}
return
}
func (x *SendLocalTrustRequestBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.SendLocalTrustRequest_Body))
func (x *AnnounceLocalTrustRequestBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.AnnounceLocalTrustRequest_Body))
}
func (x *SendLocalTrustResponseBody) StableMarshal(buf []byte) ([]byte, error) {
func (x *AnnounceLocalTrustResponseBody) StableMarshal(buf []byte) ([]byte, error) {
return buf, nil
}
func (x *SendLocalTrustResponseBody) StableSize() int {
func (x *AnnounceLocalTrustResponseBody) StableSize() int {
return 0
}
func (x *SendLocalTrustResponseBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.SendLocalTrustResponse_Body))
func (x *AnnounceLocalTrustResponseBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.AnnounceLocalTrustResponse_Body))
}
const (
_ = iota
sendInterResBodyEpochFNum
sendInterResBodyIterFNum
sendInterResBodyTrustFNum
announceInterResBodyEpochFNum
announceInterResBodyIterFNum
announceInterResBodyTrustFNum
)
func (x *SendIntermediateResultRequestBody) StableMarshal(buf []byte) ([]byte, error) {
func (x *AnnounceIntermediateResultRequestBody) StableMarshal(buf []byte) ([]byte, error) {
if x == nil {
return []byte{}, nil
}
@ -296,21 +296,21 @@ func (x *SendIntermediateResultRequestBody) StableMarshal(buf []byte) ([]byte, e
err error
)
n, err = protoutil.UInt64Marshal(sendInterResBodyEpochFNum, buf, x.epoch)
n, err = protoutil.UInt64Marshal(announceInterResBodyEpochFNum, buf, x.epoch)
if err != nil {
return nil, err
}
offset += n
n, err = protoutil.UInt32Marshal(sendInterResBodyIterFNum, buf[offset:], x.iter)
n, err = protoutil.UInt32Marshal(announceInterResBodyIterFNum, buf[offset:], x.iter)
if err != nil {
return nil, err
}
offset += n
_, err = protoutil.NestedStructureMarshal(sendInterResBodyTrustFNum, buf[offset:], x.trust)
_, err = protoutil.NestedStructureMarshal(announceInterResBodyTrustFNum, buf[offset:], x.trust)
if err != nil {
return nil, err
}
@ -318,26 +318,26 @@ func (x *SendIntermediateResultRequestBody) StableMarshal(buf []byte) ([]byte, e
return buf, nil
}
func (x *SendIntermediateResultRequestBody) StableSize() (size int) {
size += protoutil.UInt64Size(sendInterResBodyEpochFNum, x.epoch)
size += protoutil.UInt32Size(sendInterResBodyIterFNum, x.iter)
size += protoutil.NestedStructureSize(sendInterResBodyTrustFNum, x.trust)
func (x *AnnounceIntermediateResultRequestBody) StableSize() (size int) {
size += protoutil.UInt64Size(announceInterResBodyEpochFNum, x.epoch)
size += protoutil.UInt32Size(announceInterResBodyIterFNum, x.iter)
size += protoutil.NestedStructureSize(announceInterResBodyTrustFNum, x.trust)
return
}
func (x *SendIntermediateResultRequestBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.SendIntermediateResultRequest_Body))
func (x *AnnounceIntermediateResultRequestBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.AnnounceIntermediateResultRequest_Body))
}
func (x *SendIntermediateResultResponseBody) StableMarshal(buf []byte) ([]byte, error) {
func (x *AnnounceIntermediateResultResponseBody) StableMarshal(buf []byte) ([]byte, error) {
return buf, nil
}
func (x *SendIntermediateResultResponseBody) StableSize() int {
func (x *AnnounceIntermediateResultResponseBody) StableSize() int {
return 0
}
func (x *SendIntermediateResultResponseBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.SendIntermediateResultResponse_Body))
func (x *AnnounceIntermediateResultResponseBody) Unmarshal(data []byte) error {
return message.Unmarshal(x, data, new(reputation.AnnounceIntermediateResultResponse_Body))
}

View file

@ -11,18 +11,22 @@ import (
func TestMessageConvert(t *testing.T) {
messagetest.TestRPCMessage(t,
func(empty bool) message.Message { return reputationtest.GenerateTrust(empty) },
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustRequestBody(empty) },
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustRequest(empty) },
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustResponseBody(empty) },
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustResponse(empty) },
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustRequestBody(empty) },
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustRequest(empty) },
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustResponseBody(empty) },
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustResponse(empty) },
func(empty bool) message.Message {
return reputationtest.GenerateSendIntermediateResultRequestBody(empty)
return reputationtest.GenerateAnnounceIntermediateResultRequestBody(empty)
},
func(empty bool) message.Message { return reputationtest.GenerateSendIntermediateResultRequest(empty) },
func(empty bool) message.Message {
return reputationtest.GenerateSendIntermediateResultResponseBody(empty)
return reputationtest.GenerateAnnounceIntermediateResultRequest(empty)
},
func(empty bool) message.Message {
return reputationtest.GenerateAnnounceIntermediateResultResponseBody(empty)
},
func(empty bool) message.Message {
return reputationtest.GenerateAnnounceIntermediateResultResponse(empty)
},
func(empty bool) message.Message { return reputationtest.GenerateSendIntermediateResultResponse(empty) },
func(empty bool) message.Message { return reputationtest.GenerateGlobalTrustBody(empty) },
func(empty bool) message.Message { return reputationtest.GenerateGlobalTrust(empty) },
func(empty bool) message.Message { return reputationtest.GeneratePeerToPeerTrust(empty) },

View file

@ -10,7 +10,7 @@ func GeneratePeerID(empty bool) *reputation.PeerID {
m := new(reputation.PeerID)
if !empty {
m.SetValue([]byte{1, 2, 3})
m.SetPublicKey([]byte{1, 2, 3})
}
return m
@ -67,8 +67,8 @@ func GenerateTrusts(empty bool) (res []*reputation.Trust) {
return
}
func GenerateSendLocalTrustRequestBody(empty bool) *reputation.SendLocalTrustRequestBody {
m := new(reputation.SendLocalTrustRequestBody)
func GenerateAnnounceLocalTrustRequestBody(empty bool) *reputation.AnnounceLocalTrustRequestBody {
m := new(reputation.AnnounceLocalTrustRequestBody)
if !empty {
m.SetEpoch(13)
@ -79,34 +79,34 @@ func GenerateSendLocalTrustRequestBody(empty bool) *reputation.SendLocalTrustReq
return m
}
func GenerateSendLocalTrustRequest(empty bool) *reputation.SendLocalTrustRequest {
m := new(reputation.SendLocalTrustRequest)
func GenerateAnnounceLocalTrustRequest(empty bool) *reputation.AnnounceLocalTrustRequest {
m := new(reputation.AnnounceLocalTrustRequest)
m.SetBody(GenerateSendLocalTrustRequestBody(empty))
m.SetBody(GenerateAnnounceLocalTrustRequestBody(empty))
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
return m
}
func GenerateSendLocalTrustResponseBody(empty bool) *reputation.SendLocalTrustResponseBody {
m := new(reputation.SendLocalTrustResponseBody)
func GenerateAnnounceLocalTrustResponseBody(empty bool) *reputation.AnnounceLocalTrustResponseBody {
m := new(reputation.AnnounceLocalTrustResponseBody)
return m
}
func GenerateSendLocalTrustResponse(empty bool) *reputation.SendLocalTrustResponse {
m := new(reputation.SendLocalTrustResponse)
func GenerateAnnounceLocalTrustResponse(empty bool) *reputation.AnnounceLocalTrustResponse {
m := new(reputation.AnnounceLocalTrustResponse)
m.SetBody(GenerateSendLocalTrustResponseBody(empty))
m.SetBody(GenerateAnnounceLocalTrustResponseBody(empty))
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))
return m
}
func GenerateSendIntermediateResultRequestBody(empty bool) *reputation.SendIntermediateResultRequestBody {
m := new(reputation.SendIntermediateResultRequestBody)
func GenerateAnnounceIntermediateResultRequestBody(empty bool) *reputation.AnnounceIntermediateResultRequestBody {
m := new(reputation.AnnounceIntermediateResultRequestBody)
if !empty {
m.SetEpoch(123)
@ -117,26 +117,26 @@ func GenerateSendIntermediateResultRequestBody(empty bool) *reputation.SendInter
return m
}
func GenerateSendIntermediateResultRequest(empty bool) *reputation.SendIntermediateResultRequest {
m := new(reputation.SendIntermediateResultRequest)
func GenerateAnnounceIntermediateResultRequest(empty bool) *reputation.AnnounceIntermediateResultRequest {
m := new(reputation.AnnounceIntermediateResultRequest)
m.SetBody(GenerateSendIntermediateResultRequestBody(empty))
m.SetBody(GenerateAnnounceIntermediateResultRequestBody(empty))
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
return m
}
func GenerateSendIntermediateResultResponseBody(empty bool) *reputation.SendIntermediateResultResponseBody {
m := new(reputation.SendIntermediateResultResponseBody)
func GenerateAnnounceIntermediateResultResponseBody(empty bool) *reputation.AnnounceIntermediateResultResponseBody {
m := new(reputation.AnnounceIntermediateResultResponseBody)
return m
}
func GenerateSendIntermediateResultResponse(empty bool) *reputation.SendIntermediateResultResponse {
m := new(reputation.SendIntermediateResultResponse)
func GenerateAnnounceIntermediateResultResponse(empty bool) *reputation.AnnounceIntermediateResultResponse {
m := new(reputation.AnnounceIntermediateResultResponse)
m.SetBody(GenerateSendIntermediateResultResponseBody(empty))
m.SetBody(GenerateAnnounceIntermediateResultResponseBody(empty))
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))

View file

@ -8,22 +8,22 @@ import (
// PeerID represents reputation.PeerID message
// from NeoFS API v2.
type PeerID struct {
val []byte
publicKey []byte
}
// GetValue returns peer's binary ID.
func (x *PeerID) GetValue() []byte {
// GetPublicKey returns peer's binary public key of ID.
func (x *PeerID) GetPublicKey() []byte {
if x != nil {
return x.val
return x.publicKey
}
return nil
}
// SetValue sets peer's binary ID.
func (x *PeerID) SetValue(v []byte) {
// SetPublicKey sets peer's binary public key of ID.
func (x *PeerID) SetPublicKey(v []byte) {
if x != nil {
x.val = v
x.publicKey = v
}
}
@ -205,15 +205,15 @@ func (x *GlobalTrust) SetSignature(v *refs.Signature) {
}
}
// SendLocalTrustRequestBody is a structure of SendLocalTrust request body.
type SendLocalTrustRequestBody struct {
// AnnounceLocalTrustRequestBody is a structure of AnnounceLocalTrust request body.
type AnnounceLocalTrustRequestBody struct {
epoch uint64
trusts []*Trust
}
// GetEpoch returns epoch in which the trust was assessed.
func (x *SendLocalTrustRequestBody) GetEpoch() uint64 {
func (x *AnnounceLocalTrustRequestBody) GetEpoch() uint64 {
if x != nil {
return x.epoch
}
@ -222,14 +222,14 @@ func (x *SendLocalTrustRequestBody) GetEpoch() uint64 {
}
// SetEpoch sets epoch in which the trust was assessed.
func (x *SendLocalTrustRequestBody) SetEpoch(v uint64) {
func (x *AnnounceLocalTrustRequestBody) SetEpoch(v uint64) {
if x != nil {
x.epoch = v
}
}
// GetTrusts returns list of normalized trust values.
func (x *SendLocalTrustRequestBody) GetTrusts() []*Trust {
func (x *AnnounceLocalTrustRequestBody) GetTrusts() []*Trust {
if x != nil {
return x.trusts
}
@ -238,25 +238,25 @@ func (x *SendLocalTrustRequestBody) GetTrusts() []*Trust {
}
// SetTrusts sets list of normalized trust values.
func (x *SendLocalTrustRequestBody) SetTrusts(v []*Trust) {
func (x *AnnounceLocalTrustRequestBody) SetTrusts(v []*Trust) {
if x != nil {
x.trusts = v
}
}
// SendLocalTrustResponseBody is a structure of SendLocalTrust response body.
type SendLocalTrustResponseBody struct{}
// AnnounceLocalTrustResponseBody is a structure of AnnounceLocalTrust response body.
type AnnounceLocalTrustResponseBody struct{}
// SendLocalTrustRequest represents reputation.SendLocalTrustRequest
// AnnounceLocalTrustRequest represents reputation.AnnounceLocalTrustRequest
// message from NeoFS API v2.
type SendLocalTrustRequest struct {
body *SendLocalTrustRequestBody
type AnnounceLocalTrustRequest struct {
body *AnnounceLocalTrustRequestBody
session.RequestHeaders
}
// GetBody returns request body.
func (x *SendLocalTrustRequest) GetBody() *SendLocalTrustRequestBody {
func (x *AnnounceLocalTrustRequest) GetBody() *AnnounceLocalTrustRequestBody {
if x != nil {
return x.body
}
@ -265,22 +265,22 @@ func (x *SendLocalTrustRequest) GetBody() *SendLocalTrustRequestBody {
}
// SetBody sets request body.
func (x *SendLocalTrustRequest) SetBody(v *SendLocalTrustRequestBody) {
func (x *AnnounceLocalTrustRequest) SetBody(v *AnnounceLocalTrustRequestBody) {
if x != nil {
x.body = v
}
}
// SendLocalTrustResponse represents reputation.SendLocalTrustResponse
// AnnounceLocalTrustResponse represents reputation.AnnounceLocalTrustResponse
// message from NeoFS API v2.
type SendLocalTrustResponse struct {
body *SendLocalTrustResponseBody
type AnnounceLocalTrustResponse struct {
body *AnnounceLocalTrustResponseBody
session.ResponseHeaders
}
// GetBody returns response body.
func (x *SendLocalTrustResponse) GetBody() *SendLocalTrustResponseBody {
func (x *AnnounceLocalTrustResponse) GetBody() *AnnounceLocalTrustResponseBody {
if x != nil {
return x.body
}
@ -289,14 +289,14 @@ func (x *SendLocalTrustResponse) GetBody() *SendLocalTrustResponseBody {
}
// SetBody sets response body.
func (x *SendLocalTrustResponse) SetBody(v *SendLocalTrustResponseBody) {
func (x *AnnounceLocalTrustResponse) SetBody(v *AnnounceLocalTrustResponseBody) {
if x != nil {
x.body = v
}
}
// SendIntermediateResultRequestBody is a structure of SendIntermediateResult request body.
type SendIntermediateResultRequestBody struct {
// AnnounceIntermediateResultRequestBody is a structure of AnnounceIntermediateResult request body.
type AnnounceIntermediateResultRequestBody struct {
epoch uint64
iter uint32
@ -305,7 +305,7 @@ type SendIntermediateResultRequestBody struct {
}
// GetEpoch returns epoch number in which the intermediate trust was assessed.
func (x *SendIntermediateResultRequestBody) GetEpoch() uint64 {
func (x *AnnounceIntermediateResultRequestBody) GetEpoch() uint64 {
if x != nil {
return x.epoch
}
@ -314,14 +314,14 @@ func (x *SendIntermediateResultRequestBody) GetEpoch() uint64 {
}
// SetEpoch sets epoch number in which the intermediate trust was assessed.
func (x *SendIntermediateResultRequestBody) SetEpoch(v uint64) {
func (x *AnnounceIntermediateResultRequestBody) SetEpoch(v uint64) {
if x != nil {
x.epoch = v
}
}
// GetIteration returns sequence number of the iteration.
func (x *SendIntermediateResultRequestBody) GetIteration() uint32 {
func (x *AnnounceIntermediateResultRequestBody) GetIteration() uint32 {
if x != nil {
return x.iter
}
@ -330,14 +330,14 @@ func (x *SendIntermediateResultRequestBody) GetIteration() uint32 {
}
// SetIteration sets sequence number of the iteration.
func (x *SendIntermediateResultRequestBody) SetIteration(v uint32) {
func (x *AnnounceIntermediateResultRequestBody) SetIteration(v uint32) {
if x != nil {
x.iter = v
}
}
// GetTrust returns current global trust value.
func (x *SendIntermediateResultRequestBody) GetTrust() *PeerToPeerTrust {
func (x *AnnounceIntermediateResultRequestBody) GetTrust() *PeerToPeerTrust {
if x != nil {
return x.trust
}
@ -346,25 +346,25 @@ func (x *SendIntermediateResultRequestBody) GetTrust() *PeerToPeerTrust {
}
// SetTrust sets current global trust value.
func (x *SendIntermediateResultRequestBody) SetTrust(v *PeerToPeerTrust) {
func (x *AnnounceIntermediateResultRequestBody) SetTrust(v *PeerToPeerTrust) {
if x != nil {
x.trust = v
}
}
// SendLocalTrustResponseBody is a structure of SendIntermediateResult response body.
type SendIntermediateResultResponseBody struct{}
// AnnounceIntermediateResultResponseBody is a structure of AnnounceIntermediateResult response body.
type AnnounceIntermediateResultResponseBody struct{}
// SendIntermediateResultRequest represents reputation.SendIntermediateResult
// AnnounceIntermediateResultRequest represents reputation.AnnounceIntermediateResult
// message from NeoFS API v2.
type SendIntermediateResultRequest struct {
body *SendIntermediateResultRequestBody
type AnnounceIntermediateResultRequest struct {
body *AnnounceIntermediateResultRequestBody
session.RequestHeaders
}
// GetBody returns request body.
func (x *SendIntermediateResultRequest) GetBody() *SendIntermediateResultRequestBody {
func (x *AnnounceIntermediateResultRequest) GetBody() *AnnounceIntermediateResultRequestBody {
if x != nil {
return x.body
}
@ -373,22 +373,22 @@ func (x *SendIntermediateResultRequest) GetBody() *SendIntermediateResultRequest
}
// SetBody sets request body.
func (x *SendIntermediateResultRequest) SetBody(v *SendIntermediateResultRequestBody) {
func (x *AnnounceIntermediateResultRequest) SetBody(v *AnnounceIntermediateResultRequestBody) {
if x != nil {
x.body = v
}
}
// SendIntermediateResultResponse represents reputation.SendIntermediateResultResponse
// AnnounceIntermediateResultResponse represents reputation.AnnounceIntermediateResultResponse
// message from NeoFS API v2.
type SendIntermediateResultResponse struct {
body *SendIntermediateResultResponseBody
type AnnounceIntermediateResultResponse struct {
body *AnnounceIntermediateResultResponseBody
session.ResponseHeaders
}
// GetBody returns response body.
func (x *SendIntermediateResultResponse) GetBody() *SendIntermediateResultResponseBody {
func (x *AnnounceIntermediateResultResponse) GetBody() *AnnounceIntermediateResultResponseBody {
if x != nil {
return x.body
}
@ -397,7 +397,7 @@ func (x *SendIntermediateResultResponse) GetBody() *SendIntermediateResultRespon
}
// SetBody sets response body.
func (x *SendIntermediateResultResponse) SetBody(v *SendIntermediateResultResponseBody) {
func (x *AnnounceIntermediateResultResponse) SetBody(v *AnnounceIntermediateResultResponseBody) {
if x != nil {
x.body = v
}

View file

@ -9,19 +9,19 @@ import (
const serviceReputation = serviceNamePrefix + "reputation.ReputationService"
const (
rpcReputationSendLocalTrust = "SendLocalTrust"
rpcReputationSendIntermediateResult = "SendIntermediateResult"
rpcReputationAnnounceLocalTrust = "AnnounceLocalTrust"
rpcReputationAnnounceIntermediateResult = "AnnounceIntermediateResult"
)
// SendLocalTrust executes ReputationService.SendLocalTrust RPC.
func SendLocalTrust(
// AnnounceLocalTrust executes ReputationService.AnnounceLocalTrust RPC.
func AnnounceLocalTrust(
cli *client.Client,
req *reputation.SendLocalTrustRequest,
req *reputation.AnnounceLocalTrustRequest,
opts ...client.CallOption,
) (*reputation.SendLocalTrustResponse, error) {
resp := new(reputation.SendLocalTrustResponse)
) (*reputation.AnnounceLocalTrustResponse, error) {
resp := new(reputation.AnnounceLocalTrustResponse)
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationSendLocalTrust), req, resp, opts...)
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationAnnounceLocalTrust), req, resp, opts...)
if err != nil {
return nil, err
}
@ -29,15 +29,15 @@ func SendLocalTrust(
return resp, nil
}
// SendIntermediateResult executes ReputationService.SendIntermediateResult RPC.
func SendIntermediateResult(
// AnnounceIntermediateResult executes ReputationService.AnnounceIntermediateResult RPC.
func AnnounceIntermediateResult(
cli *client.Client,
req *reputation.SendIntermediateResultRequest,
req *reputation.AnnounceIntermediateResultRequest,
opts ...client.CallOption,
) (*reputation.SendIntermediateResultRequest, error) {
resp := new(reputation.SendIntermediateResultRequest)
) (*reputation.AnnounceIntermediateResultRequest, error) {
resp := new(reputation.AnnounceIntermediateResultRequest)
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationSendIntermediateResult), req, resp, opts...)
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationAnnounceIntermediateResult), req, resp, opts...)
if err != nil {
return nil, err
}

View file

@ -377,13 +377,13 @@ func serviceMessageBody(req interface{}) stableMarshaler {
return v.GetBody()
/* Reputation */
case *reputation.SendLocalTrustRequest:
case *reputation.AnnounceLocalTrustRequest:
return v.GetBody()
case *reputation.SendLocalTrustResponse:
case *reputation.AnnounceLocalTrustResponse:
return v.GetBody()
case *reputation.SendIntermediateResultRequest:
case *reputation.AnnounceIntermediateResultRequest:
return v.GetBody()
case *reputation.SendIntermediateResultResponse:
case *reputation.AnnounceIntermediateResultResponse:
return v.GetBody()
}
}