frostfs-api-go/v2/reputation/json.go
Leonard Lyubich 269288119d [#265] v2/reputation: Support PeerToPeerTrust message
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-09 11:57:42 +03:00

38 lines
990 B
Go

package reputation
import (
"github.com/nspcc-dev/neofs-api-go/rpc/message"
reputation "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc"
)
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))
}
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))
}
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))
}
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))
}