2021-03-24 07:10:51 +00:00
|
|
|
package reputation
|
|
|
|
|
|
|
|
import (
|
2023-03-07 10:38:56 +00:00
|
|
|
reputation "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
2021-03-24 07:10:51 +00:00
|
|
|
)
|
|
|
|
|
2021-04-01 14:53:14 +00:00
|
|
|
func (x *PeerID) MarshalJSON() ([]byte, error) {
|
|
|
|
return message.MarshalJSON(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *PeerID) UnmarshalJSON(data []byte) error {
|
|
|
|
return message.UnmarshalJSON(x, data, new(reputation.PeerID))
|
|
|
|
}
|
|
|
|
|
2021-03-24 07:10:51 +00:00
|
|
|
func (x *Trust) MarshalJSON() ([]byte, error) {
|
|
|
|
return message.MarshalJSON(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Trust) UnmarshalJSON(data []byte) error {
|
|
|
|
return message.UnmarshalJSON(x, data, new(reputation.Trust))
|
|
|
|
}
|
2021-04-01 14:53:14 +00:00
|
|
|
|
2021-04-09 08:28:06 +00:00
|
|
|
func (x *PeerToPeerTrust) MarshalJSON() ([]byte, error) {
|
|
|
|
return message.MarshalJSON(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *PeerToPeerTrust) UnmarshalJSON(data []byte) error {
|
|
|
|
return message.UnmarshalJSON(x, data, new(reputation.PeerToPeerTrust))
|
|
|
|
}
|
|
|
|
|
2021-04-01 14:53:14 +00:00
|
|
|
func (x *GlobalTrust) MarshalJSON() ([]byte, error) {
|
|
|
|
return message.MarshalJSON(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *GlobalTrust) UnmarshalJSON(data []byte) error {
|
|
|
|
return message.UnmarshalJSON(x, data, new(reputation.GlobalTrust))
|
|
|
|
}
|