forked from TrueCloudLab/frostfs-api-go
[#74] apemanager: Generate protobufs for apemanager service
* Generate protobufs. * Make marshallers, unmarshallers, json-encoders etc. * Create message encoding/decoding unit-tests. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
67c6f305b2
commit
387b850e5e
17 changed files with 3375 additions and 45 deletions
18
apemanager/string.go
Normal file
18
apemanager/string.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue