frostfs-sdk-go/api/netmap/json.go
Pavel Pogodaev 6ce73790ea [#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2024-10-22 14:05:12 +00:00

62 lines
1.6 KiB
Go

package netmap
import (
netmap "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/netmap/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/message"
)
func (p *PlacementPolicy) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(p)
}
func (p *PlacementPolicy) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(p, data, new(netmap.PlacementPolicy))
}
func (f *Filter) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(f)
}
func (f *Filter) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(f, data, new(netmap.Filter))
}
func (s *Selector) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(s)
}
func (s *Selector) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(s, data, new(netmap.Selector))
}
func (r *Replica) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(r)
}
func (r *Replica) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(r, data, new(netmap.Replica))
}
func (a *Attribute) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(a)
}
func (a *Attribute) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(a, data, new(netmap.NodeInfo_Attribute))
}
func (ni *NodeInfo) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(ni)
}
func (ni *NodeInfo) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(ni, data, new(netmap.NodeInfo))
}
func (i *NetworkInfo) MarshalJSON() ([]byte, error) {
return message.MarshalJSON(i)
}
func (i *NetworkInfo) UnmarshalJSON(data []byte) error {
return message.UnmarshalJSON(i, data, new(netmap.NetworkInfo))
}