forked from TrueCloudLab/frostfs-api-go
19 lines
344 B
Go
19 lines
344 B
Go
|
package apemanager
|
||
|
|
||
|
import (
|
||
|
apemanager_grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc"
|
||
|
)
|
||
|
|
||
|
func (tt TargetType) String() string {
|
||
|
return TargetTypeToGRPCField(tt).String()
|
||
|
}
|
||
|
|
||
|
func (tt *TargetType) FromString(s string) bool {
|
||
|
i, ok := apemanager_grpc.TargetType_value[s]
|
||
|
if ok {
|
||
|
*tt = TargetType(i)
|
||
|
}
|
||
|
|
||
|
return ok
|
||
|
}
|