frostfs-api-go/ape/string.go

19 lines
314 B
Go
Raw Normal View History

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
}