From ac29c7210d1fdccf07f19363ac1dc86740f3c9d7 Mon Sep 17 00:00:00 2001 From: Stanislav Semenov Date: Tue, 16 Apr 2019 14:19:54 +0300 Subject: [PATCH] add modules --- plugin/plugin.go | 46 +++++++++++++++++++- test.pb.bom.go | 11 +++++ test.pb.go | 108 ++++++++++++++++++++++++++--------------------- test.proto | 1 + 4 files changed, 116 insertions(+), 50 deletions(-) diff --git a/plugin/plugin.go b/plugin/plugin.go index 10979f7..9c4e7be 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -160,6 +160,12 @@ func (p *MongoPlugin) generateModelsStructures(message *descriptor.DescriptorPro p.P(fieldName, ` `, `primitive.ObjectID`, idName) p.usePrimitive = true + } else if p.IsMap(field) { + + m := p.GoMapType(nil, field) + //_, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + p.P(fieldName, ` `, m.GoType) + } else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) { if strings.ToLower(goTyp) == "*timestamp.timestamp" { p.P(fieldName, ` time.Time`) @@ -232,7 +238,24 @@ func (p *MongoPlugin) GenerateFieldConversion(field *descriptor.FieldDescriptorP } goTyp, _ := p.GoType(des, field) p.In() - if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) { + if p.IsMap(field) { + + m := p.GoMapType(nil, field) + _, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + keygoTyp, _ := p.GoType(nil, keyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, keyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + //keyCapTyp := generator.CamelCase(keygoTyp) + p.P(`tt`, fieldName, ` := make(`, m.GoType, `)`) + p.P(`for k, v := range e.`, fieldName, ` {`) + p.In() + p.P(`tt`, fieldName, `[k] = v`) + p.Out() + p.P(`}`) + p.P(`resp.`, fieldName, ` = tt`, fieldName) + + } else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) { if strings.ToLower(goTyp) == "*timestamp.timestamp" { p.P(`ptap`, fieldName, `, _ := ptypes.TimestampProto(e.`, fieldName, `)`) @@ -287,7 +310,26 @@ func (p *MongoPlugin) ToMongoGenerateFieldConversion(field *descriptor.FieldDesc } goTyp, _ := p.GoType(des, field) p.In() - if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) { + + if p.IsMap(field) { + + m := p.GoMapType(nil, field) + _, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + keygoTyp, _ := p.GoType(nil, keyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, keyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + //keyCapTyp := generator.CamelCase(keygoTyp) + p.P(`tt`, fieldName, ` := make(`, m.GoType, `)`) + + p.P(`for k, v := range e.`, fieldName, ` {`) + p.In() + p.P(`tt`, fieldName, `[k] = v`) + p.Out() + p.P(`}`) + p.P(`resp.`, fieldName, ` = tt`, fieldName) + + } else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) { if strings.ToLower(goTyp) == "*timestamp.timestamp" { p.useTime = true diff --git a/test.pb.bom.go b/test.pb.bom.go index 42c09b0..5296f5b 100644 --- a/test.pb.bom.go +++ b/test.pb.bom.go @@ -212,6 +212,7 @@ type UserMongo struct { Token *TokenMongo CreatedAt time.Time UpdatedAt time.Time + Arguments map[string]string } // The following are interfaces you can implement for special behavior during Mongo/PB conversions @@ -263,6 +264,11 @@ func (e *UserMongo) ToPB() (*User, error) { resp.CreatedAt = ptapCreatedAt ptapUpdatedAt, _ := ptypes.TimestampProto(e.UpdatedAt) resp.UpdatedAt = ptapUpdatedAt + ttArguments := make(map[string]string) + for k, v := range e.Arguments { + ttArguments[k] = v + } + resp.Arguments = ttArguments if posthook, ok := interface{}(e).(UserMongoWithAfterToPB); ok { err = posthook.AfterToPB(resp) } @@ -298,6 +304,11 @@ func (e *User) ToMongo() (*UserMongo, error) { // create time object utUpdatedAt := time.Unix(e.UpdatedAt.GetSeconds(), int64(e.UpdatedAt.GetNanos())) resp.UpdatedAt = utUpdatedAt + ttArguments := make(map[string]string) + for k, v := range e.Arguments { + ttArguments[k] = v + } + resp.Arguments = ttArguments if posthook, ok := interface{}(e).(UserMongoWithAfterToMongo); ok { if err := posthook.AfterToMongo(resp); err != nil { return resp, err diff --git a/test.pb.go b/test.pb.go index 60e0d0e..bcd2ba9 100644 --- a/test.pb.go +++ b/test.pb.go @@ -256,6 +256,7 @@ type User struct { Token *Token `protobuf:"bytes,12,opt,name=token,proto3" json:"token,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,13,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,14,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + Arguments map[string]string `protobuf:"bytes,15,rep,name=arguments,proto3" json:"arguments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -370,6 +371,13 @@ func (m *User) GetUpdatedAt() *timestamp.Timestamp { return nil } +func (m *User) GetArguments() map[string]string { + if m != nil { + return m.Arguments + } + return nil +} + type Token struct { AccessToken string `protobuf:"bytes,3,opt,name=accessToken,proto3" json:"accessToken,omitempty"` RefreshToken string `protobuf:"bytes,4,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` @@ -470,6 +478,7 @@ func init() { proto.RegisterType((*Role)(nil), "main.Role") proto.RegisterType((*Permission)(nil), "main.Permission") proto.RegisterType((*User)(nil), "main.User") + proto.RegisterMapType((map[string]string)(nil), "main.User.ArgumentsEntry") proto.RegisterType((*Token)(nil), "main.Token") proto.RegisterType((*ProviderUsers)(nil), "main.ProviderUsers") } @@ -477,53 +486,56 @@ func init() { func init() { proto.RegisterFile("test.proto", fileDescriptor_c161fcfdc0c3ff1e) } var fileDescriptor_c161fcfdc0c3ff1e = []byte{ - // 758 bytes of a gzipped FileDescriptorProto + // 816 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xd1, 0x8e, 0xe3, 0x34, - 0x14, 0xc5, 0x9d, 0xb4, 0xd3, 0xdc, 0x4e, 0x87, 0xca, 0x42, 0xab, 0xa8, 0x5a, 0x41, 0x37, 0x20, - 0x11, 0x8d, 0x34, 0x49, 0x29, 0x12, 0x42, 0x7d, 0x83, 0x15, 0x48, 0xfb, 0x82, 0x56, 0x61, 0x00, - 0xc1, 0x0b, 0xb8, 0xc9, 0x6d, 0x6a, 0x48, 0x62, 0xcb, 0x76, 0x8b, 0xfa, 0xca, 0x2f, 0xf0, 0x13, - 0x3c, 0xee, 0x37, 0xcc, 0xc3, 0xfc, 0x00, 0xbf, 0xc0, 0x87, 0x20, 0xdb, 0xe9, 0x34, 0x23, 0xa1, - 0xe5, 0x2d, 0xf7, 0xdc, 0xe3, 0xe3, 0xd3, 0x73, 0x7d, 0x0b, 0x60, 0x50, 0x9b, 0x54, 0x2a, 0x61, - 0x04, 0x0d, 0x1a, 0xc6, 0xdb, 0xf9, 0xba, 0xe2, 0x66, 0xb7, 0xdf, 0xa4, 0x85, 0x68, 0xb2, 0xe2, - 0x57, 0xb9, 0xfa, 0x6c, 0xb9, 0xcc, 0x5c, 0xbf, 0xb8, 0xad, 0xb0, 0xbd, 0xdd, 0x88, 0x26, 0x93, - 0xf5, 0xbe, 0xe2, 0x6d, 0x26, 0xa4, 0xe1, 0xa2, 0xd5, 0xd9, 0x46, 0x34, 0x5e, 0x61, 0xfe, 0x41, - 0x25, 0x44, 0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0xba, 0x20, 0x79, 0x0a, 0x43, 0x23, 0xde, 0x60, 0x13, 0x9f, 0xbb, 0x93, 0xc6, + 0x5e, 0x75, 0x63, 0x29, 0xea, 0x23, 0xe4, 0x19, 0x44, 0xde, 0x86, 0xe2, 0xb9, 0x89, 0x2f, 0x9c, + 0x6c, 0x9a, 0xfa, 0xa9, 0x4e, 0x0f, 0x8f, 0x26, 0xbd, 0x39, 0x3c, 0x1a, 0x7a, 0x14, 0xdb, 0x9d, + 0xde, 0x14, 0xbb, 0xf3, 0xf2, 0xff, 0x77, 0xde, 0x8b, 0xc9, 0xe7, 0x10, 0x31, 0x55, 0xb6, 0x35, + 0x36, 0x46, 0xc7, 0x8f, 0xdc, 0x08, 0xbe, 0x77, 0xbc, 0x40, 0xfa, 0xfc, 0x10, 0x7b, 0xd9, 0x18, + 0xb5, 0xa7, 0x47, 0xed, 0xf4, 0x0b, 0xb8, 0x7c, 0x18, 0x24, 0x13, 0x38, 0x79, 0x83, 0x7b, 0xef, + 0x32, 0xb5, 0x4b, 0xdb, 0xf2, 0x1d, 0xab, 0xda, 0xc3, 0xbc, 0x7b, 0xb0, 0x1a, 0x3c, 0x0b, 0x56, + 0x97, 0xb7, 0x77, 0x0b, 0x70, 0x33, 0x12, 0xb6, 0x1a, 0xd5, 0xfc, 0x7b, 0x18, 0xba, 0x56, 0x90, + 0x19, 0x8c, 0x59, 0x9e, 0xa3, 0xd6, 0x0e, 0x76, 0xbe, 0xf7, 0x29, 0xeb, 0x88, 0xc2, 0x8d, 0x42, + 0xbd, 0xf5, 0x12, 0xef, 0xfe, 0x03, 0xae, 0x37, 0x82, 0x08, 0x17, 0xaf, 0x95, 0xd8, 0xf1, 0x02, + 0x95, 0xbd, 0x90, 0x26, 0x09, 0x80, 0xec, 0x88, 0x57, 0x87, 0x91, 0x74, 0x72, 0x18, 0x24, 0x01, + 0xed, 0xc5, 0xc8, 0x0c, 0x46, 0xb6, 0xb6, 0x57, 0x85, 0x2f, 0xbf, 0xa7, 0xea, 0xf8, 0xe3, 0x31, + 0x57, 0x29, 0x44, 0xf7, 0x86, 0x93, 0x08, 0x86, 0xb2, 0x95, 0xbc, 0x9a, 0xbc, 0x43, 0xc6, 0x70, + 0x6a, 0x90, 0xe5, 0x5b, 0x54, 0x93, 0xc0, 0xf2, 0xac, 0xa8, 0x79, 0x33, 0x09, 0x97, 0x7f, 0x05, + 0x30, 0xb6, 0x1b, 0xbe, 0xe9, 0xde, 0xe3, 0x57, 0x00, 0x2f, 0x9c, 0x9b, 0xee, 0xb9, 0xf4, 0x3e, + 0x97, 0x29, 0xe9, 0x7d, 0x34, 0xdd, 0xe7, 0x35, 0x8f, 0x7f, 0xfb, 0xfb, 0x9f, 0xdf, 0x07, 0x64, + 0x7e, 0xe1, 0x3e, 0xbb, 0xdd, 0x27, 0x99, 0xad, 0x47, 0xaf, 0x82, 0x2b, 0xf2, 0x03, 0x5c, 0x7c, + 0xc7, 0x2a, 0x6e, 0xdd, 0xf5, 0xdd, 0xea, 0xcf, 0xd9, 0x7f, 0xe6, 0xfa, 0xd8, 0xe5, 0x7a, 0x3a, + 0x7f, 0xf2, 0x20, 0x57, 0xe6, 0x26, 0x32, 0xdb, 0x75, 0xb9, 0x56, 0xc1, 0xd5, 0x7a, 0xe4, 0x06, + 0xe9, 0xd3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xff, 0x85, 0x15, 0x15, 0x06, 0x00, 0x00, } diff --git a/test.proto b/test.proto index a4442da..e775b4f 100644 --- a/test.proto +++ b/test.proto @@ -85,6 +85,7 @@ message User { Token token = 12; google.protobuf.Timestamp createdAt = 13; google.protobuf.Timestamp updatedAt = 14; + map arguments = 15; // аргументы условия контракта } message Token {