wfz 3 years ago
parent
commit
f8ff03362c

+ 0 - 309
api/account/account.pb.go

@@ -1,309 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// 	protoc-gen-go v1.26.0-devel
-// 	protoc        v3.15.8
-// source: account.proto
-
-package account
-
-import (
-	_ "google.golang.org/genproto/googleapis/api/annotations"
-	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 DebugLoginRequest struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	AccountId string `protobuf:"bytes,1,opt,name=accountId,proto3" json:"accountId"`
-	Code      string `protobuf:"bytes,2,opt,name=code,proto3" json:"code"`
-}
-
-func (x *DebugLoginRequest) Reset() {
-	*x = DebugLoginRequest{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_account_proto_msgTypes[0]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *DebugLoginRequest) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DebugLoginRequest) ProtoMessage() {}
-
-func (x *DebugLoginRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_account_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 DebugLoginRequest.ProtoReflect.Descriptor instead.
-func (*DebugLoginRequest) Descriptor() ([]byte, []int) {
-	return file_account_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *DebugLoginRequest) GetAccountId() string {
-	if x != nil {
-		return x.AccountId
-	}
-	return ""
-}
-
-func (x *DebugLoginRequest) GetCode() string {
-	if x != nil {
-		return x.Code
-	}
-	return ""
-}
-
-type LoginRequest struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	JsCode string `protobuf:"bytes,1,opt,name=jsCode,proto3" json:"jsCode"`
-}
-
-func (x *LoginRequest) Reset() {
-	*x = LoginRequest{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_account_proto_msgTypes[1]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *LoginRequest) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*LoginRequest) ProtoMessage() {}
-
-func (x *LoginRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_account_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 LoginRequest.ProtoReflect.Descriptor instead.
-func (*LoginRequest) Descriptor() ([]byte, []int) {
-	return file_account_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *LoginRequest) GetJsCode() string {
-	if x != nil {
-		return x.JsCode
-	}
-	return ""
-}
-
-type LoginReply struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
-}
-
-func (x *LoginReply) Reset() {
-	*x = LoginReply{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_account_proto_msgTypes[2]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *LoginReply) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*LoginReply) ProtoMessage() {}
-
-func (x *LoginReply) ProtoReflect() protoreflect.Message {
-	mi := &file_account_proto_msgTypes[2]
-	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 LoginReply.ProtoReflect.Descriptor instead.
-func (*LoginReply) Descriptor() ([]byte, []int) {
-	return file_account_proto_rawDescGZIP(), []int{2}
-}
-
-func (x *LoginReply) GetToken() string {
-	if x != nil {
-		return x.Token
-	}
-	return ""
-}
-
-var File_account_proto protoreflect.FileDescriptor
-
-var file_account_proto_rawDesc = []byte{
-	0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
-	0x0b, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x1c, 0x67, 0x6f,
-	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
-	0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x11, 0x44, 0x65,
-	0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
-	0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a,
-	0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
-	0x65, 0x22, 0x26, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x4c, 0x6f, 0x67,
-	0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb4, 0x02,
-	0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x62,
-	0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c,
-	0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a,
-	0x10, 0x4d, 0x69, 0x6e, 0x69, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x4c, 0x6f, 0x67, 0x69,
-	0x6e, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e,
-	0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61,
-	0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f,
-	0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x5f, 0x70,
-	0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x3a, 0x01, 0x2a, 0x12, 0x59, 0x0a, 0x08, 0x57, 0x65, 0x62,
-	0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f,
-	0x75, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x4c,
-	0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02,
-	0x13, 0x22, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x77, 0x65,
-	0x62, 0x3a, 0x01, 0x2a, 0x42, 0x46, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f,
-	0x75, 0x6e, 0x74, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61,
-	0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d,
-	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x63, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
-	file_account_proto_rawDescOnce sync.Once
-	file_account_proto_rawDescData = file_account_proto_rawDesc
-)
-
-func file_account_proto_rawDescGZIP() []byte {
-	file_account_proto_rawDescOnce.Do(func() {
-		file_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_account_proto_rawDescData)
-	})
-	return file_account_proto_rawDescData
-}
-
-var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
-var file_account_proto_goTypes = []interface{}{
-	(*DebugLoginRequest)(nil), // 0: api.account.DebugLoginRequest
-	(*LoginRequest)(nil),      // 1: api.account.LoginRequest
-	(*LoginReply)(nil),        // 2: api.account.LoginReply
-}
-var file_account_proto_depIdxs = []int32{
-	0, // 0: api.account.Account.DebugLogin:input_type -> api.account.DebugLoginRequest
-	1, // 1: api.account.Account.MiniProgramLogin:input_type -> api.account.LoginRequest
-	1, // 2: api.account.Account.WebLogin:input_type -> api.account.LoginRequest
-	2, // 3: api.account.Account.DebugLogin:output_type -> api.account.LoginReply
-	2, // 4: api.account.Account.MiniProgramLogin:output_type -> api.account.LoginReply
-	2, // 5: api.account.Account.WebLogin:output_type -> api.account.LoginReply
-	3, // [3:6] is the sub-list for method output_type
-	0, // [0:3] 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_account_proto_init() }
-func file_account_proto_init() {
-	if File_account_proto != nil {
-		return
-	}
-	if !protoimpl.UnsafeEnabled {
-		file_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*DebugLoginRequest); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*LoginRequest); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_account_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*LoginReply); 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_account_proto_rawDesc,
-			NumEnums:      0,
-			NumMessages:   3,
-			NumExtensions: 0,
-			NumServices:   1,
-		},
-		GoTypes:           file_account_proto_goTypes,
-		DependencyIndexes: file_account_proto_depIdxs,
-		MessageInfos:      file_account_proto_msgTypes,
-	}.Build()
-	File_account_proto = out.File
-	file_account_proto_rawDesc = nil
-	file_account_proto_goTypes = nil
-	file_account_proto_depIdxs = nil
-}

