forked from TrueCloudLab/frostfs-api-go
Airat Arifullin
9789b79b1d
* Regenerate protobufs as APE specific type are defined as separate package; * Move `ape` package related utils methods from `apemanager`. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
18 lines
314 B
Go
18 lines
314 B
Go
package ape
|
|
|
|
import (
|
|
apegrpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
|
)
|
|
|
|
func (tt TargetType) String() string {
|
|
return TargetTypeToGRPCField(tt).String()
|
|
}
|
|
|
|
func (tt *TargetType) FromString(s string) bool {
|
|
i, ok := apegrpc.TargetType_value[s]
|
|
if ok {
|
|
*tt = TargetType(i)
|
|
}
|
|
|
|
return ok
|
|
}
|