github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/reputation/grpc/types.go (about)

     1  package reputation
     2  
     3  import (
     4  	refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
     5  )
     6  
     7  // SetPublicKey sets binary public key of ID.
     8  func (x *PeerID) SetPublicKey(v []byte) {
     9  	x.PublicKey = v
    10  }
    11  
    12  // SetPeer sets trusted peer's ID.
    13  func (x *Trust) SetPeer(v *PeerID) {
    14  	x.Peer = v
    15  }
    16  
    17  // SetValue sets trust value.
    18  func (x *Trust) SetValue(v float64) {
    19  	x.Value = v
    20  }
    21  
    22  // SetTrustingPeer sets trusting peer ID.
    23  func (x *PeerToPeerTrust) SetTrustingPeer(v *PeerID) {
    24  	x.TrustingPeer = v
    25  }
    26  
    27  // SetTrust sets trust value of trusting peer to the trusted one.
    28  func (x *PeerToPeerTrust) SetTrust(v *Trust) {
    29  	x.Trust = v
    30  }
    31  
    32  // SetManager sets manager ID.
    33  func (x *GlobalTrust_Body) SetManager(v *PeerID) {
    34  	x.Manager = v
    35  }
    36  
    37  // SetTrust sets global trust value.
    38  func (x *GlobalTrust_Body) SetTrust(v *Trust) {
    39  	x.Trust = v
    40  }
    41  
    42  // SetVersion sets message format version.
    43  func (x *GlobalTrust) SetVersion(v *refs.Version) {
    44  	x.Version = v
    45  }
    46  
    47  // SetBody sets message body.
    48  func (x *GlobalTrust) SetBody(v *GlobalTrust_Body) {
    49  	x.Body = v
    50  }
    51  
    52  // SetSignature sets body signature.
    53  func (x *GlobalTrust) SetSignature(v *refs.Signature) {
    54  	x.Signature = v
    55  }