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
62
refs/json.go
Normal file
62
refs/json.go
Normal file
|
@ -0,0 +1,62 @@
|
|||
package refs
|
||||
|
||||
import (
|
||||
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
func (a *Address) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(a)
|
||||
}
|
||||
|
||||
func (a *Address) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(a, data, new(refs.Address))
|
||||
}
|
||||
|
||||
func (o *ObjectID) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(o)
|
||||
}
|
||||
|
||||
func (o *ObjectID) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(o, data, new(refs.ObjectID))
|
||||
}
|
||||
|
||||
func (c *ContainerID) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(c)
|
||||
}
|
||||
|
||||
func (c *ContainerID) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(c, data, new(refs.ContainerID))
|
||||
}
|
||||
|
||||
func (o *OwnerID) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(o)
|
||||
}
|
||||
|
||||
func (o *OwnerID) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(o, data, new(refs.OwnerID))
|
||||
}
|
||||
|
||||
func (v *Version) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(v)
|
||||
}
|
||||
|
||||
func (v *Version) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(v, data, new(refs.Version))
|
||||
}
|
||||
|
||||
func (s *Signature) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(s)
|
||||
}
|
||||
|
||||
func (s *Signature) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(s, data, new(refs.Signature))
|
||||
}
|
||||
|
||||
func (c *Checksum) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(c)
|
||||
}
|
||||
|
||||
func (c *Checksum) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(c, data, new(refs.Checksum))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue