From 8408cf779f31c2d69644c30000801fee45f1ead4 Mon Sep 17 00:00:00 2001 From: oneao Date: Fri, 28 Nov 2025 22:41:37 +0800 Subject: [PATCH] u --- code/base-project/base-go-v3/.gitignore | 2 + .../biz/handler/login/login_service.go | 27 + .../biz/handler/register/register_service.go | 27 + .../base-go-v3/biz/model/api/api.pb.go | 667 ++++++++++++++++++ .../biz/model/auth/login/login.pb.go | 277 ++++++++ .../biz/model/auth/register/register.pb.go | 220 ++++++ .../base-go-v3/biz/router/login/login.go | 27 + .../base-go-v3/biz/router/login/middleware.go | 27 + .../base-go-v3/biz/router/register.go | 17 + .../biz/router/register/middleware.go | 27 + .../biz/router/register/register.go | 27 + .../base-go-v3/idl/auth/auth.proto | 42 ++ .../base-go-v3/idl/auth/login.proto | 5 +- .../base-go-v3/idl/auth/register.proto | 5 +- code/base-project/base-go-v3/main.go | 33 +- .../{biz/router => }/middleware/error.go | 0 .../{biz/router => }/middleware/jwt.go | 0 .../{biz/router => }/middleware/log.go | 0 code/base-project/base-go-v3/router.go | 1 - hz.txt | 2 + 20 files changed, 1400 insertions(+), 33 deletions(-) create mode 100644 code/base-project/base-go-v3/biz/handler/login/login_service.go create mode 100644 code/base-project/base-go-v3/biz/handler/register/register_service.go create mode 100644 code/base-project/base-go-v3/biz/model/api/api.pb.go create mode 100644 code/base-project/base-go-v3/biz/model/auth/login/login.pb.go create mode 100644 code/base-project/base-go-v3/biz/model/auth/register/register.pb.go create mode 100644 code/base-project/base-go-v3/biz/router/login/login.go create mode 100644 code/base-project/base-go-v3/biz/router/login/middleware.go create mode 100644 code/base-project/base-go-v3/biz/router/register.go create mode 100644 code/base-project/base-go-v3/biz/router/register/middleware.go create mode 100644 code/base-project/base-go-v3/biz/router/register/register.go create mode 100644 code/base-project/base-go-v3/idl/auth/auth.proto rename code/base-project/base-go-v3/{biz/router => }/middleware/error.go (100%) rename code/base-project/base-go-v3/{biz/router => }/middleware/jwt.go (100%) rename code/base-project/base-go-v3/{biz/router => }/middleware/log.go (100%) create mode 100644 hz.txt diff --git a/code/base-project/base-go-v3/.gitignore b/code/base-project/base-go-v3/.gitignore index 869d2763..101ea87c 100644 --- a/code/base-project/base-go-v3/.gitignore +++ b/code/base-project/base-go-v3/.gitignore @@ -11,6 +11,8 @@ _cgo_defun.c _cgo_gotypes.go _cgo_export.* _testmain.go +*.exe +*.exe~ *.test *.prof *.rar diff --git a/code/base-project/base-go-v3/biz/handler/login/login_service.go b/code/base-project/base-go-v3/biz/handler/login/login_service.go new file mode 100644 index 00000000..07c08faa --- /dev/null +++ b/code/base-project/base-go-v3/biz/handler/login/login_service.go @@ -0,0 +1,27 @@ +// Code generated by hertz generator. + +package login + +import ( + "context" + + login "cn/oneao/base-go/biz/model/auth/login" + "github.com/cloudwego/hertz/pkg/app" + "github.com/cloudwego/hertz/pkg/protocol/consts" +) + +// LoginDefault . +// @router /auth/login/default [POST] +func LoginDefault(ctx context.Context, c *app.RequestContext) { + var err error + var req login.LoginDefaultReq + err = c.BindAndValidate(&req) + if err != nil { + c.String(consts.StatusBadRequest, err.Error()) + return + } + + resp := new(login.LoginDefaultResp) + + c.JSON(consts.StatusOK, resp) +} diff --git a/code/base-project/base-go-v3/biz/handler/register/register_service.go b/code/base-project/base-go-v3/biz/handler/register/register_service.go new file mode 100644 index 00000000..556c692e --- /dev/null +++ b/code/base-project/base-go-v3/biz/handler/register/register_service.go @@ -0,0 +1,27 @@ +// Code generated by hertz generator. + +package register + +import ( + "context" + + register "cn/oneao/base-go/biz/model/auth/register" + "github.com/cloudwego/hertz/pkg/app" + "github.com/cloudwego/hertz/pkg/protocol/consts" +) + +// RegisterDefault . +// @router /auth/register/default [POST] +func RegisterDefault(ctx context.Context, c *app.RequestContext) { + var err error + var req register.RegisterDefaultReq + err = c.BindAndValidate(&req) + if err != nil { + c.String(consts.StatusBadRequest, err.Error()) + return + } + + resp := new(register.RegisterDefaultResp) + + c.JSON(consts.StatusOK, resp) +} diff --git a/code/base-project/base-go-v3/biz/model/api/api.pb.go b/code/base-project/base-go-v3/biz/model/api/api.pb.go new file mode 100644 index 00000000..37434df6 --- /dev/null +++ b/code/base-project/base-go-v3/biz/model/api/api.pb.go @@ -0,0 +1,667 @@ +// idl/api.proto; 注解拓展 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v6.33.1 +// source: api.proto + +package api + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_api_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50101, + Name: "api.raw_body", + Tag: "bytes,50101,opt,name=raw_body", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50102, + Name: "api.query", + Tag: "bytes,50102,opt,name=query", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50103, + Name: "api.header", + Tag: "bytes,50103,opt,name=header", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50104, + Name: "api.cookie", + Tag: "bytes,50104,opt,name=cookie", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50105, + Name: "api.body", + Tag: "bytes,50105,opt,name=body", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50106, + Name: "api.path", + Tag: "bytes,50106,opt,name=path", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50107, + Name: "api.vd", + Tag: "bytes,50107,opt,name=vd", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50108, + Name: "api.form", + Tag: "bytes,50108,opt,name=form", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50109, + Name: "api.js_conv", + Tag: "bytes,50109,opt,name=js_conv", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50110, + Name: "api.file_name", + Tag: "bytes,50110,opt,name=file_name", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50111, + Name: "api.none", + Tag: "bytes,50111,opt,name=none", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50131, + Name: "api.form_compatible", + Tag: "bytes,50131,opt,name=form_compatible", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50132, + Name: "api.js_conv_compatible", + Tag: "bytes,50132,opt,name=js_conv_compatible", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50133, + Name: "api.file_name_compatible", + Tag: "bytes,50133,opt,name=file_name_compatible", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50134, + Name: "api.none_compatible", + Tag: "bytes,50134,opt,name=none_compatible", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 51001, + Name: "api.go_tag", + Tag: "bytes,51001,opt,name=go_tag", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50201, + Name: "api.get", + Tag: "bytes,50201,opt,name=get", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50202, + Name: "api.post", + Tag: "bytes,50202,opt,name=post", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50203, + Name: "api.put", + Tag: "bytes,50203,opt,name=put", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50204, + Name: "api.delete", + Tag: "bytes,50204,opt,name=delete", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50205, + Name: "api.patch", + Tag: "bytes,50205,opt,name=patch", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50206, + Name: "api.options", + Tag: "bytes,50206,opt,name=options", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50207, + Name: "api.head", + Tag: "bytes,50207,opt,name=head", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50208, + Name: "api.any", + Tag: "bytes,50208,opt,name=any", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50301, + Name: "api.gen_path", + Tag: "bytes,50301,opt,name=gen_path", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50302, + Name: "api.api_version", + Tag: "bytes,50302,opt,name=api_version", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50303, + Name: "api.tag", + Tag: "bytes,50303,opt,name=tag", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50304, + Name: "api.name", + Tag: "bytes,50304,opt,name=name", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50305, + Name: "api.api_level", + Tag: "bytes,50305,opt,name=api_level", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50306, + Name: "api.serializer", + Tag: "bytes,50306,opt,name=serializer", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50307, + Name: "api.param", + Tag: "bytes,50307,opt,name=param", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50308, + Name: "api.baseurl", + Tag: "bytes,50308,opt,name=baseurl", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50309, + Name: "api.handler_path", + Tag: "bytes,50309,opt,name=handler_path", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50331, + Name: "api.handler_path_compatible", + Tag: "bytes,50331,opt,name=handler_path_compatible", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*int32)(nil), + Field: 50401, + Name: "api.http_code", + Tag: "varint,50401,opt,name=http_code", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50402, + Name: "api.base_domain", + Tag: "bytes,50402,opt,name=base_domain", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50731, + Name: "api.base_domain_compatible", + Tag: "bytes,50731,opt,name=base_domain_compatible", + Filename: "api.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50830, + Name: "api.reserve", + Tag: "bytes,50830,opt,name=reserve", + Filename: "api.proto", + }, +} + +// Extension fields to descriptorpb.FieldOptions. +var ( + // optional string raw_body = 50101; + E_RawBody = &file_api_proto_extTypes[0] + // optional string query = 50102; + E_Query = &file_api_proto_extTypes[1] + // optional string header = 50103; + E_Header = &file_api_proto_extTypes[2] + // optional string cookie = 50104; + E_Cookie = &file_api_proto_extTypes[3] + // optional string body = 50105; + E_Body = &file_api_proto_extTypes[4] + // optional string path = 50106; + E_Path = &file_api_proto_extTypes[5] + // optional string vd = 50107; + E_Vd = &file_api_proto_extTypes[6] + // optional string form = 50108; + E_Form = &file_api_proto_extTypes[7] + // optional string js_conv = 50109; + E_JsConv = &file_api_proto_extTypes[8] + // optional string file_name = 50110; + E_FileName = &file_api_proto_extTypes[9] + // optional string none = 50111; + E_None = &file_api_proto_extTypes[10] + // 50131~50160 used to extend field option by hz + // + // optional string form_compatible = 50131; + E_FormCompatible = &file_api_proto_extTypes[11] + // optional string js_conv_compatible = 50132; + E_JsConvCompatible = &file_api_proto_extTypes[12] + // optional string file_name_compatible = 50133; + E_FileNameCompatible = &file_api_proto_extTypes[13] + // optional string none_compatible = 50134; + E_NoneCompatible = &file_api_proto_extTypes[14] + // optional string go_tag = 51001; + E_GoTag = &file_api_proto_extTypes[15] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // optional string get = 50201; + E_Get = &file_api_proto_extTypes[16] + // optional string post = 50202; + E_Post = &file_api_proto_extTypes[17] + // optional string put = 50203; + E_Put = &file_api_proto_extTypes[18] + // optional string delete = 50204; + E_Delete = &file_api_proto_extTypes[19] + // optional string patch = 50205; + E_Patch = &file_api_proto_extTypes[20] + // optional string options = 50206; + E_Options = &file_api_proto_extTypes[21] + // optional string head = 50207; + E_Head = &file_api_proto_extTypes[22] + // optional string any = 50208; + E_Any = &file_api_proto_extTypes[23] + // optional string gen_path = 50301; + E_GenPath = &file_api_proto_extTypes[24] // The path specified by the user when the client code is generated, with a higher priority than api_version + // optional string api_version = 50302; + E_ApiVersion = &file_api_proto_extTypes[25] // Specify the value of the :version variable in path when the client code is generated + // optional string tag = 50303; + E_Tag = &file_api_proto_extTypes[26] // rpc tag, can be multiple, separated by commas + // optional string name = 50304; + E_Name = &file_api_proto_extTypes[27] // Name of rpc + // optional string api_level = 50305; + E_ApiLevel = &file_api_proto_extTypes[28] // Interface Level + // optional string serializer = 50306; + E_Serializer = &file_api_proto_extTypes[29] // Serialization method + // optional string param = 50307; + E_Param = &file_api_proto_extTypes[30] // Whether client requests take public parameters + // optional string baseurl = 50308; + E_Baseurl = &file_api_proto_extTypes[31] // Baseurl used in ttnet routing + // optional string handler_path = 50309; + E_HandlerPath = &file_api_proto_extTypes[32] // handler_path specifies the path to generate the method + // 50331~50360 used to extend method option by hz + // + // optional string handler_path_compatible = 50331; + E_HandlerPathCompatible = &file_api_proto_extTypes[33] // handler_path specifies the path to generate the method +) + +// Extension fields to descriptorpb.EnumValueOptions. +var ( + // optional int32 http_code = 50401; + E_HttpCode = &file_api_proto_extTypes[34] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // optional string base_domain = 50402; + E_BaseDomain = &file_api_proto_extTypes[35] + // 50731~50760 used to extend service option by hz + // + // optional string base_domain_compatible = 50731; + E_BaseDomainCompatible = &file_api_proto_extTypes[36] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // optional string reserve = 50830; + E_Reserve = &file_api_proto_extTypes[37] +) + +var File_api_proto protoreflect.FileDescriptor + +var file_api_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, + 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x3a, 0x3a, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0x87, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x3a, 0x35, + 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb6, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb7, + 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x37, + 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb8, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x3a, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb9, + 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x33, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0xba, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x3a, 0x2f, 0x0a, 0x02, 0x76, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xbb, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x76, 0x64, 0x3a, 0x33, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xbc, 0x87, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x38, 0x0a, 0x07, 0x6a, 0x73, 0x5f, 0x63, 0x6f, + 0x6e, 0x76, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0xbd, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x6e, + 0x76, 0x3a, 0x3c, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xbe, 0x87, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, + 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xbf, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x6f, 0x6e, 0x65, 0x3a, 0x48, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd3, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x3a, 0x4d, + 0x0a, 0x12, 0x6a, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, + 0x69, 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0xd4, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6a, 0x73, 0x43, + 0x6f, 0x6e, 0x76, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x3a, 0x51, 0x0a, + 0x14, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd5, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x66, 0x69, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, + 0x3a, 0x48, 0x0a, 0x0f, 0x6e, 0x6f, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, + 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0xd6, 0x87, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x6e, 0x65, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x3a, 0x36, 0x0a, 0x06, 0x67, 0x6f, + 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0xb9, 0x8e, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x6f, 0x54, + 0x61, 0x67, 0x3a, 0x32, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x88, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x65, 0x74, 0x3a, 0x34, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x1e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, + 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x32, 0x0a, 0x03, + 0x70, 0x75, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x75, 0x74, + 0x3a, 0x38, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x88, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x36, 0x0a, 0x05, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x9d, 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x3a, 0x3a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9e, 0x88, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x34, + 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9f, 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x65, 0x61, 0x64, 0x3a, 0x32, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa0, 0x88, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x3a, 0x3b, 0x0a, 0x08, 0x67, 0x65, 0x6e, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfd, 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x65, + 0x6e, 0x50, 0x61, 0x74, 0x68, 0x3a, 0x41, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfe, 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x32, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x12, + 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xff, 0x88, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x3a, 0x34, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x80, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x3a, 0x3d, 0x0a, 0x09, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x81, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x69, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x3a, 0x40, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, + 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x82, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x72, 0x3a, 0x36, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x1e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x83, 0x89, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x3a, 0x3a, 0x0a, 0x07, 0x62, + 0x61, 0x73, 0x65, 0x75, 0x72, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x84, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x62, 0x61, 0x73, 0x65, 0x75, 0x72, 0x6c, 0x3a, 0x43, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x85, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x74, 0x68, 0x3a, 0x58, 0x0a, 0x17, + 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x15, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6d, 0x70, + 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x3a, 0x40, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe1, 0x89, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x68, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x3a, 0x42, 0x0a, 0x0b, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe2, 0x89, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x3a, 0x57, 0x0a, 0x16, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xab, 0x8c, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x14, 0x62, 0x61, 0x73, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x61, + 0x74, 0x69, 0x62, 0x6c, 0x65, 0x3a, 0x3b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x8e, 0x8d, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x2f, 0x61, 0x70, 0x69, +} + +var file_api_proto_goTypes = []interface{}{ + (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions + (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions + (*descriptorpb.EnumValueOptions)(nil), // 2: google.protobuf.EnumValueOptions + (*descriptorpb.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions + (*descriptorpb.MessageOptions)(nil), // 4: google.protobuf.MessageOptions +} +var file_api_proto_depIdxs = []int32{ + 0, // 0: api.raw_body:extendee -> google.protobuf.FieldOptions + 0, // 1: api.query:extendee -> google.protobuf.FieldOptions + 0, // 2: api.header:extendee -> google.protobuf.FieldOptions + 0, // 3: api.cookie:extendee -> google.protobuf.FieldOptions + 0, // 4: api.body:extendee -> google.protobuf.FieldOptions + 0, // 5: api.path:extendee -> google.protobuf.FieldOptions + 0, // 6: api.vd:extendee -> google.protobuf.FieldOptions + 0, // 7: api.form:extendee -> google.protobuf.FieldOptions + 0, // 8: api.js_conv:extendee -> google.protobuf.FieldOptions + 0, // 9: api.file_name:extendee -> google.protobuf.FieldOptions + 0, // 10: api.none:extendee -> google.protobuf.FieldOptions + 0, // 11: api.form_compatible:extendee -> google.protobuf.FieldOptions + 0, // 12: api.js_conv_compatible:extendee -> google.protobuf.FieldOptions + 0, // 13: api.file_name_compatible:extendee -> google.protobuf.FieldOptions + 0, // 14: api.none_compatible:extendee -> google.protobuf.FieldOptions + 0, // 15: api.go_tag:extendee -> google.protobuf.FieldOptions + 1, // 16: api.get:extendee -> google.protobuf.MethodOptions + 1, // 17: api.post:extendee -> google.protobuf.MethodOptions + 1, // 18: api.put:extendee -> google.protobuf.MethodOptions + 1, // 19: api.delete:extendee -> google.protobuf.MethodOptions + 1, // 20: api.patch:extendee -> google.protobuf.MethodOptions + 1, // 21: api.options:extendee -> google.protobuf.MethodOptions + 1, // 22: api.head:extendee -> google.protobuf.MethodOptions + 1, // 23: api.any:extendee -> google.protobuf.MethodOptions + 1, // 24: api.gen_path:extendee -> google.protobuf.MethodOptions + 1, // 25: api.api_version:extendee -> google.protobuf.MethodOptions + 1, // 26: api.tag:extendee -> google.protobuf.MethodOptions + 1, // 27: api.name:extendee -> google.protobuf.MethodOptions + 1, // 28: api.api_level:extendee -> google.protobuf.MethodOptions + 1, // 29: api.serializer:extendee -> google.protobuf.MethodOptions + 1, // 30: api.param:extendee -> google.protobuf.MethodOptions + 1, // 31: api.baseurl:extendee -> google.protobuf.MethodOptions + 1, // 32: api.handler_path:extendee -> google.protobuf.MethodOptions + 1, // 33: api.handler_path_compatible:extendee -> google.protobuf.MethodOptions + 2, // 34: api.http_code:extendee -> google.protobuf.EnumValueOptions + 3, // 35: api.base_domain:extendee -> google.protobuf.ServiceOptions + 3, // 36: api.base_domain_compatible:extendee -> google.protobuf.ServiceOptions + 4, // 37: api.reserve:extendee -> google.protobuf.MessageOptions + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 0, // [0:38] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_proto_init() } +func file_api_proto_init() { + if File_api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 38, + NumServices: 0, + }, + GoTypes: file_api_proto_goTypes, + DependencyIndexes: file_api_proto_depIdxs, + ExtensionInfos: file_api_proto_extTypes, + }.Build() + File_api_proto = out.File + file_api_proto_rawDesc = nil + file_api_proto_goTypes = nil + file_api_proto_depIdxs = nil +} diff --git a/code/base-project/base-go-v3/biz/model/auth/login/login.pb.go b/code/base-project/base-go-v3/biz/model/auth/login/login.pb.go new file mode 100644 index 00000000..e25e9d0f --- /dev/null +++ b/code/base-project/base-go-v3/biz/model/auth/login/login.pb.go @@ -0,0 +1,277 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v6.33.1 +// source: login.proto + +package login + +import ( + _ "cn/oneao/base-go/biz/model/api" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LoginDefaultReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account string `protobuf:"bytes,1,opt,name=Account,proto3" form:"account" json:"account" vd:"$!=''"` + Password string `protobuf:"bytes,2,opt,name=Password,proto3" form:"password" json:"password" vd:"$!=''"` +} + +func (x *LoginDefaultReq) Reset() { + *x = LoginDefaultReq{} + if protoimpl.UnsafeEnabled { + mi := &file_login_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoginDefaultReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoginDefaultReq) ProtoMessage() {} + +func (x *LoginDefaultReq) ProtoReflect() protoreflect.Message { + mi := &file_login_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoginDefaultReq.ProtoReflect.Descriptor instead. +func (*LoginDefaultReq) Descriptor() ([]byte, []int) { + return file_login_proto_rawDescGZIP(), []int{0} +} + +func (x *LoginDefaultReq) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *LoginDefaultReq) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type LoginDefaultResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" form:"token" json:"token" query:"token"` + RefreshToken string `protobuf:"bytes,2,opt,name=refreshToken,proto3" form:"refreshToken" json:"refreshToken" query:"refreshToken"` + UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" form:"userId" json:"userId" query:"userId"` + Username string `protobuf:"bytes,4,opt,name=username,proto3" form:"username" json:"username" query:"username"` + SeqNo int64 `protobuf:"varint,5,opt,name=seqNo,proto3" form:"seqNo" json:"seqNo" query:"seqNo"` + Gender int64 `protobuf:"varint,6,opt,name=gender,proto3" form:"gender" json:"gender" query:"gender"` +} + +func (x *LoginDefaultResp) Reset() { + *x = LoginDefaultResp{} + if protoimpl.UnsafeEnabled { + mi := &file_login_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoginDefaultResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoginDefaultResp) ProtoMessage() {} + +func (x *LoginDefaultResp) ProtoReflect() protoreflect.Message { + mi := &file_login_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoginDefaultResp.ProtoReflect.Descriptor instead. +func (*LoginDefaultResp) Descriptor() ([]byte, []int) { + return file_login_proto_rawDescGZIP(), []int{1} +} + +func (x *LoginDefaultResp) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *LoginDefaultResp) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *LoginDefaultResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *LoginDefaultResp) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *LoginDefaultResp) GetSeqNo() int64 { + if x != nil { + return x.SeqNo + } + return 0 +} + +func (x *LoginDefaultResp) GetGender() int64 { + if x != nil { + return x.Gender + } + return 0 +} + +var File_login_proto protoreflect.FileDescriptor + +var file_login_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x61, + 0x75, 0x74, 0x68, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, + 0x0a, 0x0f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x71, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x14, 0xca, 0xbb, 0x18, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xda, + 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d, 0x27, 0x27, 0x52, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x31, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x15, 0xca, 0xbb, 0x18, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0xda, 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d, 0x27, 0x27, 0x52, 0x08, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x22, 0xae, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x65, 0x71, 0x4e, 0x6f, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x16, 0x0a, + 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x32, 0x66, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x17, 0xd2, 0xc1, 0x18, 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x27, 0x5a, + 0x25, 0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, + 0x6f, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_login_proto_rawDescOnce sync.Once + file_login_proto_rawDescData = file_login_proto_rawDesc +) + +func file_login_proto_rawDescGZIP() []byte { + file_login_proto_rawDescOnce.Do(func() { + file_login_proto_rawDescData = protoimpl.X.CompressGZIP(file_login_proto_rawDescData) + }) + return file_login_proto_rawDescData +} + +var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_login_proto_goTypes = []interface{}{ + (*LoginDefaultReq)(nil), // 0: auth.LoginDefaultReq + (*LoginDefaultResp)(nil), // 1: auth.LoginDefaultResp +} +var file_login_proto_depIdxs = []int32{ + 0, // 0: auth.LoginService.LoginDefault:input_type -> auth.LoginDefaultReq + 1, // 1: auth.LoginService.LoginDefault:output_type -> auth.LoginDefaultResp + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_login_proto_init() } +func file_login_proto_init() { + if File_login_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_login_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginDefaultReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_login_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginDefaultResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_login_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_login_proto_goTypes, + DependencyIndexes: file_login_proto_depIdxs, + MessageInfos: file_login_proto_msgTypes, + }.Build() + File_login_proto = out.File + file_login_proto_rawDesc = nil + file_login_proto_goTypes = nil + file_login_proto_depIdxs = nil +} diff --git a/code/base-project/base-go-v3/biz/model/auth/register/register.pb.go b/code/base-project/base-go-v3/biz/model/auth/register/register.pb.go new file mode 100644 index 00000000..215867b1 --- /dev/null +++ b/code/base-project/base-go-v3/biz/model/auth/register/register.pb.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v6.33.1 +// source: register.proto + +package register + +import ( + _ "cn/oneao/base-go/biz/model/api" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterDefaultReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account string `protobuf:"bytes,1,opt,name=Account,proto3" form:"account" json:"account" vd:"$!=''"` + Password string `protobuf:"bytes,2,opt,name=Password,proto3" form:"password" json:"password" vd:"$!=''"` +} + +func (x *RegisterDefaultReq) Reset() { + *x = RegisterDefaultReq{} + if protoimpl.UnsafeEnabled { + mi := &file_register_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterDefaultReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterDefaultReq) ProtoMessage() {} + +func (x *RegisterDefaultReq) ProtoReflect() protoreflect.Message { + mi := &file_register_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterDefaultReq.ProtoReflect.Descriptor instead. +func (*RegisterDefaultReq) Descriptor() ([]byte, []int) { + return file_register_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterDefaultReq) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *RegisterDefaultReq) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type RegisterDefaultResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RegisterDefaultResp) Reset() { + *x = RegisterDefaultResp{} + if protoimpl.UnsafeEnabled { + mi := &file_register_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterDefaultResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterDefaultResp) ProtoMessage() {} + +func (x *RegisterDefaultResp) ProtoReflect() protoreflect.Message { + mi := &file_register_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterDefaultResp.ProtoReflect.Descriptor instead. +func (*RegisterDefaultResp) Descriptor() ([]byte, []int) { + return file_register_proto_rawDescGZIP(), []int{1} +} + +var File_register_proto protoreflect.FileDescriptor + +var file_register_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x04, 0x61, 0x75, 0x74, 0x68, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x77, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xca, 0xbb, 0x18, 0x07, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xda, 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d, 0x27, 0x27, 0x52, 0x07, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xca, 0xbb, 0x18, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0xda, 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d, 0x27, 0x27, + 0x52, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x32, 0x75, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1a, 0xd2, 0xc1, + 0x18, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6e, 0x2f, 0x6f, + 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x7a, + 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_register_proto_rawDescOnce sync.Once + file_register_proto_rawDescData = file_register_proto_rawDesc +) + +func file_register_proto_rawDescGZIP() []byte { + file_register_proto_rawDescOnce.Do(func() { + file_register_proto_rawDescData = protoimpl.X.CompressGZIP(file_register_proto_rawDescData) + }) + return file_register_proto_rawDescData +} + +var file_register_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_register_proto_goTypes = []interface{}{ + (*RegisterDefaultReq)(nil), // 0: auth.RegisterDefaultReq + (*RegisterDefaultResp)(nil), // 1: auth.RegisterDefaultResp +} +var file_register_proto_depIdxs = []int32{ + 0, // 0: auth.RegisterService.RegisterDefault:input_type -> auth.RegisterDefaultReq + 1, // 1: auth.RegisterService.RegisterDefault:output_type -> auth.RegisterDefaultResp + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_register_proto_init() } +func file_register_proto_init() { + if File_register_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_register_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterDefaultReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_register_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterDefaultResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_register_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_register_proto_goTypes, + DependencyIndexes: file_register_proto_depIdxs, + MessageInfos: file_register_proto_msgTypes, + }.Build() + File_register_proto = out.File + file_register_proto_rawDesc = nil + file_register_proto_goTypes = nil + file_register_proto_depIdxs = nil +} diff --git a/code/base-project/base-go-v3/biz/router/login/login.go b/code/base-project/base-go-v3/biz/router/login/login.go new file mode 100644 index 00000000..2bc01680 --- /dev/null +++ b/code/base-project/base-go-v3/biz/router/login/login.go @@ -0,0 +1,27 @@ +// Code generated by hertz generator. DO NOT EDIT. + +package login + +import ( + login "cn/oneao/base-go/biz/handler/login" + "github.com/cloudwego/hertz/pkg/app/server" +) + +/* + This file will register all the routes of the services in the master idl. + And it will update automatically when you use the "update" command for the idl. + So don't modify the contents of the file, or your code will be deleted when it is updated. +*/ + +// Register register routes based on the IDL 'api.${HTTP Method}' annotation. +func Register(r *server.Hertz) { + + root := r.Group("/", rootMw()...) + { + _auth := root.Group("/auth", _authMw()...) + { + _login := _auth.Group("/login", _loginMw()...) + _login.POST("/default", append(_logindefaultMw(), login.LoginDefault)...) + } + } +} diff --git a/code/base-project/base-go-v3/biz/router/login/middleware.go b/code/base-project/base-go-v3/biz/router/login/middleware.go new file mode 100644 index 00000000..22d105ca --- /dev/null +++ b/code/base-project/base-go-v3/biz/router/login/middleware.go @@ -0,0 +1,27 @@ +// Code generated by hertz generator. + +package login + +import ( + "github.com/cloudwego/hertz/pkg/app" +) + +func rootMw() []app.HandlerFunc { + // your code... + return nil +} + +func _authMw() []app.HandlerFunc { + // your code... + return nil +} + +func _loginMw() []app.HandlerFunc { + // your code... + return nil +} + +func _logindefaultMw() []app.HandlerFunc { + // your code... + return nil +} diff --git a/code/base-project/base-go-v3/biz/router/register.go b/code/base-project/base-go-v3/biz/router/register.go new file mode 100644 index 00000000..ecbab561 --- /dev/null +++ b/code/base-project/base-go-v3/biz/router/register.go @@ -0,0 +1,17 @@ +// Code generated by hertz generator. DO NOT EDIT. + +package router + +import ( + login "cn/oneao/base-go/biz/router/login" + register "cn/oneao/base-go/biz/router/register" + "github.com/cloudwego/hertz/pkg/app/server" +) + +// GeneratedRegister registers routers generated by IDL. +func GeneratedRegister(r *server.Hertz) { + //INSERT_POINT: DO NOT DELETE THIS LINE! + register.Register(r) + + login.Register(r) +} diff --git a/code/base-project/base-go-v3/biz/router/register/middleware.go b/code/base-project/base-go-v3/biz/router/register/middleware.go new file mode 100644 index 00000000..7891cd8b --- /dev/null +++ b/code/base-project/base-go-v3/biz/router/register/middleware.go @@ -0,0 +1,27 @@ +// Code generated by hertz generator. + +package register + +import ( + "github.com/cloudwego/hertz/pkg/app" +) + +func rootMw() []app.HandlerFunc { + // your code... + return nil +} + +func _authMw() []app.HandlerFunc { + // your code... + return nil +} + +func _registerMw() []app.HandlerFunc { + // your code... + return nil +} + +func _registerdefaultMw() []app.HandlerFunc { + // your code... + return nil +} diff --git a/code/base-project/base-go-v3/biz/router/register/register.go b/code/base-project/base-go-v3/biz/router/register/register.go new file mode 100644 index 00000000..95c2f421 --- /dev/null +++ b/code/base-project/base-go-v3/biz/router/register/register.go @@ -0,0 +1,27 @@ +// Code generated by hertz generator. DO NOT EDIT. + +package register + +import ( + register "cn/oneao/base-go/biz/handler/register" + "github.com/cloudwego/hertz/pkg/app/server" +) + +/* + This file will register all the routes of the services in the master idl. + And it will update automatically when you use the "update" command for the idl. + So don't modify the contents of the file, or your code will be deleted when it is updated. +*/ + +// Register register routes based on the IDL 'api.${HTTP Method}' annotation. +func Register(r *server.Hertz) { + + root := r.Group("/", rootMw()...) + { + _auth := root.Group("/auth", _authMw()...) + { + _register := _auth.Group("/register", _registerMw()...) + _register.POST("/default", append(_registerdefaultMw(), register.RegisterDefault)...) + } + } +} diff --git a/code/base-project/base-go-v3/idl/auth/auth.proto b/code/base-project/base-go-v3/idl/auth/auth.proto new file mode 100644 index 00000000..bce6d304 --- /dev/null +++ b/code/base-project/base-go-v3/idl/auth/auth.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package auth; + +option go_package = "auth"; + +import "api.proto"; + +message LoginDefaultReq { + string Account = 1[(api.body)="account",(api.vd)="$!=''"]; + string Password = 2[(api.body)="password",(api.vd)="$!=''"]; +} + +message LoginDefaultResp { + string token = 1; + string refreshToken = 2; + int64 userId = 3; + string username = 4; + int64 seqNo = 5; + int64 gender = 6; +} + +message RegisterDefaultReq { + string Account = 1[(api.body)="account",(api.vd)="$!=''"]; + string Password = 2[(api.body)="password",(api.vd)="$!=''"]; +} + +message RegisterDefaultResp { + +} + +service LoginService { + rpc LoginDefault(LoginDefaultReq) returns(LoginDefaultResp) { + option (api.post) = "/auth/login/default"; + } +} + +service RegisterService { + rpc RegisterDefault(RegisterDefaultReq) returns(RegisterDefaultResp) { + option (api.post) = "/auth/register/default"; + } +} diff --git a/code/base-project/base-go-v3/idl/auth/login.proto b/code/base-project/base-go-v3/idl/auth/login.proto index 58ae8471..a31f5a39 100644 --- a/code/base-project/base-go-v3/idl/auth/login.proto +++ b/code/base-project/base-go-v3/idl/auth/login.proto @@ -1,6 +1,8 @@ syntax = "proto3"; -option go_package = "auth"; +package auth; + +option go_package = "auth/login"; import "api.proto"; @@ -23,3 +25,4 @@ service LoginService { option (api.post) = "/auth/login/default"; } } + diff --git a/code/base-project/base-go-v3/idl/auth/register.proto b/code/base-project/base-go-v3/idl/auth/register.proto index b4fc588e..57d668bf 100644 --- a/code/base-project/base-go-v3/idl/auth/register.proto +++ b/code/base-project/base-go-v3/idl/auth/register.proto @@ -1,9 +1,12 @@ syntax = "proto3"; -option go_package = "auth"; +package auth; + +option go_package = "auth/register"; import "api.proto"; + message RegisterDefaultReq { string Account = 1[(api.body)="account",(api.vd)="$!=''"]; string Password = 2[(api.body)="password",(api.vd)="$!=''"]; diff --git a/code/base-project/base-go-v3/main.go b/code/base-project/base-go-v3/main.go index a4227814..4cbc294c 100644 --- a/code/base-project/base-go-v3/main.go +++ b/code/base-project/base-go-v3/main.go @@ -1,40 +1,13 @@ +// Code generated by hertz generator. + package main import ( - "cn/oneao/base-go/biz/router/middleware" - "cn/oneao/base-go/config" - "cn/oneao/base-go/db" - "cn/oneao/base-go/logx" - "cn/oneao/base-go/utils/idgen" - "fmt" - "github.com/cloudwego/hertz/pkg/app/server" - "github.com/hertz-contrib/requestid" ) func main() { - // 初始化雪花id - options := idgen.NewIdGeneratorOptions(config.App.Snowflake.WorkerID) - idgen.SetIdGenerator(options) - - // 初始化数据库 - err := db.InitDB() - if err != nil { - fmt.Println(err) - return - } - - // 日志 - logx.InitLog() - - h := server.Default( - server.WithBasePath(config.App.Server.BaseUrl), - server.WithHostPorts(config.App.Server.Port), - ) - - // 全局中间件 - h.Use(requestid.New()) - h.Use(middleware.Log()) + h := server.Default() register(h) h.Spin() diff --git a/code/base-project/base-go-v3/biz/router/middleware/error.go b/code/base-project/base-go-v3/middleware/error.go similarity index 100% rename from code/base-project/base-go-v3/biz/router/middleware/error.go rename to code/base-project/base-go-v3/middleware/error.go diff --git a/code/base-project/base-go-v3/biz/router/middleware/jwt.go b/code/base-project/base-go-v3/middleware/jwt.go similarity index 100% rename from code/base-project/base-go-v3/biz/router/middleware/jwt.go rename to code/base-project/base-go-v3/middleware/jwt.go diff --git a/code/base-project/base-go-v3/biz/router/middleware/log.go b/code/base-project/base-go-v3/middleware/log.go similarity index 100% rename from code/base-project/base-go-v3/biz/router/middleware/log.go rename to code/base-project/base-go-v3/middleware/log.go diff --git a/code/base-project/base-go-v3/router.go b/code/base-project/base-go-v3/router.go index b45f223f..969e1cbb 100644 --- a/code/base-project/base-go-v3/router.go +++ b/code/base-project/base-go-v3/router.go @@ -4,7 +4,6 @@ package main import ( handler "cn/oneao/base-go/biz/handler" - "github.com/cloudwego/hertz/pkg/app/server" ) diff --git a/hz.txt b/hz.txt new file mode 100644 index 00000000..4e939fda --- /dev/null +++ b/hz.txt @@ -0,0 +1,2 @@ + hz update --idl=idl/auth.proto --unset_omitempty + hz update -I idl -idl .\idl\auth\auth.proto --unset_omitempty \ No newline at end of file