2021-03-24 05:42:20 +00:00
|
|
|
package reputation
|
|
|
|
|
2021-04-01 14:24:38 +00:00
|
|
|
import (
|
2023-03-07 10:38:56 +00:00
|
|
|
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
2021-04-01 14:24:38 +00:00
|
|
|
)
|
|
|
|
|
2021-05-07 09:34:24 +00:00
|
|
|
// SetPublicKey sets binary public key of ID.
|
|
|
|
func (x *PeerID) SetPublicKey(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.PublicKey = v
|
2021-04-01 14:24:38 +00:00
|
|
|
}
|
|
|
|
|
2021-03-24 05:42:20 +00:00
|
|
|
// SetPeer sets trusted peer's ID.
|
2021-04-01 14:24:38 +00:00
|
|
|
func (x *Trust) SetPeer(v *PeerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Peer = v
|
2021-03-24 05:42:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetValue sets trust value.
|
|
|
|
func (x *Trust) SetValue(v float64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Value = v
|
2021-03-24 05:42:20 +00:00
|
|
|
}
|
2021-04-01 14:24:38 +00:00
|
|
|
|
2021-04-09 08:28:06 +00:00
|
|
|
// SetTrustingPeer sets trusting peer ID.
|
|
|
|
func (x *PeerToPeerTrust) SetTrustingPeer(v *PeerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.TrustingPeer = v
|
2021-04-09 08:28:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetTrust sets trust value of trusting peer to the trusted one.
|
|
|
|
func (x *PeerToPeerTrust) SetTrust(v *Trust) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Trust = v
|
2021-04-09 08:28:06 +00:00
|
|
|
}
|
|
|
|
|
2021-04-01 14:24:38 +00:00
|
|
|
// SetManager sets manager ID.
|
|
|
|
func (x *GlobalTrust_Body) SetManager(v *PeerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Manager = v
|
2021-04-01 14:24:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetTrust sets global trust value.
|
|
|
|
func (x *GlobalTrust_Body) SetTrust(v *Trust) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Trust = v
|
2021-04-01 14:24:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetVersion sets message format version.
|
|
|
|
func (x *GlobalTrust) SetVersion(v *refs.Version) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Version = v
|
2021-04-01 14:24:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetBody sets message body.
|
|
|
|
func (x *GlobalTrust) SetBody(v *GlobalTrust_Body) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Body = v
|
2021-04-01 14:24:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetSignature sets body signature.
|
|
|
|
func (x *GlobalTrust) SetSignature(v *refs.Signature) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Signature = v
|
2021-04-01 14:24:38 +00:00
|
|
|
}
|