forked from TrueCloudLab/frostfs-api-go
[#265] reputation: Implement converters and encoding methods on messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0cbb8d0913
commit
3adfdc5005
4 changed files with 378 additions and 0 deletions
14
v2/reputation/json.go
Normal file
14
v2/reputation/json.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
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 *Trust) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(x)
|
||||
}
|
||||
|
||||
func (x *Trust) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(x, data, new(reputation.Trust))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue