3
0

Add priv/req/vis/multi field flags to protobuf def

This commit is contained in:
Denis Arh
2019-09-23 14:11:44 +02:00
parent b449e20830
commit 861afe23ee
3 changed files with 62 additions and 18 deletions
Generated
+1
View File
@@ -820,6 +820,7 @@
"google.golang.org/grpc/status",
"gopkg.in/Masterminds/squirrel.v1",
"gopkg.in/mail.v2",
"gopkg.in/yaml.v2",
]
solver-name = "gps-cdcl"
solver-version = 1
+8
View File
@@ -24,6 +24,14 @@ func FromModule(i *types.Module) *Module {
FieldID: i.Fields[f].ID,
Name: i.Fields[f].Name,
Kind: i.Fields[f].Kind,
IsMulti: i.Fields[f].Multi,
IsPrivate: i.Fields[f].Private,
IsVisible: i.Fields[f].Visible,
IsRequired: i.Fields[f].Required,
// @todo add default value
// @todo add options
}
}
+53 -18
View File
@@ -112,6 +112,10 @@ type ModuleField struct {
FieldID uint64 `protobuf:"varint,1,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"`
IsMulti bool `protobuf:"varint,4,opt,name=isMulti,proto3" json:"isMulti,omitempty"`
IsPrivate bool `protobuf:"varint,5,opt,name=isPrivate,proto3" json:"isPrivate,omitempty"`
IsVisible bool `protobuf:"varint,6,opt,name=isVisible,proto3" json:"isVisible,omitempty"`
IsRequired bool `protobuf:"varint,7,opt,name=isRequired,proto3" json:"isRequired,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -163,6 +167,34 @@ func (m *ModuleField) GetKind() string {
return ""
}
func (m *ModuleField) GetIsMulti() bool {
if m != nil {
return m.IsMulti
}
return false
}
func (m *ModuleField) GetIsPrivate() bool {
if m != nil {
return m.IsPrivate
}
return false
}
func (m *ModuleField) GetIsVisible() bool {
if m != nil {
return m.IsVisible
}
return false
}
func (m *ModuleField) GetIsRequired() bool {
if m != nil {
return m.IsRequired
}
return false
}
func init() {
proto.RegisterType((*Module)(nil), "compose.Module")
proto.RegisterType((*ModuleField)(nil), "compose.ModuleField")
@@ -171,22 +203,25 @@ func init() {
func init() { proto.RegisterFile("module.proto", fileDescriptor_ae7704718fb7daeb) }
var fileDescriptor_ae7704718fb7daeb = []byte{
// 259 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x41, 0x4b, 0xc4, 0x30,
0x10, 0x85, 0x69, 0xb7, 0xb6, 0xdb, 0xa9, 0x20, 0x04, 0x0f, 0xa1, 0x17, 0xc3, 0x9e, 0x7a, 0x90,
0x2c, 0xac, 0x17, 0xaf, 0x8a, 0x08, 0x1e, 0x44, 0x28, 0x9e, 0xbc, 0xd5, 0x66, 0x76, 0x29, 0x36,
0x9b, 0xb0, 0x4d, 0xff, 0x9a, 0xbf, 0x4f, 0x92, 0xb4, 0xb1, 0xb7, 0x9e, 0x32, 0x33, 0xef, 0x7d,
0xe1, 0xf1, 0xe0, 0x5a, 0x2a, 0x31, 0xf6, 0xc8, 0xf5, 0x45, 0x19, 0x45, 0xb2, 0x56, 0x49, 0xad,
0x06, 0x2c, 0xef, 0x4e, 0x4a, 0x9d, 0x7a, 0xdc, 0xbb, 0xf3, 0xf7, 0x78, 0xdc, 0x9b, 0x4e, 0xe2,
0x60, 0x1a, 0xa9, 0xbd, 0x73, 0xf7, 0x1b, 0x43, 0xfa, 0xee, 0x50, 0x52, 0xc2, 0xd6, 0x7f, 0xf2,
0xf6, 0x42, 0x23, 0x16, 0x55, 0x49, 0x1d, 0x76, 0xc2, 0xa0, 0x38, 0x37, 0x12, 0x07, 0xdd, 0xb4,
0x56, 0x8e, 0x9d, 0xbc, 0x3c, 0x11, 0x02, 0x89, 0x5d, 0xe9, 0x86, 0x45, 0x55, 0x5e, 0xbb, 0x99,
0x3c, 0x42, 0xde, 0x5e, 0xb0, 0x31, 0x28, 0x9e, 0x0c, 0xdd, 0xb2, 0xa8, 0x2a, 0x0e, 0x25, 0xf7,
0x89, 0xf8, 0x9c, 0x88, 0x7f, 0xce, 0x89, 0xea, 0x7f, 0xb3, 0x25, 0x47, 0x2d, 0x26, 0x32, 0x5f,
0x27, 0x83, 0xd9, 0x92, 0x02, 0x7b, 0xf4, 0x24, 0xac, 0x93, 0xc1, 0x4c, 0xee, 0x21, 0x3d, 0x76,
0xd8, 0x8b, 0x81, 0xde, 0xb0, 0x4d, 0x55, 0x1c, 0x6e, 0xf9, 0xd4, 0x22, 0xf7, 0x05, 0xbd, 0x5a,
0xb1, 0x9e, 0x3c, 0xbb, 0x0f, 0x28, 0x16, 0x67, 0x42, 0x21, 0x73, 0x42, 0xe8, 0x6e, 0x5e, 0x43,
0x31, 0xf1, 0xa2, 0x18, 0x02, 0xc9, 0x4f, 0x77, 0x16, 0x73, 0x59, 0x76, 0x7e, 0xce, 0xbe, 0xae,
0x7c, 0xbe, 0xd4, 0x3d, 0x0f, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x74, 0x31, 0xbc, 0x25, 0xd3,
0x01, 0x00, 0x00,
// 317 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0xc1, 0x4b, 0xc3, 0x30,
0x14, 0xc6, 0xe9, 0xd6, 0xb5, 0xeb, 0xab, 0x20, 0x04, 0x0f, 0x61, 0x88, 0x96, 0x9d, 0x7a, 0x90,
0x0e, 0xe6, 0xc5, 0xab, 0x22, 0x82, 0x87, 0x81, 0x14, 0xf1, 0xe0, 0xad, 0x5b, 0xde, 0x46, 0x30,
0x5d, 0x6a, 0x93, 0xfa, 0xa7, 0xf9, 0x1f, 0xf8, 0x7f, 0x49, 0x92, 0xa6, 0xeb, 0x6d, 0xa7, 0xe4,
0x7d, 0xbf, 0xef, 0x7b, 0x3c, 0x3e, 0xb8, 0xa8, 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