19 lines
315 B
Go
19 lines
315 B
Go
|
package ape
|
||
|
|
||
|
import (
|
||
|
apegrpc "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/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
|
||
|
}
|