+ 0 - 45
api/account/account.proto

@@ -1,45 +0,0 @@
-syntax = "proto3";
-
-package api.account;
-
-import "google/api/annotations.proto";
-//import "google/protobuf/struct.proto";
-//import "google/protobuf/empty.proto";
-
-option go_package = "git.ikuban.com/server/pw-protobuf/api/account;account";
-option java_multiple_files = true;
-option java_package = "api.account";
-
-service Account {
-  rpc DebugLogin (DebugLoginRequest) returns (LoginReply){
-    option (google.api.http) = {
-      post: "/api/login/debug",
-      body:"*"
-    };
-  };
-  rpc MiniProgramLogin (LoginRequest) returns (LoginReply){
-    option (google.api.http) = {
-      post: "/api/login/mini_program",
-      body:"*"
-    };
-  };
-  rpc WebLogin (LoginRequest) returns (LoginReply){
-    option (google.api.http) = {
-      post: "/api/login/web",
-      body:"*"
-    };
-  };
-}
-
-message DebugLoginRequest {
-  string accountId = 1;
-  string code = 2;
-}
-
-message LoginRequest {
-  string jsCode = 1;
-}
-
-message LoginReply {
-  string token = 1;
-}

+ 0 - 173
api/account/account_grpc.pb.go

