github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/refs/json.go (about) 1 package refs 2 3 import ( 4 refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc" 5 "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message" 6 ) 7 8 func (a *Address) MarshalJSON() ([]byte, error) { 9 return message.MarshalJSON(a) 10 } 11 12 func (a *Address) UnmarshalJSON(data []byte) error { 13 return message.UnmarshalJSON(a, data, new(refs.Address)) 14 } 15 16 func (o *ObjectID) MarshalJSON() ([]byte, error) { 17 return message.MarshalJSON(o) 18 } 19 20 func (o *ObjectID) UnmarshalJSON(data []byte) error { 21 return message.UnmarshalJSON(o, data, new(refs.ObjectID)) 22 } 23 24 func (c *ContainerID) MarshalJSON() ([]byte, error) { 25 return message.MarshalJSON(c) 26 } 27 28 func (c *ContainerID) UnmarshalJSON(data []byte) error { 29 return message.UnmarshalJSON(c, data, new(refs.ContainerID)) 30 } 31 32 func (o *OwnerID) MarshalJSON() ([]byte, error) { 33 return message.MarshalJSON(o) 34 } 35 36 func (o *OwnerID) UnmarshalJSON(data []byte) error { 37 return message.UnmarshalJSON(o, data, new(refs.OwnerID)) 38 } 39 40 func (v *Version) MarshalJSON() ([]byte, error) { 41 return message.MarshalJSON(v) 42 } 43 44 func (v *Version) UnmarshalJSON(data []byte) error { 45 return message.UnmarshalJSON(v, data, new(refs.Version)) 46 } 47 48 func (s *Signature) MarshalJSON() ([]byte, error) { 49 return message.MarshalJSON(s) 50 } 51 52 func (s *Signature) UnmarshalJSON(data []byte) error { 53 return message.UnmarshalJSON(s, data, new(refs.Signature)) 54 } 55 56 func (c *Checksum) MarshalJSON() ([]byte, error) { 57 return message.MarshalJSON(c) 58 } 59 60 func (c *Checksum) UnmarshalJSON(data []byte) error { 61 return message.UnmarshalJSON(c, data, new(refs.Checksum)) 62 }