forked from TrueCloudLab/frostfs-api-go
60e9c3d0d3
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
29 lines
379 B
Go
29 lines
379 B
Go
package refs
|
|
|
|
import (
|
|
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
|
)
|
|
|
|
func OwnerIDToGRPCMessage(o *OwnerID) *refs.OwnerID {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
|
|
m := new(refs.OwnerID)
|
|
|
|
m.SetValue(o.GetValue())
|
|
|
|
return m
|
|
}
|
|
|
|
func OwnerIDFromGRPCMessage(m *refs.OwnerID) *OwnerID {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := new(OwnerID)
|
|
|
|
o.SetValue(m.GetValue())
|
|
|
|
return o
|
|
}
|