forked from TrueCloudLab/frostfs-api-go
Add v2
version to go module name
Replace all elements from `v2` to root directory. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2d70391e31
commit
25da5d2e13
267 changed files with 116 additions and 17991 deletions
38
reputation/json.go
Normal file
38
reputation/json.go
Normal file
|
@ -0,0 +1,38 @@
|
|||
package reputation
|
||||
|
||||
import (
|
||||
reputation "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
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))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue