2021-03-24 07:10:51 +00:00
|
|
|
package reputation
|
|
|
|
|
|
|
|
import (
|
|
|
|
reputation "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc"
|
2021-11-16 17:30:55 +00:00
|
|
|
"github.com/nspcc-dev/neofs-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))
|
|
|
|
}
|