@@ -1,173 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-
-package account
-
-import (
-	context "context"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
-
-// AccountClient is the client API for Account service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type AccountClient interface {
-	DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
-	MiniProgramLogin(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
-	WebLogin(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
-}
-
-type accountClient struct {
-	cc grpc.ClientConnInterface
-}
-
-func NewAccountClient(cc grpc.ClientConnInterface) AccountClient {
-	return &accountClient{cc}
-}
-
-func (c *accountClient) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
-	out := new(LoginReply)
-	err := c.cc.Invoke(ctx, "/api.account.Account/DebugLogin", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *accountClient) MiniProgramLogin(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
-	out := new(LoginReply)
-	err := c.cc.Invoke(ctx, "/api.account.Account/MiniProgramLogin", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *accountClient) WebLogin(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
-	out := new(LoginReply)
-	err := c.cc.Invoke(ctx, "/api.account.Account/WebLogin", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// AccountServer is the server API for Account service.
-// All implementations must embed UnimplementedAccountServer
-// for forward compatibility
-type AccountServer interface {
-	DebugLogin(context.Context, *DebugLoginRequest) (*LoginReply, error)
-	MiniProgramLogin(context.Context, *LoginRequest) (*LoginReply, error)
-	WebLogin(context.Context, *LoginRequest) (*LoginReply, error)
-	mustEmbedUnimplementedAccountServer()
-}
-
-// UnimplementedAccountServer must be embedded to have forward compatible implementations.
-type UnimplementedAccountServer struct {
-}
-
-func (UnimplementedAccountServer) DebugLogin(context.Context, *DebugLoginRequest) (*LoginReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DebugLogin not implemented")
-}
-func (UnimplementedAccountServer) MiniProgramLogin(context.Context, *LoginRequest) (*LoginReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method MiniProgramLogin not implemented")
-}
-func (UnimplementedAccountServer) WebLogin(context.Context, *LoginRequest) (*LoginReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method WebLogin not implemented")
-}
-func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
-
-// UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to AccountServer will
-// result in compilation errors.
-type UnsafeAccountServer interface {
-	mustEmbedUnimplementedAccountServer()
-}
-
-func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) {
-	s.RegisterService(&Account_ServiceDesc, srv)
-}
-
-func _Account_DebugLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DebugLoginRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(AccountServer).DebugLogin(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.account.Account/DebugLogin",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(AccountServer).DebugLogin(ctx, req.(*DebugLoginRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Account_MiniProgramLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(LoginRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(AccountServer).MiniProgramLogin(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.account.Account/MiniProgramLogin",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(AccountServer).MiniProgramLogin(ctx, req.(*LoginRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Account_WebLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(LoginRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(AccountServer).WebLogin(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.account.Account/WebLogin",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(AccountServer).WebLogin(ctx, req.(*LoginRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-// Account_ServiceDesc is the grpc.ServiceDesc for Account service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var Account_ServiceDesc = grpc.ServiceDesc{
-	ServiceName: "api.account.Account",
-	HandlerType: (*AccountServer)(nil),
-	Methods: []grpc.MethodDesc{
-		{
-			MethodName: "DebugLogin",
-			Handler:    _Account_DebugLogin_Handler,
-		},
-		{
-			MethodName: "MiniProgramLogin",
-			Handler:    _Account_MiniProgramLogin_Handler,
-		},
-		{
-			MethodName: "WebLogin",
-			Handler:    _Account_WebLogin_Handler,
-		},
-	},
-	Streams:  []grpc.StreamDesc{},
-	Metadata: "account.proto",
-}

+ 0 - 173
api/account/account_http.pb.go

@@ -1,173 +0,0 @@
-// Code generated by protoc-gen-go-http. DO NOT EDIT.
-// versions:
-// protoc-gen-go-http v2.0.0
-
-package account
-
-import (
-	context "context"
-	base "git.ikuban.com/server/base-protobuf/kuban/api/base"
-	reply "git.ikuban.com/server/kratos-utils/http/reply"
-	http "github.com/go-kratos/kratos/v2/transport/http"
-	binding "github.com/go-kratos/kratos/v2/transport/http/binding"
-	ioutil "io/ioutil"
-	time "time"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the kratos package it is being compiled against.
-var _ = new(context.Context)
-var _ = binding.EncodeURL
-var _ = ioutil.Discard
-var _ = new(time.Time)
-var _ = new(reply.SuccessReply)
-var _ = new(base.Html)
-
-const _ = http.SupportPackageIsVersion1
-
-type AccountHTTPServer interface {
-	DebugLogin(context.Context, *DebugLoginRequest) (*LoginReply, error)
-	MiniProgramLogin(context.Context, *LoginRequest) (*LoginReply, error)
-	WebLogin(context.Context, *LoginRequest) (*LoginReply, error)
-}
-
-func RegisterAccountHTTPServer(s *http.Server, srv AccountHTTPServer) {
-	r := s.Route("/")
-	r.POST("/api/login/debug", _Account_DebugLogin0_HTTP_Handler(srv))
-	r.POST("/api/login/mini_program", _Account_MiniProgramLogin0_HTTP_Handler(srv))
-	r.POST("/api/login/web", _Account_WebLogin0_HTTP_Handler(srv))
-}
-
-func _Account_DebugLogin0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
-	return func(ctx http.Context) error {
-		var in DebugLoginRequest
-		if err := ctx.Bind(&in); err != nil {
-			return err
-		}
-		if err := ctx.BindQuery(&in); err != nil {
-			return err
-		}
-		http.SetOperation(ctx, "/api.account.Account/DebugLogin")
-		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
-			return srv.DebugLogin(ctx, req.(*DebugLoginRequest))
-		})
-		out, err := h(ctx, &in)
-		if err != nil {
-			return err
-		}
-		success := &reply.SuccessReply{
-			Code: 0,
-		}
-		if out != nil {
-			success.Data = out
-		}
-		return ctx.Result(200, success)
-	}
-}
-
-func _Account_MiniProgramLogin0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
-	return func(ctx http.Context) error {
-		var in LoginRequest
-		if err := ctx.Bind(&in); err != nil {
-			return err
-		}
-		if err := ctx.BindQuery(&in); err != nil {
-			return err
-		}
-		http.SetOperation(ctx, "/api.account.Account/MiniProgramLogin")
-		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
-			return srv.MiniProgramLogin(ctx, req.(*LoginRequest))
-		})
-		out, err := h(ctx, &in)
-		if err != nil {
-			return err
-		}
-		success := &reply.SuccessReply{
-			Code: 0,
-		}
-		if out != nil {
-			success.Data = out
-		}
-		return ctx.Result(200, success)
-	}
-}
-
-func _Account_WebLogin0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
-	return func(ctx http.Context) error {
-		var in LoginRequest
-		if err := ctx.Bind(&in); err != nil {
-			return err
-		}
-		if err := ctx.BindQuery(&in); err != nil {
-			return err
-		}
-		http.SetOperation(ctx, "/api.account.Account/WebLogin")
-		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
-			return srv.WebLogin(ctx, req.(*LoginRequest))
-		})
-		out, err := h(ctx, &in)
-		if err != nil {
-			return err
-		}
-		success := &reply.SuccessReply{
-			Code: 0,
-		}
-		if out != nil {
-			success.Data = out
-		}
-		return ctx.Result(200, success)
-	}
-}
-
-type AccountHTTPClient interface {
-	DebugLogin(ctx context.Context, req *DebugLoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
-	MiniProgramLogin(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
-	WebLogin(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
-}
-
-type AccountHTTPClientImpl struct {
-	cc *http.Client
-}
-
-func NewAccountHTTPClient(client *http.Client) AccountHTTPClient {
-	return &AccountHTTPClientImpl{client}
-}
-
-func (c *AccountHTTPClientImpl) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...http.CallOption) (*LoginReply, error) {
-	var out LoginReply
-	pattern := "/api/login/debug"
-	path := binding.EncodeURL(pattern, in, false)
-	opts = append(opts, http.Operation("/api.account.Account/DebugLogin"))
-	opts = append(opts, http.PathTemplate(pattern))
-	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return &out, err
-}
-
-func (c *AccountHTTPClientImpl) MiniProgramLogin(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error) {
-	var out LoginReply
-	pattern := "/api/login/mini_program"
-	path := binding.EncodeURL(pattern, in, false)
-	opts = append(opts, http.Operation("/api.account.Account/MiniProgramLogin"))
-	opts = append(opts, http.PathTemplate(pattern))
-	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return &out, err
-}
-
-func (c *AccountHTTPClientImpl) WebLogin(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error) {
-	var out LoginReply
-	pattern := "/api/login/web"
-	path := binding.EncodeURL(pattern, in, false)
-	opts = append(opts, http.Operation("/api.account.Account/WebLogin"))
-	opts = append(opts, http.PathTemplate(pattern))
-	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return &out, err
-}

+ 0 - 19
client/account.go

@@ -1,19 +0,0 @@
-package client
-
-import (
-	"git.ikuban.com/server/kratos-nacos/registry"
-	"git.ikuban.com/server/pw-protobuf/api/account"
-	"github.com/go-kratos/kratos/v2/log"
-)
-
-func NewAccountClient(r *registry.Registry, logger log.Logger) account.AccountClient {
-	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-account")
-	if err != nil {
-		panic(err)
-	}
-	if conn == nil {
-		return nil
-	}
-	client := account.NewAccountClient(conn)
-	return client
-}

+ 19 - 0
client/user.go

@@ -0,0 +1,19 @@
+package client
+
+import (
+	"git.ikuban.com/server/kratos-nacos/registry"
+	"git.ikuban.com/server/pw-protobuf/api/user"
+	"github.com/go-kratos/kratos/v2/log"
+)
+
+func NewUserClient(r *registry.Registry, logger log.Logger) user.UserClient {
+	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-user")
+	if err != nil {
+		panic(err)
+	}
+	if conn == nil {
+		return nil
+	}
+	client := user.NewUserClient(conn)
+	return client
+}

+ 6 - 0
define/account.go

@@ -0,0 +1,6 @@
+package define
+
+var (
+	AccountLoginMiniProgram = "miniProgram" // 小程序登录
+	AccountLoginWeb         = "web"         // 网页登录
+)

+ 8 - 6
js/api/account/account_http_pb.ts

@@ -7,12 +7,14 @@ const AccountService = {
 	const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login/debug', req);
     return res.data;
   },
-  MiniProgramLogin: async (req?: LoginRequest) => {
-	const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login/mini_program', req);
-    return res.data;
-  },
-  WebLogin: async (req?: LoginRequest) => {
-	const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login/web', req);
+  /**   rpc MiniProgramLogin (LoginRequest) returns (LoginReply){
+//    option (google.api.http) = {
+//      post: "/api/login/mini_program",
+//      body:"*"
+//    };
+//  }; */
+  Login: async (req?: LoginRequest) => {
+	const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login', req);
     return res.data;
   },
 

+ 1 - 1
js/api/account/account_pb.ts

@@ -1,5 +1,5 @@
 export interface DebugLoginRequest{
-    accountId?:string;
+    userId?:string;
     code?:string;
 }
 export interface LoginRequest{