forked from TrueCloudLab/frostfs-sdk-go
[#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
5361f0eceb
commit
6ce73790ea
337 changed files with 66666 additions and 283 deletions
22
api/container/json.go
Normal file
22
api/container/json.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package container
|
||||
|
||||
import (
|
||||
container "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/container/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/message"
|
||||
)
|
||||
|
||||
func (a *Attribute) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(a)
|
||||
}
|
||||
|
||||
func (a *Attribute) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(a, data, new(container.Container_Attribute))
|
||||
}
|
||||
|
||||
func (c *Container) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(c)
|
||||
}
|
||||
|
||||
func (c *Container) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(c, data, new(container.Container))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue