forked from TrueCloudLab/frostfs-api-go
Add v2
version to go module name
Replace all elements from `v2` to root directory. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2d70391e31
commit
25da5d2e13
267 changed files with 116 additions and 17991 deletions
75
reputation/grpc/types.go
Normal file
75
reputation/grpc/types.go
Normal file
|
@ -0,0 +1,75 @@
|
|||
package reputation
|
||||
|
||||
import (
|
||||
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
||||
)
|
||||
|
||||
// SetPublicKey sets binary public key of ID.
|
||||
func (x *PeerID) SetPublicKey(v []byte) {
|
||||
if x != nil {
|
||||
x.PublicKey = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetPeer sets trusted peer's ID.
|
||||
func (x *Trust) SetPeer(v *PeerID) {
|
||||
if x != nil {
|
||||
x.Peer = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetValue sets trust value.
|
||||
func (x *Trust) SetValue(v float64) {
|
||||
if x != nil {
|
||||
x.Value = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetTrustingPeer sets trusting peer ID.
|
||||
func (x *PeerToPeerTrust) SetTrustingPeer(v *PeerID) {
|
||||
if x != nil {
|
||||
x.TrustingPeer = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetTrust sets trust value of trusting peer to the trusted one.
|
||||
func (x *PeerToPeerTrust) SetTrust(v *Trust) {
|
||||
if x != nil {
|
||||
x.Trust = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetManager sets manager ID.
|
||||
func (x *GlobalTrust_Body) SetManager(v *PeerID) {
|
||||
if x != nil {
|
||||
x.Manager = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetTrust sets global trust value.
|
||||
func (x *GlobalTrust_Body) SetTrust(v *Trust) {
|
||||
if x != nil {
|
||||
x.Trust = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetVersion sets message format version.
|
||||
func (x *GlobalTrust) SetVersion(v *refs.Version) {
|
||||
if x != nil {
|
||||
x.Version = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetBody sets message body.
|
||||
func (x *GlobalTrust) SetBody(v *GlobalTrust_Body) {
|
||||
if x != nil {
|
||||
x.Body = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetSignature sets body signature.
|
||||
func (x *GlobalTrust) SetSignature(v *refs.Signature) {
|
||||
if x != nil {
|
||||
x.Signature = v
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue