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