2020-11-13 12:58:53 +00:00
|
|
|
package refs
|
|
|
|
|
|
|
|
import (
|
|
|
|
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
2021-11-16 17:30:55 +00:00
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
2020-11-13 12:58:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (a *Address) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(a)
|
2020-11-13 12:58:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Address) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(a, data, new(refs.Address))
|
2020-11-13 12:58:53 +00:00
|
|
|
}
|
2020-11-13 13:04:09 +00:00
|
|
|
|
|
|
|
func (o *ObjectID) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(o)
|
2020-11-13 13:04:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ObjectID) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(o, data, new(refs.ObjectID))
|
2020-11-13 13:04:09 +00:00
|
|
|
}
|
2020-11-13 13:07:32 +00:00
|
|
|
|
|
|
|
func (c *ContainerID) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(c)
|
2020-11-13 13:07:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *ContainerID) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(c, data, new(refs.ContainerID))
|
2020-11-13 13:07:32 +00:00
|
|
|
}
|
2020-11-13 13:14:00 +00:00
|
|
|
|
|
|
|
func (o *OwnerID) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(o)
|
2020-11-13 13:14:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *OwnerID) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(o, data, new(refs.OwnerID))
|
2020-11-13 13:14:00 +00:00
|
|
|
}
|
2020-11-13 13:19:16 +00:00
|
|
|
|
|
|
|
func (v *Version) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(v)
|
2020-11-13 13:19:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Version) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(v, data, new(refs.Version))
|
2020-11-13 13:19:16 +00:00
|
|
|
}
|
2020-11-13 13:23:41 +00:00
|
|
|
|
|
|
|
func (s *Signature) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(s)
|
2020-11-13 13:23:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Signature) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(s, data, new(refs.Signature))
|
2020-11-13 13:23:41 +00:00
|
|
|
}
|
2020-11-13 13:30:35 +00:00
|
|
|
|
|
|
|
func (c *Checksum) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(c)
|
2020-11-13 13:30:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Checksum) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(c, data, new(refs.Checksum))
|
2020-11-13 13:30:35 +00:00
|
|
|
}
|