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