2021-03-24 07:10:51 +00:00
|
|
|
package reputation
|
|
|
|
|
|
|
|
import (
|
2022-12-09 11:16:24 +00:00
|
|
|
reputation "github.com/TrueCloudLab/frostfs-api-go/v2/reputation/grpc"
|
|
|
|
"github.com/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))
|
|
|
|
}
|