2024-05-28 08:04:07 +00:00
|
|
|
package ape
|
2024-04-24 13:00:37 +00:00
|
|
|
|
|
|
|
import (
|
2024-05-28 08:04:07 +00:00
|
|
|
apegrpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
2024-04-24 13:00:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (tt TargetType) String() string {
|
|
|
|
return TargetTypeToGRPCField(tt).String()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (tt *TargetType) FromString(s string) bool {
|
2024-05-28 08:04:07 +00:00
|
|
|
i, ok := apegrpc.TargetType_value[s]
|
2024-04-24 13:00:37 +00:00
|
|
|
if ok {
|
|
|
|
*tt = TargetType(i)
|
|
|
|
}
|
|
|
|
|
|
|
|
return ok
|
|
|
|
}
|