Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ac5fca6795 | |||
| 6598207411 | |||
| 1a1abef074 | 
| @@ -1,281 +0,0 @@ | |||||||
| // Code generated by protoc-gen-connect-go. DO NOT EDIT. |  | ||||||
| // |  | ||||||
| // Source: account/v1/account.proto |  | ||||||
|  |  | ||||||
| package accountv1connect |  | ||||||
|  |  | ||||||
| import ( |  | ||||||
| 	connect "connectrpc.com/connect" |  | ||||||
| 	context "context" |  | ||||||
| 	errors "errors" |  | ||||||
| 	v1 "git.shenxianhe.cn/shenxianhe/sdk/account/v1" |  | ||||||
| 	http "net/http" |  | ||||||
| 	strings "strings" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // This is a compile-time assertion to ensure that this generated file and the connect package are |  | ||||||
| // compatible. If you get a compiler error that this constant is not defined, this code was |  | ||||||
| // generated with a version of connect newer than the one compiled into your binary. You can fix the |  | ||||||
| // problem by either regenerating this code with an older version of connect or updating the connect |  | ||||||
| // version compiled into your binary. |  | ||||||
| const _ = connect.IsAtLeastVersion1_13_0 |  | ||||||
|  |  | ||||||
| const ( |  | ||||||
| 	// AccountServiceName is the fully-qualified name of the AccountService service. |  | ||||||
| 	AccountServiceName = "account.v1.AccountService" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // These constants are the fully-qualified names of the RPCs defined in this package. They're |  | ||||||
| // exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. |  | ||||||
| // |  | ||||||
| // Note that these are different from the fully-qualified method names used by |  | ||||||
| // google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to |  | ||||||
| // reflection-formatted method names, remove the leading slash and convert the remaining slash to a |  | ||||||
| // period. |  | ||||||
| const ( |  | ||||||
| 	// AccountServiceSendCredentialProcedure is the fully-qualified name of the AccountService's |  | ||||||
| 	// SendCredential RPC. |  | ||||||
| 	AccountServiceSendCredentialProcedure = "/account.v1.AccountService/SendCredential" |  | ||||||
| 	// AccountServiceAuthProcedure is the fully-qualified name of the AccountService's Auth RPC. |  | ||||||
| 	AccountServiceAuthProcedure = "/account.v1.AccountService/Auth" |  | ||||||
| 	// AccountServiceSetPasswordProcedure is the fully-qualified name of the AccountService's |  | ||||||
| 	// SetPassword RPC. |  | ||||||
| 	AccountServiceSetPasswordProcedure = "/account.v1.AccountService/SetPassword" |  | ||||||
| 	// AccountServiceSetNameProcedure is the fully-qualified name of the AccountService's SetName RPC. |  | ||||||
| 	AccountServiceSetNameProcedure = "/account.v1.AccountService/SetName" |  | ||||||
| 	// AccountServiceGetAvatarUploadURLProcedure is the fully-qualified name of the AccountService's |  | ||||||
| 	// GetAvatarUploadURL RPC. |  | ||||||
| 	AccountServiceGetAvatarUploadURLProcedure = "/account.v1.AccountService/GetAvatarUploadURL" |  | ||||||
| 	// AccountServiceSetAvatarProcedure is the fully-qualified name of the AccountService's SetAvatar |  | ||||||
| 	// RPC. |  | ||||||
| 	AccountServiceSetAvatarProcedure = "/account.v1.AccountService/SetAvatar" |  | ||||||
| 	// AccountServiceGetUserInfoProcedure is the fully-qualified name of the AccountService's |  | ||||||
| 	// GetUserInfo RPC. |  | ||||||
| 	AccountServiceGetUserInfoProcedure = "/account.v1.AccountService/GetUserInfo" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // AccountServiceClient is a client for the account.v1.AccountService service. |  | ||||||
| type AccountServiceClient interface { |  | ||||||
| 	SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) |  | ||||||
| 	Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) |  | ||||||
| 	SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) |  | ||||||
| 	SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) |  | ||||||
| 	GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) |  | ||||||
| 	SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) |  | ||||||
| 	GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // NewAccountServiceClient constructs a client for the account.v1.AccountService service. By |  | ||||||
| // default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, |  | ||||||
| // and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the |  | ||||||
| // connect.WithGRPC() or connect.WithGRPCWeb() options. |  | ||||||
| // |  | ||||||
| // The URL supplied here should be the base URL for the Connect or gRPC server (for example, |  | ||||||
| // http://api.acme.com or https://acme.com/grpc). |  | ||||||
| func NewAccountServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AccountServiceClient { |  | ||||||
| 	baseURL = strings.TrimRight(baseURL, "/") |  | ||||||
| 	accountServiceMethods := v1.File_account_v1_account_proto.Services().ByName("AccountService").Methods() |  | ||||||
| 	return &accountServiceClient{ |  | ||||||
| 		sendCredential: connect.NewClient[v1.SendCredentialRequest, v1.SendCredentialResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceSendCredentialProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("SendCredential")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		auth: connect.NewClient[v1.AuthRequest, v1.AuthResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceAuthProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("Auth")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		setPassword: connect.NewClient[v1.SetPasswordRequest, v1.SetPasswordResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceSetPasswordProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("SetPassword")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		setName: connect.NewClient[v1.SetNameRequest, v1.SetNameResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceSetNameProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("SetName")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		getAvatarUploadURL: connect.NewClient[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceGetAvatarUploadURLProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("GetAvatarUploadURL")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		setAvatar: connect.NewClient[v1.SetAvatarRequest, v1.SetAvatarResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceSetAvatarProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("SetAvatar")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		getUserInfo: connect.NewClient[v1.GetUserInfoRequest, v1.GetUserInfoResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+AccountServiceGetUserInfoProcedure, |  | ||||||
| 			connect.WithSchema(accountServiceMethods.ByName("GetUserInfo")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // accountServiceClient implements AccountServiceClient. |  | ||||||
| type accountServiceClient struct { |  | ||||||
| 	sendCredential     *connect.Client[v1.SendCredentialRequest, v1.SendCredentialResponse] |  | ||||||
| 	auth               *connect.Client[v1.AuthRequest, v1.AuthResponse] |  | ||||||
| 	setPassword        *connect.Client[v1.SetPasswordRequest, v1.SetPasswordResponse] |  | ||||||
| 	setName            *connect.Client[v1.SetNameRequest, v1.SetNameResponse] |  | ||||||
| 	getAvatarUploadURL *connect.Client[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse] |  | ||||||
| 	setAvatar          *connect.Client[v1.SetAvatarRequest, v1.SetAvatarResponse] |  | ||||||
| 	getUserInfo        *connect.Client[v1.GetUserInfoRequest, v1.GetUserInfoResponse] |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // SendCredential calls account.v1.AccountService.SendCredential. |  | ||||||
| func (c *accountServiceClient) SendCredential(ctx context.Context, req *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) { |  | ||||||
| 	return c.sendCredential.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // Auth calls account.v1.AccountService.Auth. |  | ||||||
| func (c *accountServiceClient) Auth(ctx context.Context, req *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) { |  | ||||||
| 	return c.auth.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // SetPassword calls account.v1.AccountService.SetPassword. |  | ||||||
| func (c *accountServiceClient) SetPassword(ctx context.Context, req *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) { |  | ||||||
| 	return c.setPassword.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // SetName calls account.v1.AccountService.SetName. |  | ||||||
| func (c *accountServiceClient) SetName(ctx context.Context, req *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) { |  | ||||||
| 	return c.setName.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // GetAvatarUploadURL calls account.v1.AccountService.GetAvatarUploadURL. |  | ||||||
| func (c *accountServiceClient) GetAvatarUploadURL(ctx context.Context, req *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) { |  | ||||||
| 	return c.getAvatarUploadURL.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // SetAvatar calls account.v1.AccountService.SetAvatar. |  | ||||||
| func (c *accountServiceClient) SetAvatar(ctx context.Context, req *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) { |  | ||||||
| 	return c.setAvatar.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // GetUserInfo calls account.v1.AccountService.GetUserInfo. |  | ||||||
| func (c *accountServiceClient) GetUserInfo(ctx context.Context, req *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) { |  | ||||||
| 	return c.getUserInfo.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // AccountServiceHandler is an implementation of the account.v1.AccountService service. |  | ||||||
| type AccountServiceHandler interface { |  | ||||||
| 	SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) |  | ||||||
| 	Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) |  | ||||||
| 	SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) |  | ||||||
| 	SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) |  | ||||||
| 	GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) |  | ||||||
| 	SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) |  | ||||||
| 	GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // NewAccountServiceHandler builds an HTTP handler from the service implementation. It returns the |  | ||||||
| // path on which to mount the handler and the handler itself. |  | ||||||
| // |  | ||||||
| // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf |  | ||||||
| // and JSON codecs. They also support gzip compression. |  | ||||||
| func NewAccountServiceHandler(svc AccountServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { |  | ||||||
| 	accountServiceMethods := v1.File_account_v1_account_proto.Services().ByName("AccountService").Methods() |  | ||||||
| 	accountServiceSendCredentialHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceSendCredentialProcedure, |  | ||||||
| 		svc.SendCredential, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("SendCredential")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	accountServiceAuthHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceAuthProcedure, |  | ||||||
| 		svc.Auth, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("Auth")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	accountServiceSetPasswordHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceSetPasswordProcedure, |  | ||||||
| 		svc.SetPassword, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("SetPassword")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	accountServiceSetNameHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceSetNameProcedure, |  | ||||||
| 		svc.SetName, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("SetName")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	accountServiceGetAvatarUploadURLHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceGetAvatarUploadURLProcedure, |  | ||||||
| 		svc.GetAvatarUploadURL, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("GetAvatarUploadURL")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	accountServiceSetAvatarHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceSetAvatarProcedure, |  | ||||||
| 		svc.SetAvatar, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("SetAvatar")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	accountServiceGetUserInfoHandler := connect.NewUnaryHandler( |  | ||||||
| 		AccountServiceGetUserInfoProcedure, |  | ||||||
| 		svc.GetUserInfo, |  | ||||||
| 		connect.WithSchema(accountServiceMethods.ByName("GetUserInfo")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	return "/account.v1.AccountService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |  | ||||||
| 		switch r.URL.Path { |  | ||||||
| 		case AccountServiceSendCredentialProcedure: |  | ||||||
| 			accountServiceSendCredentialHandler.ServeHTTP(w, r) |  | ||||||
| 		case AccountServiceAuthProcedure: |  | ||||||
| 			accountServiceAuthHandler.ServeHTTP(w, r) |  | ||||||
| 		case AccountServiceSetPasswordProcedure: |  | ||||||
| 			accountServiceSetPasswordHandler.ServeHTTP(w, r) |  | ||||||
| 		case AccountServiceSetNameProcedure: |  | ||||||
| 			accountServiceSetNameHandler.ServeHTTP(w, r) |  | ||||||
| 		case AccountServiceGetAvatarUploadURLProcedure: |  | ||||||
| 			accountServiceGetAvatarUploadURLHandler.ServeHTTP(w, r) |  | ||||||
| 		case AccountServiceSetAvatarProcedure: |  | ||||||
| 			accountServiceSetAvatarHandler.ServeHTTP(w, r) |  | ||||||
| 		case AccountServiceGetUserInfoProcedure: |  | ||||||
| 			accountServiceGetUserInfoHandler.ServeHTTP(w, r) |  | ||||||
| 		default: |  | ||||||
| 			http.NotFound(w, r) |  | ||||||
| 		} |  | ||||||
| 	}) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // UnimplementedAccountServiceHandler returns CodeUnimplemented from all methods. |  | ||||||
| type UnimplementedAccountServiceHandler struct{} |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.SendCredential is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.Auth is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.SetPassword is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.SetName is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.GetAvatarUploadURL is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.SetAvatar is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedAccountServiceHandler) GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.GetUserInfo is not implemented")) |  | ||||||
| } |  | ||||||
							
								
								
									
										166
									
								
								admin/v1/adminv1connect/service.connect.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										166
									
								
								admin/v1/adminv1connect/service.connect.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,166 @@ | |||||||
|  | // Code generated by protoc-gen-connect-go. DO NOT EDIT. | ||||||
|  | // | ||||||
|  | // Source: admin/v1/service.proto | ||||||
|  |  | ||||||
|  | package adminv1connect | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	connect "connectrpc.com/connect" | ||||||
|  | 	context "context" | ||||||
|  | 	errors "errors" | ||||||
|  | 	v1 "git.shenxianhe.cn/shenxianhe/sdk/admin/v1" | ||||||
|  | 	http "net/http" | ||||||
|  | 	strings "strings" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // This is a compile-time assertion to ensure that this generated file and the connect package are | ||||||
|  | // compatible. If you get a compiler error that this constant is not defined, this code was | ||||||
|  | // generated with a version of connect newer than the one compiled into your binary. You can fix the | ||||||
|  | // problem by either regenerating this code with an older version of connect or updating the connect | ||||||
|  | // version compiled into your binary. | ||||||
|  | const _ = connect.IsAtLeastVersion1_13_0 | ||||||
|  |  | ||||||
|  | const ( | ||||||
|  | 	// AdminServiceName is the fully-qualified name of the AdminService service. | ||||||
|  | 	AdminServiceName = "admin.v1.AdminService" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // These constants are the fully-qualified names of the RPCs defined in this package. They're | ||||||
|  | // exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. | ||||||
|  | // | ||||||
|  | // Note that these are different from the fully-qualified method names used by | ||||||
|  | // google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to | ||||||
|  | // reflection-formatted method names, remove the leading slash and convert the remaining slash to a | ||||||
|  | // period. | ||||||
|  | const ( | ||||||
|  | 	// AdminServiceListSMSSignProcedure is the fully-qualified name of the AdminService's ListSMSSign | ||||||
|  | 	// RPC. | ||||||
|  | 	AdminServiceListSMSSignProcedure = "/admin.v1.AdminService/ListSMSSign" | ||||||
|  | 	// AdminServiceSendSMSProcedure is the fully-qualified name of the AdminService's SendSMS RPC. | ||||||
|  | 	AdminServiceSendSMSProcedure = "/admin.v1.AdminService/SendSMS" | ||||||
|  | 	// AdminServiceGetUserInfoProcedure is the fully-qualified name of the AdminService's GetUserInfo | ||||||
|  | 	// RPC. | ||||||
|  | 	AdminServiceGetUserInfoProcedure = "/admin.v1.AdminService/GetUserInfo" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // AdminServiceClient is a client for the admin.v1.AdminService service. | ||||||
|  | type AdminServiceClient interface { | ||||||
|  | 	ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) | ||||||
|  | 	SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) | ||||||
|  | 	GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // NewAdminServiceClient constructs a client for the admin.v1.AdminService service. By default, it | ||||||
|  | // uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends | ||||||
|  | // uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or | ||||||
|  | // connect.WithGRPCWeb() options. | ||||||
|  | // | ||||||
|  | // The URL supplied here should be the base URL for the Connect or gRPC server (for example, | ||||||
|  | // http://api.acme.com or https://acme.com/grpc). | ||||||
|  | func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AdminServiceClient { | ||||||
|  | 	baseURL = strings.TrimRight(baseURL, "/") | ||||||
|  | 	adminServiceMethods := v1.File_admin_v1_service_proto.Services().ByName("AdminService").Methods() | ||||||
|  | 	return &adminServiceClient{ | ||||||
|  | 		listSMSSign: connect.NewClient[v1.ListSMSSignRequest, v1.ListSMSSignResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+AdminServiceListSMSSignProcedure, | ||||||
|  | 			connect.WithSchema(adminServiceMethods.ByName("ListSMSSign")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		sendSMS: connect.NewClient[v1.SendSMSRequest, v1.SendSMSResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+AdminServiceSendSMSProcedure, | ||||||
|  | 			connect.WithSchema(adminServiceMethods.ByName("SendSMS")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		getUserInfo: connect.NewClient[v1.GetUserInfoRequest, v1.GetUserInfoResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+AdminServiceGetUserInfoProcedure, | ||||||
|  | 			connect.WithSchema(adminServiceMethods.ByName("GetUserInfo")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // adminServiceClient implements AdminServiceClient. | ||||||
|  | type adminServiceClient struct { | ||||||
|  | 	listSMSSign *connect.Client[v1.ListSMSSignRequest, v1.ListSMSSignResponse] | ||||||
|  | 	sendSMS     *connect.Client[v1.SendSMSRequest, v1.SendSMSResponse] | ||||||
|  | 	getUserInfo *connect.Client[v1.GetUserInfoRequest, v1.GetUserInfoResponse] | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // ListSMSSign calls admin.v1.AdminService.ListSMSSign. | ||||||
|  | func (c *adminServiceClient) ListSMSSign(ctx context.Context, req *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) { | ||||||
|  | 	return c.listSMSSign.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // SendSMS calls admin.v1.AdminService.SendSMS. | ||||||
|  | func (c *adminServiceClient) SendSMS(ctx context.Context, req *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) { | ||||||
|  | 	return c.sendSMS.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // GetUserInfo calls admin.v1.AdminService.GetUserInfo. | ||||||
|  | func (c *adminServiceClient) GetUserInfo(ctx context.Context, req *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) { | ||||||
|  | 	return c.getUserInfo.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // AdminServiceHandler is an implementation of the admin.v1.AdminService service. | ||||||
|  | type AdminServiceHandler interface { | ||||||
|  | 	ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) | ||||||
|  | 	SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) | ||||||
|  | 	GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the | ||||||
|  | // path on which to mount the handler and the handler itself. | ||||||
|  | // | ||||||
|  | // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf | ||||||
|  | // and JSON codecs. They also support gzip compression. | ||||||
|  | func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { | ||||||
|  | 	adminServiceMethods := v1.File_admin_v1_service_proto.Services().ByName("AdminService").Methods() | ||||||
|  | 	adminServiceListSMSSignHandler := connect.NewUnaryHandler( | ||||||
|  | 		AdminServiceListSMSSignProcedure, | ||||||
|  | 		svc.ListSMSSign, | ||||||
|  | 		connect.WithSchema(adminServiceMethods.ByName("ListSMSSign")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	adminServiceSendSMSHandler := connect.NewUnaryHandler( | ||||||
|  | 		AdminServiceSendSMSProcedure, | ||||||
|  | 		svc.SendSMS, | ||||||
|  | 		connect.WithSchema(adminServiceMethods.ByName("SendSMS")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	adminServiceGetUserInfoHandler := connect.NewUnaryHandler( | ||||||
|  | 		AdminServiceGetUserInfoProcedure, | ||||||
|  | 		svc.GetUserInfo, | ||||||
|  | 		connect.WithSchema(adminServiceMethods.ByName("GetUserInfo")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	return "/admin.v1.AdminService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||||||
|  | 		switch r.URL.Path { | ||||||
|  | 		case AdminServiceListSMSSignProcedure: | ||||||
|  | 			adminServiceListSMSSignHandler.ServeHTTP(w, r) | ||||||
|  | 		case AdminServiceSendSMSProcedure: | ||||||
|  | 			adminServiceSendSMSHandler.ServeHTTP(w, r) | ||||||
|  | 		case AdminServiceGetUserInfoProcedure: | ||||||
|  | 			adminServiceGetUserInfoHandler.ServeHTTP(w, r) | ||||||
|  | 		default: | ||||||
|  | 			http.NotFound(w, r) | ||||||
|  | 		} | ||||||
|  | 	}) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods. | ||||||
|  | type UnimplementedAdminServiceHandler struct{} | ||||||
|  |  | ||||||
|  | func (UnimplementedAdminServiceHandler) ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.ListSMSSign is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedAdminServiceHandler) SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.SendSMS is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedAdminServiceHandler) GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetUserInfo is not implemented")) | ||||||
|  | } | ||||||
							
								
								
									
										78
									
								
								admin/v1/service.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								admin/v1/service.pb.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,78 @@ | |||||||
|  | // Code generated by protoc-gen-go. DO NOT EDIT. | ||||||
|  | // versions: | ||||||
|  | // 	protoc-gen-go v1.36.7 | ||||||
|  | // 	protoc        (unknown) | ||||||
|  | // source: admin/v1/service.proto | ||||||
|  |  | ||||||
|  | package adminv1 | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
|  | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
|  | 	reflect "reflect" | ||||||
|  | 	unsafe "unsafe" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | 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_admin_v1_service_proto protoreflect.FileDescriptor | ||||||
|  |  | ||||||
|  | const file_admin_v1_service_proto_rawDesc = "" + | ||||||
|  | 	"\n" + | ||||||
|  | 	"\x16admin/v1/service.proto\x12\badmin.v1\x1a\x12admin/v1/sms.proto\x1a\x13admin/v1/user.proto2\xe6\x01\n" + | ||||||
|  | 	"\fAdminService\x12J\n" + | ||||||
|  | 	"\vListSMSSign\x12\x1c.admin.v1.ListSMSSignRequest\x1a\x1d.admin.v1.ListSMSSignResponse\x12>\n" + | ||||||
|  | 	"\aSendSMS\x12\x18.admin.v1.SendSMSRequest\x1a\x19.admin.v1.SendSMSResponse\x12J\n" + | ||||||
|  | 	"\vGetUserInfo\x12\x1c.admin.v1.GetUserInfoRequest\x1a\x1d.admin.v1.GetUserInfoResponseB3Z1git.shenxianhe.cn/shenxianhe/sdk/admin/v1;adminv1b\x06proto3" | ||||||
|  |  | ||||||
|  | var file_admin_v1_service_proto_goTypes = []any{ | ||||||
|  | 	(*ListSMSSignRequest)(nil),  // 0: admin.v1.ListSMSSignRequest | ||||||
|  | 	(*SendSMSRequest)(nil),      // 1: admin.v1.SendSMSRequest | ||||||
|  | 	(*GetUserInfoRequest)(nil),  // 2: admin.v1.GetUserInfoRequest | ||||||
|  | 	(*ListSMSSignResponse)(nil), // 3: admin.v1.ListSMSSignResponse | ||||||
|  | 	(*SendSMSResponse)(nil),     // 4: admin.v1.SendSMSResponse | ||||||
|  | 	(*GetUserInfoResponse)(nil), // 5: admin.v1.GetUserInfoResponse | ||||||
|  | } | ||||||
|  | var file_admin_v1_service_proto_depIdxs = []int32{ | ||||||
|  | 	0, // 0: admin.v1.AdminService.ListSMSSign:input_type -> admin.v1.ListSMSSignRequest | ||||||
|  | 	1, // 1: admin.v1.AdminService.SendSMS:input_type -> admin.v1.SendSMSRequest | ||||||
|  | 	2, // 2: admin.v1.AdminService.GetUserInfo:input_type -> admin.v1.GetUserInfoRequest | ||||||
|  | 	3, // 3: admin.v1.AdminService.ListSMSSign:output_type -> admin.v1.ListSMSSignResponse | ||||||
|  | 	4, // 4: admin.v1.AdminService.SendSMS:output_type -> admin.v1.SendSMSResponse | ||||||
|  | 	5, // 5: admin.v1.AdminService.GetUserInfo:output_type -> admin.v1.GetUserInfoResponse | ||||||
|  | 	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_admin_v1_service_proto_init() } | ||||||
|  | func file_admin_v1_service_proto_init() { | ||||||
|  | 	if File_admin_v1_service_proto != nil { | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 	file_admin_v1_sms_proto_init() | ||||||
|  | 	file_admin_v1_user_proto_init() | ||||||
|  | 	type x struct{} | ||||||
|  | 	out := protoimpl.TypeBuilder{ | ||||||
|  | 		File: protoimpl.DescBuilder{ | ||||||
|  | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
|  | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_admin_v1_service_proto_rawDesc), len(file_admin_v1_service_proto_rawDesc)), | ||||||
|  | 			NumEnums:      0, | ||||||
|  | 			NumMessages:   0, | ||||||
|  | 			NumExtensions: 0, | ||||||
|  | 			NumServices:   1, | ||||||
|  | 		}, | ||||||
|  | 		GoTypes:           file_admin_v1_service_proto_goTypes, | ||||||
|  | 		DependencyIndexes: file_admin_v1_service_proto_depIdxs, | ||||||
|  | 	}.Build() | ||||||
|  | 	File_admin_v1_service_proto = out.File | ||||||
|  | 	file_admin_v1_service_proto_goTypes = nil | ||||||
|  | 	file_admin_v1_service_proto_depIdxs = nil | ||||||
|  | } | ||||||
| @@ -2,11 +2,12 @@ | |||||||
| // versions: | // versions: | ||||||
| // 	protoc-gen-go v1.36.7 | // 	protoc-gen-go v1.36.7 | ||||||
| // 	protoc        (unknown) | // 	protoc        (unknown) | ||||||
| // source: notification/v1/notification.proto | // source: admin/v1/sms.proto | ||||||
| 
 | 
 | ||||||
| package notificationv1 | package adminv1 | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	v1 "git.shenxianhe.cn/shenxianhe/sdk/enums/v1" | ||||||
| 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
| 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
| 	reflect "reflect" | 	reflect "reflect" | ||||||
| @@ -21,61 +22,6 @@ const ( | |||||||
| 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type SMSSignStatus int32 |  | ||||||
| 
 |  | ||||||
| const ( |  | ||||||
| 	SMSSignStatus_SMS_SIGN_STATUS_UNSPECIFIED SMSSignStatus = 0 |  | ||||||
| 	SMSSignStatus_SMS_SIGN_STATUS_APPLYING    SMSSignStatus = 1 // 审核中 |  | ||||||
| 	SMSSignStatus_SMS_SIGN_STATUS_PASSED      SMSSignStatus = 2 // 审核通过 |  | ||||||
| 	SMSSignStatus_SMS_SIGN_STATUS_REJECTED    SMSSignStatus = 3 // 审核拒绝 |  | ||||||
| 	SMSSignStatus_SMS_SIGN_STATUS_CANCELED    SMSSignStatus = 4 // 已取消 |  | ||||||
| ) |  | ||||||
| 
 |  | ||||||
| // Enum value maps for SMSSignStatus. |  | ||||||
| var ( |  | ||||||
| 	SMSSignStatus_name = map[int32]string{ |  | ||||||
| 		0: "SMS_SIGN_STATUS_UNSPECIFIED", |  | ||||||
| 		1: "SMS_SIGN_STATUS_APPLYING", |  | ||||||
| 		2: "SMS_SIGN_STATUS_PASSED", |  | ||||||
| 		3: "SMS_SIGN_STATUS_REJECTED", |  | ||||||
| 		4: "SMS_SIGN_STATUS_CANCELED", |  | ||||||
| 	} |  | ||||||
| 	SMSSignStatus_value = map[string]int32{ |  | ||||||
| 		"SMS_SIGN_STATUS_UNSPECIFIED": 0, |  | ||||||
| 		"SMS_SIGN_STATUS_APPLYING":    1, |  | ||||||
| 		"SMS_SIGN_STATUS_PASSED":      2, |  | ||||||
| 		"SMS_SIGN_STATUS_REJECTED":    3, |  | ||||||
| 		"SMS_SIGN_STATUS_CANCELED":    4, |  | ||||||
| 	} |  | ||||||
| ) |  | ||||||
| 
 |  | ||||||
| func (x SMSSignStatus) Enum() *SMSSignStatus { |  | ||||||
| 	p := new(SMSSignStatus) |  | ||||||
| 	*p = x |  | ||||||
| 	return p |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (x SMSSignStatus) String() string { |  | ||||||
| 	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (SMSSignStatus) Descriptor() protoreflect.EnumDescriptor { |  | ||||||
| 	return file_notification_v1_notification_proto_enumTypes[0].Descriptor() |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (SMSSignStatus) Type() protoreflect.EnumType { |  | ||||||
| 	return &file_notification_v1_notification_proto_enumTypes[0] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (x SMSSignStatus) Number() protoreflect.EnumNumber { |  | ||||||
| 	return protoreflect.EnumNumber(x) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // Deprecated: Use SMSSignStatus.Descriptor instead. |  | ||||||
| func (SMSSignStatus) EnumDescriptor() ([]byte, []int) { |  | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{0} |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| type SendSMSRequest struct { | type SendSMSRequest struct { | ||||||
| 	state          protoimpl.MessageState `protogen:"open.v1"` | 	state          protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	Phone          string                 `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` | 	Phone          string                 `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` | ||||||
| @@ -88,7 +34,7 @@ type SendSMSRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *SendSMSRequest) Reset() { | func (x *SendSMSRequest) Reset() { | ||||||
| 	*x = SendSMSRequest{} | 	*x = SendSMSRequest{} | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[0] | 	mi := &file_admin_v1_sms_proto_msgTypes[0] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -100,7 +46,7 @@ func (x *SendSMSRequest) String() string { | |||||||
| func (*SendSMSRequest) ProtoMessage() {} | func (*SendSMSRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SendSMSRequest) ProtoReflect() protoreflect.Message { | func (x *SendSMSRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[0] | 	mi := &file_admin_v1_sms_proto_msgTypes[0] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -113,7 +59,7 @@ func (x *SendSMSRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SendSMSRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use SendSMSRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*SendSMSRequest) Descriptor() ([]byte, []int) { | func (*SendSMSRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{0} | 	return file_admin_v1_sms_proto_rawDescGZIP(), []int{0} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SendSMSRequest) GetPhone() string { | func (x *SendSMSRequest) GetPhone() string { | ||||||
| @@ -152,7 +98,7 @@ type SendSMSResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *SendSMSResponse) Reset() { | func (x *SendSMSResponse) Reset() { | ||||||
| 	*x = SendSMSResponse{} | 	*x = SendSMSResponse{} | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[1] | 	mi := &file_admin_v1_sms_proto_msgTypes[1] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -164,7 +110,7 @@ func (x *SendSMSResponse) String() string { | |||||||
| func (*SendSMSResponse) ProtoMessage() {} | func (*SendSMSResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SendSMSResponse) ProtoReflect() protoreflect.Message { | func (x *SendSMSResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[1] | 	mi := &file_admin_v1_sms_proto_msgTypes[1] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -177,7 +123,7 @@ func (x *SendSMSResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SendSMSResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use SendSMSResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*SendSMSResponse) Descriptor() ([]byte, []int) { | func (*SendSMSResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{1} | 	return file_admin_v1_sms_proto_rawDescGZIP(), []int{1} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type ListSMSSignRequest struct { | type ListSMSSignRequest struct { | ||||||
| @@ -189,7 +135,7 @@ type ListSMSSignRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *ListSMSSignRequest) Reset() { | func (x *ListSMSSignRequest) Reset() { | ||||||
| 	*x = ListSMSSignRequest{} | 	*x = ListSMSSignRequest{} | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[2] | 	mi := &file_admin_v1_sms_proto_msgTypes[2] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -201,7 +147,7 @@ func (x *ListSMSSignRequest) String() string { | |||||||
| func (*ListSMSSignRequest) ProtoMessage() {} | func (*ListSMSSignRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *ListSMSSignRequest) ProtoReflect() protoreflect.Message { | func (x *ListSMSSignRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[2] | 	mi := &file_admin_v1_sms_proto_msgTypes[2] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -214,7 +160,7 @@ func (x *ListSMSSignRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use ListSMSSignRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use ListSMSSignRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*ListSMSSignRequest) Descriptor() ([]byte, []int) { | func (*ListSMSSignRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{2} | 	return file_admin_v1_sms_proto_rawDescGZIP(), []int{2} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *ListSMSSignRequest) GetOffset() int32 { | func (x *ListSMSSignRequest) GetOffset() int32 { | ||||||
| @@ -235,7 +181,7 @@ type SMSSignReason struct { | |||||||
| 
 | 
 | ||||||
| func (x *SMSSignReason) Reset() { | func (x *SMSSignReason) Reset() { | ||||||
| 	*x = SMSSignReason{} | 	*x = SMSSignReason{} | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[3] | 	mi := &file_admin_v1_sms_proto_msgTypes[3] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -247,7 +193,7 @@ func (x *SMSSignReason) String() string { | |||||||
| func (*SMSSignReason) ProtoMessage() {} | func (*SMSSignReason) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SMSSignReason) ProtoReflect() protoreflect.Message { | func (x *SMSSignReason) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[3] | 	mi := &file_admin_v1_sms_proto_msgTypes[3] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -260,7 +206,7 @@ func (x *SMSSignReason) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SMSSignReason.ProtoReflect.Descriptor instead. | // Deprecated: Use SMSSignReason.ProtoReflect.Descriptor instead. | ||||||
| func (*SMSSignReason) Descriptor() ([]byte, []int) { | func (*SMSSignReason) Descriptor() ([]byte, []int) { | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{3} | 	return file_admin_v1_sms_proto_rawDescGZIP(), []int{3} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SMSSignReason) GetContent() string { | func (x *SMSSignReason) GetContent() string { | ||||||
| @@ -288,7 +234,7 @@ type SMSSign struct { | |||||||
| 	state         protoimpl.MessageState `protogen:"open.v1"` | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	Id            string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                      // 签名ID | 	Id            string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                      // 签名ID | ||||||
| 	Name          string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                  // 签名名称 | 	Name          string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                  // 签名名称 | ||||||
| 	Status        SMSSignStatus          `protobuf:"varint,3,opt,name=status,proto3,enum=notification.v1.SMSSignStatus" json:"status,omitempty"` // 签名状态 | 	Status        v1.SMSSignStatus       `protobuf:"varint,3,opt,name=status,proto3,enum=enums.v1.SMSSignStatus" json:"status,omitempty"` // 签名状态 | ||||||
| 	Type          string                 `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`                                  // 签名类型 | 	Type          string                 `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`                                  // 签名类型 | ||||||
| 	Reasons       *SMSSignReason         `protobuf:"bytes,5,opt,name=reasons,proto3" json:"reasons,omitempty"`                            // 签名拒绝原因 | 	Reasons       *SMSSignReason         `protobuf:"bytes,5,opt,name=reasons,proto3" json:"reasons,omitempty"`                            // 签名拒绝原因 | ||||||
| 	CreatedAt     int32                  `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`      // 创建时间 | 	CreatedAt     int32                  `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`      // 创建时间 | ||||||
| @@ -298,7 +244,7 @@ type SMSSign struct { | |||||||
| 
 | 
 | ||||||
| func (x *SMSSign) Reset() { | func (x *SMSSign) Reset() { | ||||||
| 	*x = SMSSign{} | 	*x = SMSSign{} | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[4] | 	mi := &file_admin_v1_sms_proto_msgTypes[4] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -310,7 +256,7 @@ func (x *SMSSign) String() string { | |||||||
| func (*SMSSign) ProtoMessage() {} | func (*SMSSign) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SMSSign) ProtoReflect() protoreflect.Message { | func (x *SMSSign) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[4] | 	mi := &file_admin_v1_sms_proto_msgTypes[4] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -323,7 +269,7 @@ func (x *SMSSign) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SMSSign.ProtoReflect.Descriptor instead. | // Deprecated: Use SMSSign.ProtoReflect.Descriptor instead. | ||||||
| func (*SMSSign) Descriptor() ([]byte, []int) { | func (*SMSSign) Descriptor() ([]byte, []int) { | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{4} | 	return file_admin_v1_sms_proto_rawDescGZIP(), []int{4} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SMSSign) GetId() string { | func (x *SMSSign) GetId() string { | ||||||
| @@ -340,11 +286,11 @@ func (x *SMSSign) GetName() string { | |||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SMSSign) GetStatus() SMSSignStatus { | func (x *SMSSign) GetStatus() v1.SMSSignStatus { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.Status | 		return x.Status | ||||||
| 	} | 	} | ||||||
| 	return SMSSignStatus_SMS_SIGN_STATUS_UNSPECIFIED | 	return v1.SMSSignStatus(0) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SMSSign) GetType() string { | func (x *SMSSign) GetType() string { | ||||||
| @@ -378,7 +324,7 @@ type ListSMSSignResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *ListSMSSignResponse) Reset() { | func (x *ListSMSSignResponse) Reset() { | ||||||
| 	*x = ListSMSSignResponse{} | 	*x = ListSMSSignResponse{} | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[5] | 	mi := &file_admin_v1_sms_proto_msgTypes[5] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -390,7 +336,7 @@ func (x *ListSMSSignResponse) String() string { | |||||||
| func (*ListSMSSignResponse) ProtoMessage() {} | func (*ListSMSSignResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *ListSMSSignResponse) ProtoReflect() protoreflect.Message { | func (x *ListSMSSignResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_notification_v1_notification_proto_msgTypes[5] | 	mi := &file_admin_v1_sms_proto_msgTypes[5] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -403,7 +349,7 @@ func (x *ListSMSSignResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use ListSMSSignResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use ListSMSSignResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*ListSMSSignResponse) Descriptor() ([]byte, []int) { | func (*ListSMSSignResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_notification_v1_notification_proto_rawDescGZIP(), []int{5} | 	return file_admin_v1_sms_proto_rawDescGZIP(), []int{5} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *ListSMSSignResponse) GetList() []*SMSSign { | func (x *ListSMSSignResponse) GetList() []*SMSSign { | ||||||
| @@ -420,16 +366,16 @@ func (x *ListSMSSignResponse) GetCount() int32 { | |||||||
| 	return 0 | 	return 0 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var File_notification_v1_notification_proto protoreflect.FileDescriptor | var File_admin_v1_sms_proto protoreflect.FileDescriptor | ||||||
| 
 | 
 | ||||||
| const file_notification_v1_notification_proto_rawDesc = "" + | const file_admin_v1_sms_proto_rawDesc = "" + | ||||||
| 	"\n" + | 	"\n" + | ||||||
| 	"\"notification/v1/notification.proto\x12\x0fnotification.v1\"\x89\x02\n" + | 	"\x12admin/v1/sms.proto\x12\badmin.v1\x1a\x12enums/v1/sms.proto\"\x82\x02\n" + | ||||||
| 	"\x0eSendSMSRequest\x12\x14\n" + | 	"\x0eSendSMSRequest\x12\x14\n" + | ||||||
| 	"\x05phone\x18\x01 \x01(\tR\x05phone\x12\x1b\n" + | 	"\x05phone\x18\x01 \x01(\tR\x05phone\x12\x1b\n" + | ||||||
| 	"\tsign_name\x18\x02 \x01(\tR\bsignName\x12#\n" + | 	"\tsign_name\x18\x02 \x01(\tR\bsignName\x12#\n" + | ||||||
| 	"\rtemplate_code\x18\x03 \x01(\tR\ftemplateCode\x12\\\n" + | 	"\rtemplate_code\x18\x03 \x01(\tR\ftemplateCode\x12U\n" + | ||||||
| 	"\x0ftemplate_params\x18\x04 \x03(\v23.notification.v1.SendSMSRequest.TemplateParamsEntryR\x0etemplateParams\x1aA\n" + | 	"\x0ftemplate_params\x18\x04 \x03(\v2,.admin.v1.SendSMSRequest.TemplateParamsEntryR\x0etemplateParams\x1aA\n" + | ||||||
| 	"\x13TemplateParamsEntry\x12\x10\n" + | 	"\x13TemplateParamsEntry\x12\x10\n" + | ||||||
| 	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + | 	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + | ||||||
| 	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x11\n" + | 	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x11\n" + | ||||||
| @@ -440,89 +386,74 @@ const file_notification_v1_notification_proto_rawDesc = "" + | |||||||
| 	"\acontent\x18\x01 \x01(\tR\acontent\x12\x1f\n" + | 	"\acontent\x18\x01 \x01(\tR\acontent\x12\x1f\n" + | ||||||
| 	"\vsub_content\x18\x02 \x01(\tR\n" + | 	"\vsub_content\x18\x02 \x01(\tR\n" + | ||||||
| 	"subContent\x12\x1b\n" + | 	"subContent\x12\x1b\n" + | ||||||
| 	"\tcreate_at\x18\x03 \x01(\x05R\bcreateAt\"\xd2\x01\n" + | 	"\tcreate_at\x18\x03 \x01(\x05R\bcreateAt\"\xc4\x01\n" + | ||||||
| 	"\aSMSSign\x12\x0e\n" + | 	"\aSMSSign\x12\x0e\n" + | ||||||
| 	"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + | 	"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + | ||||||
| 	"\x04name\x18\x02 \x01(\tR\x04name\x126\n" + | 	"\x04name\x18\x02 \x01(\tR\x04name\x12/\n" + | ||||||
| 	"\x06status\x18\x03 \x01(\x0e2\x1e.notification.v1.SMSSignStatusR\x06status\x12\x12\n" + | 	"\x06status\x18\x03 \x01(\x0e2\x17.enums.v1.SMSSignStatusR\x06status\x12\x12\n" + | ||||||
| 	"\x04type\x18\x04 \x01(\tR\x04type\x128\n" + | 	"\x04type\x18\x04 \x01(\tR\x04type\x121\n" + | ||||||
| 	"\areasons\x18\x05 \x01(\v2\x1e.notification.v1.SMSSignReasonR\areasons\x12\x1d\n" + | 	"\areasons\x18\x05 \x01(\v2\x17.admin.v1.SMSSignReasonR\areasons\x12\x1d\n" + | ||||||
| 	"\n" + | 	"\n" + | ||||||
| 	"created_at\x18\x06 \x01(\x05R\tcreatedAt\"Y\n" + | 	"created_at\x18\x06 \x01(\x05R\tcreatedAt\"R\n" + | ||||||
| 	"\x13ListSMSSignResponse\x12,\n" + | 	"\x13ListSMSSignResponse\x12%\n" + | ||||||
| 	"\x04list\x18\x01 \x03(\v2\x18.notification.v1.SMSSignR\x04list\x12\x14\n" + | 	"\x04list\x18\x01 \x03(\v2\x11.admin.v1.SMSSignR\x04list\x12\x14\n" + | ||||||
| 	"\x05count\x18\x02 \x01(\x05R\x05count*\xa6\x01\n" + | 	"\x05count\x18\x02 \x01(\x05R\x05countB3Z1git.shenxianhe.cn/shenxianhe/sdk/admin/v1;adminv1b\x06proto3" | ||||||
| 	"\rSMSSignStatus\x12\x1f\n" + |  | ||||||
| 	"\x1bSMS_SIGN_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n" + |  | ||||||
| 	"\x18SMS_SIGN_STATUS_APPLYING\x10\x01\x12\x1a\n" + |  | ||||||
| 	"\x16SMS_SIGN_STATUS_PASSED\x10\x02\x12\x1c\n" + |  | ||||||
| 	"\x18SMS_SIGN_STATUS_REJECTED\x10\x03\x12\x1c\n" + |  | ||||||
| 	"\x18SMS_SIGN_STATUS_CANCELED\x10\x042\xbd\x01\n" + |  | ||||||
| 	"\x13NotificationService\x12X\n" + |  | ||||||
| 	"\vListSMSSign\x12#.notification.v1.ListSMSSignRequest\x1a$.notification.v1.ListSMSSignResponse\x12L\n" + |  | ||||||
| 	"\aSendSMS\x12\x1f.notification.v1.SendSMSRequest\x1a .notification.v1.SendSMSResponseBAZ?git.shenxianhe.cn/shenxianhe/sdk/notification/v1;notificationv1b\x06proto3" |  | ||||||
| 
 | 
 | ||||||
| var ( | var ( | ||||||
| 	file_notification_v1_notification_proto_rawDescOnce sync.Once | 	file_admin_v1_sms_proto_rawDescOnce sync.Once | ||||||
| 	file_notification_v1_notification_proto_rawDescData []byte | 	file_admin_v1_sms_proto_rawDescData []byte | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func file_notification_v1_notification_proto_rawDescGZIP() []byte { | func file_admin_v1_sms_proto_rawDescGZIP() []byte { | ||||||
| 	file_notification_v1_notification_proto_rawDescOnce.Do(func() { | 	file_admin_v1_sms_proto_rawDescOnce.Do(func() { | ||||||
| 		file_notification_v1_notification_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_notification_v1_notification_proto_rawDesc), len(file_notification_v1_notification_proto_rawDesc))) | 		file_admin_v1_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_admin_v1_sms_proto_rawDesc), len(file_admin_v1_sms_proto_rawDesc))) | ||||||
| 	}) | 	}) | ||||||
| 	return file_notification_v1_notification_proto_rawDescData | 	return file_admin_v1_sms_proto_rawDescData | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var file_notification_v1_notification_proto_enumTypes = make([]protoimpl.EnumInfo, 1) | var file_admin_v1_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 7) | ||||||
| var file_notification_v1_notification_proto_msgTypes = make([]protoimpl.MessageInfo, 7) | var file_admin_v1_sms_proto_goTypes = []any{ | ||||||
| var file_notification_v1_notification_proto_goTypes = []any{ | 	(*SendSMSRequest)(nil),      // 0: admin.v1.SendSMSRequest | ||||||
| 	(SMSSignStatus)(0),          // 0: notification.v1.SMSSignStatus | 	(*SendSMSResponse)(nil),     // 1: admin.v1.SendSMSResponse | ||||||
| 	(*SendSMSRequest)(nil),      // 1: notification.v1.SendSMSRequest | 	(*ListSMSSignRequest)(nil),  // 2: admin.v1.ListSMSSignRequest | ||||||
| 	(*SendSMSResponse)(nil),     // 2: notification.v1.SendSMSResponse | 	(*SMSSignReason)(nil),       // 3: admin.v1.SMSSignReason | ||||||
| 	(*ListSMSSignRequest)(nil),  // 3: notification.v1.ListSMSSignRequest | 	(*SMSSign)(nil),             // 4: admin.v1.SMSSign | ||||||
| 	(*SMSSignReason)(nil),       // 4: notification.v1.SMSSignReason | 	(*ListSMSSignResponse)(nil), // 5: admin.v1.ListSMSSignResponse | ||||||
| 	(*SMSSign)(nil),             // 5: notification.v1.SMSSign | 	nil,                         // 6: admin.v1.SendSMSRequest.TemplateParamsEntry | ||||||
| 	(*ListSMSSignResponse)(nil), // 6: notification.v1.ListSMSSignResponse | 	(v1.SMSSignStatus)(0),       // 7: enums.v1.SMSSignStatus | ||||||
| 	nil,                         // 7: notification.v1.SendSMSRequest.TemplateParamsEntry |  | ||||||
| } | } | ||||||
| var file_notification_v1_notification_proto_depIdxs = []int32{ | var file_admin_v1_sms_proto_depIdxs = []int32{ | ||||||
| 	7, // 0: notification.v1.SendSMSRequest.template_params:type_name -> notification.v1.SendSMSRequest.TemplateParamsEntry | 	6, // 0: admin.v1.SendSMSRequest.template_params:type_name -> admin.v1.SendSMSRequest.TemplateParamsEntry | ||||||
| 	0, // 1: notification.v1.SMSSign.status:type_name -> notification.v1.SMSSignStatus | 	7, // 1: admin.v1.SMSSign.status:type_name -> enums.v1.SMSSignStatus | ||||||
| 	4, // 2: notification.v1.SMSSign.reasons:type_name -> notification.v1.SMSSignReason | 	3, // 2: admin.v1.SMSSign.reasons:type_name -> admin.v1.SMSSignReason | ||||||
| 	5, // 3: notification.v1.ListSMSSignResponse.list:type_name -> notification.v1.SMSSign | 	4, // 3: admin.v1.ListSMSSignResponse.list:type_name -> admin.v1.SMSSign | ||||||
| 	3, // 4: notification.v1.NotificationService.ListSMSSign:input_type -> notification.v1.ListSMSSignRequest | 	4, // [4:4] is the sub-list for method output_type | ||||||
| 	1, // 5: notification.v1.NotificationService.SendSMS:input_type -> notification.v1.SendSMSRequest | 	4, // [4:4] is the sub-list for method input_type | ||||||
| 	6, // 6: notification.v1.NotificationService.ListSMSSign:output_type -> notification.v1.ListSMSSignResponse |  | ||||||
| 	2, // 7: notification.v1.NotificationService.SendSMS:output_type -> notification.v1.SendSMSResponse |  | ||||||
| 	6, // [6:8] is the sub-list for method output_type |  | ||||||
| 	4, // [4:6] is the sub-list for method input_type |  | ||||||
| 	4, // [4:4] is the sub-list for extension type_name | 	4, // [4:4] is the sub-list for extension type_name | ||||||
| 	4, // [4:4] is the sub-list for extension extendee | 	4, // [4:4] is the sub-list for extension extendee | ||||||
| 	0, // [0:4] is the sub-list for field type_name | 	0, // [0:4] is the sub-list for field type_name | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func init() { file_notification_v1_notification_proto_init() } | func init() { file_admin_v1_sms_proto_init() } | ||||||
| func file_notification_v1_notification_proto_init() { | func file_admin_v1_sms_proto_init() { | ||||||
| 	if File_notification_v1_notification_proto != nil { | 	if File_admin_v1_sms_proto != nil { | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	type x struct{} | 	type x struct{} | ||||||
| 	out := protoimpl.TypeBuilder{ | 	out := protoimpl.TypeBuilder{ | ||||||
| 		File: protoimpl.DescBuilder{ | 		File: protoimpl.DescBuilder{ | ||||||
| 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
| 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_notification_v1_notification_proto_rawDesc), len(file_notification_v1_notification_proto_rawDesc)), | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_admin_v1_sms_proto_rawDesc), len(file_admin_v1_sms_proto_rawDesc)), | ||||||
| 			NumEnums:      1, | 			NumEnums:      0, | ||||||
| 			NumMessages:   7, | 			NumMessages:   7, | ||||||
| 			NumExtensions: 0, | 			NumExtensions: 0, | ||||||
| 			NumServices:   1, | 			NumServices:   0, | ||||||
| 		}, | 		}, | ||||||
| 		GoTypes:           file_notification_v1_notification_proto_goTypes, | 		GoTypes:           file_admin_v1_sms_proto_goTypes, | ||||||
| 		DependencyIndexes: file_notification_v1_notification_proto_depIdxs, | 		DependencyIndexes: file_admin_v1_sms_proto_depIdxs, | ||||||
| 		EnumInfos:         file_notification_v1_notification_proto_enumTypes, | 		MessageInfos:      file_admin_v1_sms_proto_msgTypes, | ||||||
| 		MessageInfos:      file_notification_v1_notification_proto_msgTypes, |  | ||||||
| 	}.Build() | 	}.Build() | ||||||
| 	File_notification_v1_notification_proto = out.File | 	File_admin_v1_sms_proto = out.File | ||||||
| 	file_notification_v1_notification_proto_goTypes = nil | 	file_admin_v1_sms_proto_goTypes = nil | ||||||
| 	file_notification_v1_notification_proto_depIdxs = nil | 	file_admin_v1_sms_proto_depIdxs = nil | ||||||
| } | } | ||||||
							
								
								
									
										232
									
								
								admin/v1/user.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										232
									
								
								admin/v1/user.pb.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,232 @@ | |||||||
|  | // Code generated by protoc-gen-go. DO NOT EDIT. | ||||||
|  | // versions: | ||||||
|  | // 	protoc-gen-go v1.36.7 | ||||||
|  | // 	protoc        (unknown) | ||||||
|  | // source: admin/v1/user.proto | ||||||
|  |  | ||||||
|  | package adminv1 | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
|  | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
|  | 	reflect "reflect" | ||||||
|  | 	sync "sync" | ||||||
|  | 	unsafe "unsafe" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | 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 GetUserInfoRequest struct { | ||||||
|  | 	state          protoimpl.MessageState `protogen:"open.v1"` | ||||||
|  | 	UserId         string                 `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` | ||||||
|  | 	InvitationCode string                 `protobuf:"bytes,2,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"` | ||||||
|  | 	unknownFields  protoimpl.UnknownFields | ||||||
|  | 	sizeCache      protoimpl.SizeCache | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoRequest) Reset() { | ||||||
|  | 	*x = GetUserInfoRequest{} | ||||||
|  | 	mi := &file_admin_v1_user_proto_msgTypes[0] | ||||||
|  | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 	ms.StoreMessageInfo(mi) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoRequest) String() string { | ||||||
|  | 	return protoimpl.X.MessageStringOf(x) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (*GetUserInfoRequest) ProtoMessage() {} | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { | ||||||
|  | 	mi := &file_admin_v1_user_proto_msgTypes[0] | ||||||
|  | 	if x != nil { | ||||||
|  | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 		if ms.LoadMessageInfo() == nil { | ||||||
|  | 			ms.StoreMessageInfo(mi) | ||||||
|  | 		} | ||||||
|  | 		return ms | ||||||
|  | 	} | ||||||
|  | 	return mi.MessageOf(x) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead. | ||||||
|  | func (*GetUserInfoRequest) Descriptor() ([]byte, []int) { | ||||||
|  | 	return file_admin_v1_user_proto_rawDescGZIP(), []int{0} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoRequest) GetUserId() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.UserId | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoRequest) GetInvitationCode() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.InvitationCode | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | type GetUserInfoResponse struct { | ||||||
|  | 	state          protoimpl.MessageState `protogen:"open.v1"` | ||||||
|  | 	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | ||||||
|  | 	Avatar         string                 `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` | ||||||
|  | 	InvitationCode string                 `protobuf:"bytes,3,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"` | ||||||
|  | 	Description    string                 `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` | ||||||
|  | 	Name           string                 `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` | ||||||
|  | 	Phone          string                 `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"` | ||||||
|  | 	Email          string                 `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` | ||||||
|  | 	unknownFields  protoimpl.UnknownFields | ||||||
|  | 	sizeCache      protoimpl.SizeCache | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) Reset() { | ||||||
|  | 	*x = GetUserInfoResponse{} | ||||||
|  | 	mi := &file_admin_v1_user_proto_msgTypes[1] | ||||||
|  | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 	ms.StoreMessageInfo(mi) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) String() string { | ||||||
|  | 	return protoimpl.X.MessageStringOf(x) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (*GetUserInfoResponse) ProtoMessage() {} | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message { | ||||||
|  | 	mi := &file_admin_v1_user_proto_msgTypes[1] | ||||||
|  | 	if x != nil { | ||||||
|  | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 		if ms.LoadMessageInfo() == nil { | ||||||
|  | 			ms.StoreMessageInfo(mi) | ||||||
|  | 		} | ||||||
|  | 		return ms | ||||||
|  | 	} | ||||||
|  | 	return mi.MessageOf(x) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Deprecated: Use GetUserInfoResponse.ProtoReflect.Descriptor instead. | ||||||
|  | func (*GetUserInfoResponse) Descriptor() ([]byte, []int) { | ||||||
|  | 	return file_admin_v1_user_proto_rawDescGZIP(), []int{1} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetId() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Id | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetAvatar() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Avatar | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetInvitationCode() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.InvitationCode | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetDescription() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Description | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetName() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Name | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetPhone() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Phone | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x *GetUserInfoResponse) GetEmail() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Email | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | var File_admin_v1_user_proto protoreflect.FileDescriptor | ||||||
|  |  | ||||||
|  | const file_admin_v1_user_proto_rawDesc = "" + | ||||||
|  | 	"\n" + | ||||||
|  | 	"\x13admin/v1/user.proto\x12\badmin.v1\"V\n" + | ||||||
|  | 	"\x12GetUserInfoRequest\x12\x17\n" + | ||||||
|  | 	"\auser_id\x18\x01 \x01(\tR\x06userId\x12'\n" + | ||||||
|  | 	"\x0finvitation_code\x18\x02 \x01(\tR\x0einvitationCode\"\xc8\x01\n" + | ||||||
|  | 	"\x13GetUserInfoResponse\x12\x0e\n" + | ||||||
|  | 	"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + | ||||||
|  | 	"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12'\n" + | ||||||
|  | 	"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12 \n" + | ||||||
|  | 	"\vdescription\x18\x04 \x01(\tR\vdescription\x12\x12\n" + | ||||||
|  | 	"\x04name\x18\x05 \x01(\tR\x04name\x12\x14\n" + | ||||||
|  | 	"\x05phone\x18\x06 \x01(\tR\x05phone\x12\x14\n" + | ||||||
|  | 	"\x05email\x18\a \x01(\tR\x05emailB3Z1git.shenxianhe.cn/shenxianhe/sdk/admin/v1;adminv1b\x06proto3" | ||||||
|  |  | ||||||
|  | var ( | ||||||
|  | 	file_admin_v1_user_proto_rawDescOnce sync.Once | ||||||
|  | 	file_admin_v1_user_proto_rawDescData []byte | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | func file_admin_v1_user_proto_rawDescGZIP() []byte { | ||||||
|  | 	file_admin_v1_user_proto_rawDescOnce.Do(func() { | ||||||
|  | 		file_admin_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_admin_v1_user_proto_rawDesc), len(file_admin_v1_user_proto_rawDesc))) | ||||||
|  | 	}) | ||||||
|  | 	return file_admin_v1_user_proto_rawDescData | ||||||
|  | } | ||||||
|  |  | ||||||
|  | var file_admin_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 2) | ||||||
|  | var file_admin_v1_user_proto_goTypes = []any{ | ||||||
|  | 	(*GetUserInfoRequest)(nil),  // 0: admin.v1.GetUserInfoRequest | ||||||
|  | 	(*GetUserInfoResponse)(nil), // 1: admin.v1.GetUserInfoResponse | ||||||
|  | } | ||||||
|  | var file_admin_v1_user_proto_depIdxs = []int32{ | ||||||
|  | 	0, // [0:0] is the sub-list for method output_type | ||||||
|  | 	0, // [0:0] 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_admin_v1_user_proto_init() } | ||||||
|  | func file_admin_v1_user_proto_init() { | ||||||
|  | 	if File_admin_v1_user_proto != nil { | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 	type x struct{} | ||||||
|  | 	out := protoimpl.TypeBuilder{ | ||||||
|  | 		File: protoimpl.DescBuilder{ | ||||||
|  | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
|  | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_admin_v1_user_proto_rawDesc), len(file_admin_v1_user_proto_rawDesc)), | ||||||
|  | 			NumEnums:      0, | ||||||
|  | 			NumMessages:   2, | ||||||
|  | 			NumExtensions: 0, | ||||||
|  | 			NumServices:   0, | ||||||
|  | 		}, | ||||||
|  | 		GoTypes:           file_admin_v1_user_proto_goTypes, | ||||||
|  | 		DependencyIndexes: file_admin_v1_user_proto_depIdxs, | ||||||
|  | 		MessageInfos:      file_admin_v1_user_proto_msgTypes, | ||||||
|  | 	}.Build() | ||||||
|  | 	File_admin_v1_user_proto = out.File | ||||||
|  | 	file_admin_v1_user_proto_goTypes = nil | ||||||
|  | 	file_admin_v1_user_proto_depIdxs = nil | ||||||
|  | } | ||||||
							
								
								
									
										137
									
								
								enums/v1/sms.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								enums/v1/sms.pb.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,137 @@ | |||||||
|  | // Code generated by protoc-gen-go. DO NOT EDIT. | ||||||
|  | // versions: | ||||||
|  | // 	protoc-gen-go v1.36.7 | ||||||
|  | // 	protoc        (unknown) | ||||||
|  | // source: enums/v1/sms.proto | ||||||
|  |  | ||||||
|  | package enumsv1 | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
|  | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
|  | 	reflect "reflect" | ||||||
|  | 	sync "sync" | ||||||
|  | 	unsafe "unsafe" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | 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 SMSSignStatus int32 | ||||||
|  |  | ||||||
|  | const ( | ||||||
|  | 	SMSSignStatus_SMS_SIGN_STATUS_UNSPECIFIED SMSSignStatus = 0 | ||||||
|  | 	SMSSignStatus_SMS_SIGN_STATUS_APPLYING    SMSSignStatus = 1 // 审核中 | ||||||
|  | 	SMSSignStatus_SMS_SIGN_STATUS_PASSED      SMSSignStatus = 2 // 审核通过 | ||||||
|  | 	SMSSignStatus_SMS_SIGN_STATUS_REJECTED    SMSSignStatus = 3 // 审核拒绝 | ||||||
|  | 	SMSSignStatus_SMS_SIGN_STATUS_CANCELED    SMSSignStatus = 4 // 已取消 | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // Enum value maps for SMSSignStatus. | ||||||
|  | var ( | ||||||
|  | 	SMSSignStatus_name = map[int32]string{ | ||||||
|  | 		0: "SMS_SIGN_STATUS_UNSPECIFIED", | ||||||
|  | 		1: "SMS_SIGN_STATUS_APPLYING", | ||||||
|  | 		2: "SMS_SIGN_STATUS_PASSED", | ||||||
|  | 		3: "SMS_SIGN_STATUS_REJECTED", | ||||||
|  | 		4: "SMS_SIGN_STATUS_CANCELED", | ||||||
|  | 	} | ||||||
|  | 	SMSSignStatus_value = map[string]int32{ | ||||||
|  | 		"SMS_SIGN_STATUS_UNSPECIFIED": 0, | ||||||
|  | 		"SMS_SIGN_STATUS_APPLYING":    1, | ||||||
|  | 		"SMS_SIGN_STATUS_PASSED":      2, | ||||||
|  | 		"SMS_SIGN_STATUS_REJECTED":    3, | ||||||
|  | 		"SMS_SIGN_STATUS_CANCELED":    4, | ||||||
|  | 	} | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | func (x SMSSignStatus) Enum() *SMSSignStatus { | ||||||
|  | 	p := new(SMSSignStatus) | ||||||
|  | 	*p = x | ||||||
|  | 	return p | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x SMSSignStatus) String() string { | ||||||
|  | 	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (SMSSignStatus) Descriptor() protoreflect.EnumDescriptor { | ||||||
|  | 	return file_enums_v1_sms_proto_enumTypes[0].Descriptor() | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (SMSSignStatus) Type() protoreflect.EnumType { | ||||||
|  | 	return &file_enums_v1_sms_proto_enumTypes[0] | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x SMSSignStatus) Number() protoreflect.EnumNumber { | ||||||
|  | 	return protoreflect.EnumNumber(x) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Deprecated: Use SMSSignStatus.Descriptor instead. | ||||||
|  | func (SMSSignStatus) EnumDescriptor() ([]byte, []int) { | ||||||
|  | 	return file_enums_v1_sms_proto_rawDescGZIP(), []int{0} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | var File_enums_v1_sms_proto protoreflect.FileDescriptor | ||||||
|  |  | ||||||
|  | const file_enums_v1_sms_proto_rawDesc = "" + | ||||||
|  | 	"\n" + | ||||||
|  | 	"\x12enums/v1/sms.proto\x12\benums.v1*\xa6\x01\n" + | ||||||
|  | 	"\rSMSSignStatus\x12\x1f\n" + | ||||||
|  | 	"\x1bSMS_SIGN_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n" + | ||||||
|  | 	"\x18SMS_SIGN_STATUS_APPLYING\x10\x01\x12\x1a\n" + | ||||||
|  | 	"\x16SMS_SIGN_STATUS_PASSED\x10\x02\x12\x1c\n" + | ||||||
|  | 	"\x18SMS_SIGN_STATUS_REJECTED\x10\x03\x12\x1c\n" + | ||||||
|  | 	"\x18SMS_SIGN_STATUS_CANCELED\x10\x04B3Z1git.shenxianhe.cn/shenxianhe/sdk/enums/v1;enumsv1b\x06proto3" | ||||||
|  |  | ||||||
|  | var ( | ||||||
|  | 	file_enums_v1_sms_proto_rawDescOnce sync.Once | ||||||
|  | 	file_enums_v1_sms_proto_rawDescData []byte | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | func file_enums_v1_sms_proto_rawDescGZIP() []byte { | ||||||
|  | 	file_enums_v1_sms_proto_rawDescOnce.Do(func() { | ||||||
|  | 		file_enums_v1_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_enums_v1_sms_proto_rawDesc), len(file_enums_v1_sms_proto_rawDesc))) | ||||||
|  | 	}) | ||||||
|  | 	return file_enums_v1_sms_proto_rawDescData | ||||||
|  | } | ||||||
|  |  | ||||||
|  | var file_enums_v1_sms_proto_enumTypes = make([]protoimpl.EnumInfo, 1) | ||||||
|  | var file_enums_v1_sms_proto_goTypes = []any{ | ||||||
|  | 	(SMSSignStatus)(0), // 0: enums.v1.SMSSignStatus | ||||||
|  | } | ||||||
|  | var file_enums_v1_sms_proto_depIdxs = []int32{ | ||||||
|  | 	0, // [0:0] is the sub-list for method output_type | ||||||
|  | 	0, // [0:0] 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_enums_v1_sms_proto_init() } | ||||||
|  | func file_enums_v1_sms_proto_init() { | ||||||
|  | 	if File_enums_v1_sms_proto != nil { | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 	type x struct{} | ||||||
|  | 	out := protoimpl.TypeBuilder{ | ||||||
|  | 		File: protoimpl.DescBuilder{ | ||||||
|  | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
|  | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_enums_v1_sms_proto_rawDesc), len(file_enums_v1_sms_proto_rawDesc)), | ||||||
|  | 			NumEnums:      1, | ||||||
|  | 			NumMessages:   0, | ||||||
|  | 			NumExtensions: 0, | ||||||
|  | 			NumServices:   0, | ||||||
|  | 		}, | ||||||
|  | 		GoTypes:           file_enums_v1_sms_proto_goTypes, | ||||||
|  | 		DependencyIndexes: file_enums_v1_sms_proto_depIdxs, | ||||||
|  | 		EnumInfos:         file_enums_v1_sms_proto_enumTypes, | ||||||
|  | 	}.Build() | ||||||
|  | 	File_enums_v1_sms_proto = out.File | ||||||
|  | 	file_enums_v1_sms_proto_goTypes = nil | ||||||
|  | 	file_enums_v1_sms_proto_depIdxs = nil | ||||||
|  | } | ||||||
							
								
								
									
										138
									
								
								enums/v1/user.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										138
									
								
								enums/v1/user.pb.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,138 @@ | |||||||
|  | // Code generated by protoc-gen-go. DO NOT EDIT. | ||||||
|  | // versions: | ||||||
|  | // 	protoc-gen-go v1.36.7 | ||||||
|  | // 	protoc        (unknown) | ||||||
|  | // source: enums/v1/user.proto | ||||||
|  |  | ||||||
|  | package enumsv1 | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
|  | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
|  | 	reflect "reflect" | ||||||
|  | 	sync "sync" | ||||||
|  | 	unsafe "unsafe" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | 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 AuthenticationType int32 | ||||||
|  |  | ||||||
|  | const ( | ||||||
|  | 	AuthenticationType_AUTHENTICATION_TYPE_UNSPECIFIED AuthenticationType = 0 | ||||||
|  | 	AuthenticationType_AUTHENTICATION_TYPE_NAME        AuthenticationType = 1 // 用户名 | ||||||
|  | 	AuthenticationType_AUTHENTICATION_TYPE_PHONE       AuthenticationType = 2 // 手机号 | ||||||
|  | 	AuthenticationType_AUTHENTICATION_TYPE_EMAIL       AuthenticationType = 3 // 邮箱 | ||||||
|  | 	AuthenticationType_AUTHENTICATION_TYPE_WECHAT      AuthenticationType = 4 // 微信 | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // Enum value maps for AuthenticationType. | ||||||
|  | var ( | ||||||
|  | 	AuthenticationType_name = map[int32]string{ | ||||||
|  | 		0: "AUTHENTICATION_TYPE_UNSPECIFIED", | ||||||
|  | 		1: "AUTHENTICATION_TYPE_NAME", | ||||||
|  | 		2: "AUTHENTICATION_TYPE_PHONE", | ||||||
|  | 		3: "AUTHENTICATION_TYPE_EMAIL", | ||||||
|  | 		4: "AUTHENTICATION_TYPE_WECHAT", | ||||||
|  | 	} | ||||||
|  | 	AuthenticationType_value = map[string]int32{ | ||||||
|  | 		"AUTHENTICATION_TYPE_UNSPECIFIED": 0, | ||||||
|  | 		"AUTHENTICATION_TYPE_NAME":        1, | ||||||
|  | 		"AUTHENTICATION_TYPE_PHONE":       2, | ||||||
|  | 		"AUTHENTICATION_TYPE_EMAIL":       3, | ||||||
|  | 		"AUTHENTICATION_TYPE_WECHAT":      4, | ||||||
|  | 	} | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | func (x AuthenticationType) Enum() *AuthenticationType { | ||||||
|  | 	p := new(AuthenticationType) | ||||||
|  | 	*p = x | ||||||
|  | 	return p | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x AuthenticationType) String() string { | ||||||
|  | 	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (AuthenticationType) Descriptor() protoreflect.EnumDescriptor { | ||||||
|  | 	return file_enums_v1_user_proto_enumTypes[0].Descriptor() | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (AuthenticationType) Type() protoreflect.EnumType { | ||||||
|  | 	return &file_enums_v1_user_proto_enumTypes[0] | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (x AuthenticationType) Number() protoreflect.EnumNumber { | ||||||
|  | 	return protoreflect.EnumNumber(x) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Deprecated: Use AuthenticationType.Descriptor instead. | ||||||
|  | func (AuthenticationType) EnumDescriptor() ([]byte, []int) { | ||||||
|  | 	return file_enums_v1_user_proto_rawDescGZIP(), []int{0} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | var File_enums_v1_user_proto protoreflect.FileDescriptor | ||||||
|  |  | ||||||
|  | const file_enums_v1_user_proto_rawDesc = "" + | ||||||
|  | 	"\n" + | ||||||
|  | 	"\x13enums/v1/user.proto\x12\benums.v1*\xb5\x01\n" + | ||||||
|  | 	"\x12AuthenticationType\x12#\n" + | ||||||
|  | 	"\x1fAUTHENTICATION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n" + | ||||||
|  | 	"\x18AUTHENTICATION_TYPE_NAME\x10\x01\x12\x1d\n" + | ||||||
|  | 	"\x19AUTHENTICATION_TYPE_PHONE\x10\x02\x12\x1d\n" + | ||||||
|  | 	"\x19AUTHENTICATION_TYPE_EMAIL\x10\x03\x12\x1e\n" + | ||||||
|  | 	"\x1aAUTHENTICATION_TYPE_WECHAT\x10\x04B3Z1git.shenxianhe.cn/shenxianhe/sdk/enums/v1;enumsv1b\x06proto3" | ||||||
|  |  | ||||||
|  | var ( | ||||||
|  | 	file_enums_v1_user_proto_rawDescOnce sync.Once | ||||||
|  | 	file_enums_v1_user_proto_rawDescData []byte | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | func file_enums_v1_user_proto_rawDescGZIP() []byte { | ||||||
|  | 	file_enums_v1_user_proto_rawDescOnce.Do(func() { | ||||||
|  | 		file_enums_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_enums_v1_user_proto_rawDesc), len(file_enums_v1_user_proto_rawDesc))) | ||||||
|  | 	}) | ||||||
|  | 	return file_enums_v1_user_proto_rawDescData | ||||||
|  | } | ||||||
|  |  | ||||||
|  | var file_enums_v1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 1) | ||||||
|  | var file_enums_v1_user_proto_goTypes = []any{ | ||||||
|  | 	(AuthenticationType)(0), // 0: enums.v1.AuthenticationType | ||||||
|  | } | ||||||
|  | var file_enums_v1_user_proto_depIdxs = []int32{ | ||||||
|  | 	0, // [0:0] is the sub-list for method output_type | ||||||
|  | 	0, // [0:0] 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_enums_v1_user_proto_init() } | ||||||
|  | func file_enums_v1_user_proto_init() { | ||||||
|  | 	if File_enums_v1_user_proto != nil { | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 	type x struct{} | ||||||
|  | 	out := protoimpl.TypeBuilder{ | ||||||
|  | 		File: protoimpl.DescBuilder{ | ||||||
|  | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
|  | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_enums_v1_user_proto_rawDesc), len(file_enums_v1_user_proto_rawDesc)), | ||||||
|  | 			NumEnums:      1, | ||||||
|  | 			NumMessages:   0, | ||||||
|  | 			NumExtensions: 0, | ||||||
|  | 			NumServices:   0, | ||||||
|  | 		}, | ||||||
|  | 		GoTypes:           file_enums_v1_user_proto_goTypes, | ||||||
|  | 		DependencyIndexes: file_enums_v1_user_proto_depIdxs, | ||||||
|  | 		EnumInfos:         file_enums_v1_user_proto_enumTypes, | ||||||
|  | 	}.Build() | ||||||
|  | 	File_enums_v1_user_proto = out.File | ||||||
|  | 	file_enums_v1_user_proto_goTypes = nil | ||||||
|  | 	file_enums_v1_user_proto_depIdxs = nil | ||||||
|  | } | ||||||
| @@ -1,139 +0,0 @@ | |||||||
| // Code generated by protoc-gen-connect-go. DO NOT EDIT. |  | ||||||
| // |  | ||||||
| // Source: notification/v1/notification.proto |  | ||||||
|  |  | ||||||
| package notificationv1connect |  | ||||||
|  |  | ||||||
| import ( |  | ||||||
| 	connect "connectrpc.com/connect" |  | ||||||
| 	context "context" |  | ||||||
| 	errors "errors" |  | ||||||
| 	v1 "git.shenxianhe.cn/shenxianhe/sdk/notification/v1" |  | ||||||
| 	http "net/http" |  | ||||||
| 	strings "strings" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // This is a compile-time assertion to ensure that this generated file and the connect package are |  | ||||||
| // compatible. If you get a compiler error that this constant is not defined, this code was |  | ||||||
| // generated with a version of connect newer than the one compiled into your binary. You can fix the |  | ||||||
| // problem by either regenerating this code with an older version of connect or updating the connect |  | ||||||
| // version compiled into your binary. |  | ||||||
| const _ = connect.IsAtLeastVersion1_13_0 |  | ||||||
|  |  | ||||||
| const ( |  | ||||||
| 	// NotificationServiceName is the fully-qualified name of the NotificationService service. |  | ||||||
| 	NotificationServiceName = "notification.v1.NotificationService" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // These constants are the fully-qualified names of the RPCs defined in this package. They're |  | ||||||
| // exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. |  | ||||||
| // |  | ||||||
| // Note that these are different from the fully-qualified method names used by |  | ||||||
| // google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to |  | ||||||
| // reflection-formatted method names, remove the leading slash and convert the remaining slash to a |  | ||||||
| // period. |  | ||||||
| const ( |  | ||||||
| 	// NotificationServiceListSMSSignProcedure is the fully-qualified name of the NotificationService's |  | ||||||
| 	// ListSMSSign RPC. |  | ||||||
| 	NotificationServiceListSMSSignProcedure = "/notification.v1.NotificationService/ListSMSSign" |  | ||||||
| 	// NotificationServiceSendSMSProcedure is the fully-qualified name of the NotificationService's |  | ||||||
| 	// SendSMS RPC. |  | ||||||
| 	NotificationServiceSendSMSProcedure = "/notification.v1.NotificationService/SendSMS" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // NotificationServiceClient is a client for the notification.v1.NotificationService service. |  | ||||||
| type NotificationServiceClient interface { |  | ||||||
| 	ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) |  | ||||||
| 	SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // NewNotificationServiceClient constructs a client for the notification.v1.NotificationService |  | ||||||
| // service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for |  | ||||||
| // gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply |  | ||||||
| // the connect.WithGRPC() or connect.WithGRPCWeb() options. |  | ||||||
| // |  | ||||||
| // The URL supplied here should be the base URL for the Connect or gRPC server (for example, |  | ||||||
| // http://api.acme.com or https://acme.com/grpc). |  | ||||||
| func NewNotificationServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) NotificationServiceClient { |  | ||||||
| 	baseURL = strings.TrimRight(baseURL, "/") |  | ||||||
| 	notificationServiceMethods := v1.File_notification_v1_notification_proto.Services().ByName("NotificationService").Methods() |  | ||||||
| 	return ¬ificationServiceClient{ |  | ||||||
| 		listSMSSign: connect.NewClient[v1.ListSMSSignRequest, v1.ListSMSSignResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+NotificationServiceListSMSSignProcedure, |  | ||||||
| 			connect.WithSchema(notificationServiceMethods.ByName("ListSMSSign")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 		sendSMS: connect.NewClient[v1.SendSMSRequest, v1.SendSMSResponse]( |  | ||||||
| 			httpClient, |  | ||||||
| 			baseURL+NotificationServiceSendSMSProcedure, |  | ||||||
| 			connect.WithSchema(notificationServiceMethods.ByName("SendSMS")), |  | ||||||
| 			connect.WithClientOptions(opts...), |  | ||||||
| 		), |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // notificationServiceClient implements NotificationServiceClient. |  | ||||||
| type notificationServiceClient struct { |  | ||||||
| 	listSMSSign *connect.Client[v1.ListSMSSignRequest, v1.ListSMSSignResponse] |  | ||||||
| 	sendSMS     *connect.Client[v1.SendSMSRequest, v1.SendSMSResponse] |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // ListSMSSign calls notification.v1.NotificationService.ListSMSSign. |  | ||||||
| func (c *notificationServiceClient) ListSMSSign(ctx context.Context, req *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) { |  | ||||||
| 	return c.listSMSSign.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // SendSMS calls notification.v1.NotificationService.SendSMS. |  | ||||||
| func (c *notificationServiceClient) SendSMS(ctx context.Context, req *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) { |  | ||||||
| 	return c.sendSMS.CallUnary(ctx, req) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // NotificationServiceHandler is an implementation of the notification.v1.NotificationService |  | ||||||
| // service. |  | ||||||
| type NotificationServiceHandler interface { |  | ||||||
| 	ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) |  | ||||||
| 	SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // NewNotificationServiceHandler builds an HTTP handler from the service implementation. It returns |  | ||||||
| // the path on which to mount the handler and the handler itself. |  | ||||||
| // |  | ||||||
| // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf |  | ||||||
| // and JSON codecs. They also support gzip compression. |  | ||||||
| func NewNotificationServiceHandler(svc NotificationServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { |  | ||||||
| 	notificationServiceMethods := v1.File_notification_v1_notification_proto.Services().ByName("NotificationService").Methods() |  | ||||||
| 	notificationServiceListSMSSignHandler := connect.NewUnaryHandler( |  | ||||||
| 		NotificationServiceListSMSSignProcedure, |  | ||||||
| 		svc.ListSMSSign, |  | ||||||
| 		connect.WithSchema(notificationServiceMethods.ByName("ListSMSSign")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	notificationServiceSendSMSHandler := connect.NewUnaryHandler( |  | ||||||
| 		NotificationServiceSendSMSProcedure, |  | ||||||
| 		svc.SendSMS, |  | ||||||
| 		connect.WithSchema(notificationServiceMethods.ByName("SendSMS")), |  | ||||||
| 		connect.WithHandlerOptions(opts...), |  | ||||||
| 	) |  | ||||||
| 	return "/notification.v1.NotificationService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |  | ||||||
| 		switch r.URL.Path { |  | ||||||
| 		case NotificationServiceListSMSSignProcedure: |  | ||||||
| 			notificationServiceListSMSSignHandler.ServeHTTP(w, r) |  | ||||||
| 		case NotificationServiceSendSMSProcedure: |  | ||||||
| 			notificationServiceSendSMSHandler.ServeHTTP(w, r) |  | ||||||
| 		default: |  | ||||||
| 			http.NotFound(w, r) |  | ||||||
| 		} |  | ||||||
| 	}) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // UnimplementedNotificationServiceHandler returns CodeUnimplemented from all methods. |  | ||||||
| type UnimplementedNotificationServiceHandler struct{} |  | ||||||
|  |  | ||||||
| func (UnimplementedNotificationServiceHandler) ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("notification.v1.NotificationService.ListSMSSign is not implemented")) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| func (UnimplementedNotificationServiceHandler) SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) { |  | ||||||
| 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("notification.v1.NotificationService.SendSMS is not implemented")) |  | ||||||
| } |  | ||||||
							
								
								
									
										102
									
								
								user/v1/service.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								user/v1/service.pb.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,102 @@ | |||||||
|  | // Code generated by protoc-gen-go. DO NOT EDIT. | ||||||
|  | // versions: | ||||||
|  | // 	protoc-gen-go v1.36.7 | ||||||
|  | // 	protoc        (unknown) | ||||||
|  | // source: user/v1/service.proto | ||||||
|  |  | ||||||
|  | package userv1 | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
|  | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
|  | 	reflect "reflect" | ||||||
|  | 	unsafe "unsafe" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | 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_user_v1_service_proto protoreflect.FileDescriptor | ||||||
|  |  | ||||||
|  | const file_user_v1_service_proto_rawDesc = "" + | ||||||
|  | 	"\n" + | ||||||
|  | 	"\x15user/v1/service.proto\x12\auser.v1\x1a\x12user/v1/user.proto2\xdd\x04\n" + | ||||||
|  | 	"\vUserService\x12Q\n" + | ||||||
|  | 	"\x0eSendCredential\x12\x1e.user.v1.SendCredentialRequest\x1a\x1f.user.v1.SendCredentialResponse\x123\n" + | ||||||
|  | 	"\x04Auth\x12\x14.user.v1.AuthRequest\x1a\x15.user.v1.AuthResponse\x12H\n" + | ||||||
|  | 	"\vSetPassword\x12\x1b.user.v1.SetPasswordRequest\x1a\x1c.user.v1.SetPasswordResponse\x12<\n" + | ||||||
|  | 	"\aSetName\x12\x17.user.v1.SetNameRequest\x1a\x18.user.v1.SetNameResponse\x12]\n" + | ||||||
|  | 	"\x12GetAvatarUploadURL\x12\".user.v1.GetAvatarUploadURLRequest\x1a#.user.v1.GetAvatarUploadURLResponse\x12B\n" + | ||||||
|  | 	"\tSetAvatar\x12\x19.user.v1.SetAvatarRequest\x1a\x1a.user.v1.SetAvatarResponse\x12Q\n" + | ||||||
|  | 	"\x0eSetDescription\x12\x1e.user.v1.SetDescriptionRequest\x1a\x1f.user.v1.SetDescriptionResponse\x12H\n" + | ||||||
|  | 	"\vGetUserInfo\x12\x1b.user.v1.GetUserInfoRequest\x1a\x1c.user.v1.GetUserInfoResponseB1Z/git.shenxianhe.cn/shenxianhe/sdk/user/v1;userv1b\x06proto3" | ||||||
|  |  | ||||||
|  | var file_user_v1_service_proto_goTypes = []any{ | ||||||
|  | 	(*SendCredentialRequest)(nil),      // 0: user.v1.SendCredentialRequest | ||||||
|  | 	(*AuthRequest)(nil),                // 1: user.v1.AuthRequest | ||||||
|  | 	(*SetPasswordRequest)(nil),         // 2: user.v1.SetPasswordRequest | ||||||
|  | 	(*SetNameRequest)(nil),             // 3: user.v1.SetNameRequest | ||||||
|  | 	(*GetAvatarUploadURLRequest)(nil),  // 4: user.v1.GetAvatarUploadURLRequest | ||||||
|  | 	(*SetAvatarRequest)(nil),           // 5: user.v1.SetAvatarRequest | ||||||
|  | 	(*SetDescriptionRequest)(nil),      // 6: user.v1.SetDescriptionRequest | ||||||
|  | 	(*GetUserInfoRequest)(nil),         // 7: user.v1.GetUserInfoRequest | ||||||
|  | 	(*SendCredentialResponse)(nil),     // 8: user.v1.SendCredentialResponse | ||||||
|  | 	(*AuthResponse)(nil),               // 9: user.v1.AuthResponse | ||||||
|  | 	(*SetPasswordResponse)(nil),        // 10: user.v1.SetPasswordResponse | ||||||
|  | 	(*SetNameResponse)(nil),            // 11: user.v1.SetNameResponse | ||||||
|  | 	(*GetAvatarUploadURLResponse)(nil), // 12: user.v1.GetAvatarUploadURLResponse | ||||||
|  | 	(*SetAvatarResponse)(nil),          // 13: user.v1.SetAvatarResponse | ||||||
|  | 	(*SetDescriptionResponse)(nil),     // 14: user.v1.SetDescriptionResponse | ||||||
|  | 	(*GetUserInfoResponse)(nil),        // 15: user.v1.GetUserInfoResponse | ||||||
|  | } | ||||||
|  | var file_user_v1_service_proto_depIdxs = []int32{ | ||||||
|  | 	0,  // 0: user.v1.UserService.SendCredential:input_type -> user.v1.SendCredentialRequest | ||||||
|  | 	1,  // 1: user.v1.UserService.Auth:input_type -> user.v1.AuthRequest | ||||||
|  | 	2,  // 2: user.v1.UserService.SetPassword:input_type -> user.v1.SetPasswordRequest | ||||||
|  | 	3,  // 3: user.v1.UserService.SetName:input_type -> user.v1.SetNameRequest | ||||||
|  | 	4,  // 4: user.v1.UserService.GetAvatarUploadURL:input_type -> user.v1.GetAvatarUploadURLRequest | ||||||
|  | 	5,  // 5: user.v1.UserService.SetAvatar:input_type -> user.v1.SetAvatarRequest | ||||||
|  | 	6,  // 6: user.v1.UserService.SetDescription:input_type -> user.v1.SetDescriptionRequest | ||||||
|  | 	7,  // 7: user.v1.UserService.GetUserInfo:input_type -> user.v1.GetUserInfoRequest | ||||||
|  | 	8,  // 8: user.v1.UserService.SendCredential:output_type -> user.v1.SendCredentialResponse | ||||||
|  | 	9,  // 9: user.v1.UserService.Auth:output_type -> user.v1.AuthResponse | ||||||
|  | 	10, // 10: user.v1.UserService.SetPassword:output_type -> user.v1.SetPasswordResponse | ||||||
|  | 	11, // 11: user.v1.UserService.SetName:output_type -> user.v1.SetNameResponse | ||||||
|  | 	12, // 12: user.v1.UserService.GetAvatarUploadURL:output_type -> user.v1.GetAvatarUploadURLResponse | ||||||
|  | 	13, // 13: user.v1.UserService.SetAvatar:output_type -> user.v1.SetAvatarResponse | ||||||
|  | 	14, // 14: user.v1.UserService.SetDescription:output_type -> user.v1.SetDescriptionResponse | ||||||
|  | 	15, // 15: user.v1.UserService.GetUserInfo:output_type -> user.v1.GetUserInfoResponse | ||||||
|  | 	8,  // [8:16] is the sub-list for method output_type | ||||||
|  | 	0,  // [0:8] 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_user_v1_service_proto_init() } | ||||||
|  | func file_user_v1_service_proto_init() { | ||||||
|  | 	if File_user_v1_service_proto != nil { | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 	file_user_v1_user_proto_init() | ||||||
|  | 	type x struct{} | ||||||
|  | 	out := protoimpl.TypeBuilder{ | ||||||
|  | 		File: protoimpl.DescBuilder{ | ||||||
|  | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
|  | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_v1_service_proto_rawDesc), len(file_user_v1_service_proto_rawDesc)), | ||||||
|  | 			NumEnums:      0, | ||||||
|  | 			NumMessages:   0, | ||||||
|  | 			NumExtensions: 0, | ||||||
|  | 			NumServices:   1, | ||||||
|  | 		}, | ||||||
|  | 		GoTypes:           file_user_v1_service_proto_goTypes, | ||||||
|  | 		DependencyIndexes: file_user_v1_service_proto_depIdxs, | ||||||
|  | 	}.Build() | ||||||
|  | 	File_user_v1_service_proto = out.File | ||||||
|  | 	file_user_v1_service_proto_goTypes = nil | ||||||
|  | 	file_user_v1_service_proto_depIdxs = nil | ||||||
|  | } | ||||||
| @@ -2,11 +2,12 @@ | |||||||
| // versions: | // versions: | ||||||
| // 	protoc-gen-go v1.36.7 | // 	protoc-gen-go v1.36.7 | ||||||
| // 	protoc        (unknown) | // 	protoc        (unknown) | ||||||
| // source: account/v1/account.proto | // source: user/v1/user.proto | ||||||
| 
 | 
 | ||||||
| package accountv1 | package userv1 | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	v1 "git.shenxianhe.cn/shenxianhe/sdk/enums/v1" | ||||||
| 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | 	protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||||||
| 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | 	protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||||||
| 	reflect "reflect" | 	reflect "reflect" | ||||||
| @@ -21,65 +22,9 @@ const ( | |||||||
| 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // 认证类型枚举 |  | ||||||
| type AuthenticationType int32 |  | ||||||
| 
 |  | ||||||
| const ( |  | ||||||
| 	AuthenticationType_AUTHENTICATION_TYPE_UNSPECIFIED AuthenticationType = 0 |  | ||||||
| 	AuthenticationType_AUTHENTICATION_TYPE_NAME        AuthenticationType = 1 // 用户名 |  | ||||||
| 	AuthenticationType_AUTHENTICATION_TYPE_PHONE       AuthenticationType = 2 // 手机号 |  | ||||||
| 	AuthenticationType_AUTHENTICATION_TYPE_EMAIL       AuthenticationType = 3 // 邮箱 |  | ||||||
| 	AuthenticationType_AUTHENTICATION_TYPE_WECHAT      AuthenticationType = 4 // 微信 |  | ||||||
| ) |  | ||||||
| 
 |  | ||||||
| // Enum value maps for AuthenticationType. |  | ||||||
| var ( |  | ||||||
| 	AuthenticationType_name = map[int32]string{ |  | ||||||
| 		0: "AUTHENTICATION_TYPE_UNSPECIFIED", |  | ||||||
| 		1: "AUTHENTICATION_TYPE_NAME", |  | ||||||
| 		2: "AUTHENTICATION_TYPE_PHONE", |  | ||||||
| 		3: "AUTHENTICATION_TYPE_EMAIL", |  | ||||||
| 		4: "AUTHENTICATION_TYPE_WECHAT", |  | ||||||
| 	} |  | ||||||
| 	AuthenticationType_value = map[string]int32{ |  | ||||||
| 		"AUTHENTICATION_TYPE_UNSPECIFIED": 0, |  | ||||||
| 		"AUTHENTICATION_TYPE_NAME":        1, |  | ||||||
| 		"AUTHENTICATION_TYPE_PHONE":       2, |  | ||||||
| 		"AUTHENTICATION_TYPE_EMAIL":       3, |  | ||||||
| 		"AUTHENTICATION_TYPE_WECHAT":      4, |  | ||||||
| 	} |  | ||||||
| ) |  | ||||||
| 
 |  | ||||||
| func (x AuthenticationType) Enum() *AuthenticationType { |  | ||||||
| 	p := new(AuthenticationType) |  | ||||||
| 	*p = x |  | ||||||
| 	return p |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (x AuthenticationType) String() string { |  | ||||||
| 	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (AuthenticationType) Descriptor() protoreflect.EnumDescriptor { |  | ||||||
| 	return file_account_v1_account_proto_enumTypes[0].Descriptor() |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (AuthenticationType) Type() protoreflect.EnumType { |  | ||||||
| 	return &file_account_v1_account_proto_enumTypes[0] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| func (x AuthenticationType) Number() protoreflect.EnumNumber { |  | ||||||
| 	return protoreflect.EnumNumber(x) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // Deprecated: Use AuthenticationType.Descriptor instead. |  | ||||||
| func (AuthenticationType) EnumDescriptor() ([]byte, []int) { |  | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{0} |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| type SendCredentialRequest struct { | type SendCredentialRequest struct { | ||||||
| 	state         protoimpl.MessageState `protogen:"open.v1"` | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	AuthType      AuthenticationType     `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=account.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型 | 	AuthType      v1.AuthenticationType  `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=enums.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型 | ||||||
| 	AuthId        string                 `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"`                                         // 认证ID,根据auth_type存储不同的账号信息 | 	AuthId        string                 `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"`                                         // 认证ID,根据auth_type存储不同的账号信息 | ||||||
| 	unknownFields protoimpl.UnknownFields | 	unknownFields protoimpl.UnknownFields | ||||||
| 	sizeCache     protoimpl.SizeCache | 	sizeCache     protoimpl.SizeCache | ||||||
| @@ -87,7 +32,7 @@ type SendCredentialRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *SendCredentialRequest) Reset() { | func (x *SendCredentialRequest) Reset() { | ||||||
| 	*x = SendCredentialRequest{} | 	*x = SendCredentialRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[0] | 	mi := &file_user_v1_user_proto_msgTypes[0] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -99,7 +44,7 @@ func (x *SendCredentialRequest) String() string { | |||||||
| func (*SendCredentialRequest) ProtoMessage() {} | func (*SendCredentialRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SendCredentialRequest) ProtoReflect() protoreflect.Message { | func (x *SendCredentialRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[0] | 	mi := &file_user_v1_user_proto_msgTypes[0] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -112,14 +57,14 @@ func (x *SendCredentialRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SendCredentialRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use SendCredentialRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*SendCredentialRequest) Descriptor() ([]byte, []int) { | func (*SendCredentialRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{0} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{0} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SendCredentialRequest) GetAuthType() AuthenticationType { | func (x *SendCredentialRequest) GetAuthType() v1.AuthenticationType { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.AuthType | 		return x.AuthType | ||||||
| 	} | 	} | ||||||
| 	return AuthenticationType_AUTHENTICATION_TYPE_UNSPECIFIED | 	return v1.AuthenticationType(0) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SendCredentialRequest) GetAuthId() string { | func (x *SendCredentialRequest) GetAuthId() string { | ||||||
| @@ -137,7 +82,7 @@ type SendCredentialResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *SendCredentialResponse) Reset() { | func (x *SendCredentialResponse) Reset() { | ||||||
| 	*x = SendCredentialResponse{} | 	*x = SendCredentialResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[1] | 	mi := &file_user_v1_user_proto_msgTypes[1] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -149,7 +94,7 @@ func (x *SendCredentialResponse) String() string { | |||||||
| func (*SendCredentialResponse) ProtoMessage() {} | func (*SendCredentialResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SendCredentialResponse) ProtoReflect() protoreflect.Message { | func (x *SendCredentialResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[1] | 	mi := &file_user_v1_user_proto_msgTypes[1] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -162,12 +107,12 @@ func (x *SendCredentialResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SendCredentialResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use SendCredentialResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*SendCredentialResponse) Descriptor() ([]byte, []int) { | func (*SendCredentialResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{1} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{1} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type AuthRequest struct { | type AuthRequest struct { | ||||||
| 	state          protoimpl.MessageState `protogen:"open.v1"` | 	state          protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	AuthType       AuthenticationType     `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=account.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型 | 	AuthType       v1.AuthenticationType  `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=enums.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型 | ||||||
| 	AuthId         string                 `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"`                                         // 认证ID,根据auth_type存储不同的账号信息 | 	AuthId         string                 `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"`                                         // 认证ID,根据auth_type存储不同的账号信息 | ||||||
| 	Credential     string                 `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`                                               // 凭证,可以是验证码或密码 | 	Credential     string                 `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`                                               // 凭证,可以是验证码或密码 | ||||||
| 	InvitationCode string                 `protobuf:"bytes,4,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"`                 // 邀请码 | 	InvitationCode string                 `protobuf:"bytes,4,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"`                 // 邀请码 | ||||||
| @@ -177,7 +122,7 @@ type AuthRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *AuthRequest) Reset() { | func (x *AuthRequest) Reset() { | ||||||
| 	*x = AuthRequest{} | 	*x = AuthRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[2] | 	mi := &file_user_v1_user_proto_msgTypes[2] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -189,7 +134,7 @@ func (x *AuthRequest) String() string { | |||||||
| func (*AuthRequest) ProtoMessage() {} | func (*AuthRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *AuthRequest) ProtoReflect() protoreflect.Message { | func (x *AuthRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[2] | 	mi := &file_user_v1_user_proto_msgTypes[2] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -202,14 +147,14 @@ func (x *AuthRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*AuthRequest) Descriptor() ([]byte, []int) { | func (*AuthRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{2} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{2} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *AuthRequest) GetAuthType() AuthenticationType { | func (x *AuthRequest) GetAuthType() v1.AuthenticationType { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.AuthType | 		return x.AuthType | ||||||
| 	} | 	} | ||||||
| 	return AuthenticationType_AUTHENTICATION_TYPE_UNSPECIFIED | 	return v1.AuthenticationType(0) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *AuthRequest) GetAuthId() string { | func (x *AuthRequest) GetAuthId() string { | ||||||
| @@ -242,7 +187,7 @@ type AuthResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *AuthResponse) Reset() { | func (x *AuthResponse) Reset() { | ||||||
| 	*x = AuthResponse{} | 	*x = AuthResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[3] | 	mi := &file_user_v1_user_proto_msgTypes[3] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -254,7 +199,7 @@ func (x *AuthResponse) String() string { | |||||||
| func (*AuthResponse) ProtoMessage() {} | func (*AuthResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *AuthResponse) ProtoReflect() protoreflect.Message { | func (x *AuthResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[3] | 	mi := &file_user_v1_user_proto_msgTypes[3] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -267,7 +212,7 @@ func (x *AuthResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*AuthResponse) Descriptor() ([]byte, []int) { | func (*AuthResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{3} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{3} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *AuthResponse) GetToken() string { | func (x *AuthResponse) GetToken() string { | ||||||
| @@ -279,7 +224,7 @@ func (x *AuthResponse) GetToken() string { | |||||||
| 
 | 
 | ||||||
| type SetPasswordRequest struct { | type SetPasswordRequest struct { | ||||||
| 	state         protoimpl.MessageState `protogen:"open.v1"` | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	AuthType      AuthenticationType     `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=account.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型 | 	AuthType      v1.AuthenticationType  `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=enums.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型 | ||||||
| 	AuthId        string                 `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"`                                         // 认证ID,根据auth_type存储不同的账号信息 | 	AuthId        string                 `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"`                                         // 认证ID,根据auth_type存储不同的账号信息 | ||||||
| 	Credential    string                 `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`                                               // 凭证,可以是验证码或旧密码 | 	Credential    string                 `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`                                               // 凭证,可以是验证码或旧密码 | ||||||
| 	Password      string                 `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`                                                   // 新密码 | 	Password      string                 `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`                                                   // 新密码 | ||||||
| @@ -289,7 +234,7 @@ type SetPasswordRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *SetPasswordRequest) Reset() { | func (x *SetPasswordRequest) Reset() { | ||||||
| 	*x = SetPasswordRequest{} | 	*x = SetPasswordRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[4] | 	mi := &file_user_v1_user_proto_msgTypes[4] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -301,7 +246,7 @@ func (x *SetPasswordRequest) String() string { | |||||||
| func (*SetPasswordRequest) ProtoMessage() {} | func (*SetPasswordRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { | func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[4] | 	mi := &file_user_v1_user_proto_msgTypes[4] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -314,14 +259,14 @@ func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*SetPasswordRequest) Descriptor() ([]byte, []int) { | func (*SetPasswordRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{4} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{4} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SetPasswordRequest) GetAuthType() AuthenticationType { | func (x *SetPasswordRequest) GetAuthType() v1.AuthenticationType { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.AuthType | 		return x.AuthType | ||||||
| 	} | 	} | ||||||
| 	return AuthenticationType_AUTHENTICATION_TYPE_UNSPECIFIED | 	return v1.AuthenticationType(0) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SetPasswordRequest) GetAuthId() string { | func (x *SetPasswordRequest) GetAuthId() string { | ||||||
| @@ -353,7 +298,7 @@ type SetPasswordResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *SetPasswordResponse) Reset() { | func (x *SetPasswordResponse) Reset() { | ||||||
| 	*x = SetPasswordResponse{} | 	*x = SetPasswordResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[5] | 	mi := &file_user_v1_user_proto_msgTypes[5] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -365,7 +310,7 @@ func (x *SetPasswordResponse) String() string { | |||||||
| func (*SetPasswordResponse) ProtoMessage() {} | func (*SetPasswordResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message { | func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[5] | 	mi := &file_user_v1_user_proto_msgTypes[5] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -378,7 +323,7 @@ func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SetPasswordResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use SetPasswordResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*SetPasswordResponse) Descriptor() ([]byte, []int) { | func (*SetPasswordResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{5} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{5} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type SetNameRequest struct { | type SetNameRequest struct { | ||||||
| @@ -390,7 +335,7 @@ type SetNameRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *SetNameRequest) Reset() { | func (x *SetNameRequest) Reset() { | ||||||
| 	*x = SetNameRequest{} | 	*x = SetNameRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[6] | 	mi := &file_user_v1_user_proto_msgTypes[6] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -402,7 +347,7 @@ func (x *SetNameRequest) String() string { | |||||||
| func (*SetNameRequest) ProtoMessage() {} | func (*SetNameRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SetNameRequest) ProtoReflect() protoreflect.Message { | func (x *SetNameRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[6] | 	mi := &file_user_v1_user_proto_msgTypes[6] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -415,7 +360,7 @@ func (x *SetNameRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SetNameRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use SetNameRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*SetNameRequest) Descriptor() ([]byte, []int) { | func (*SetNameRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{6} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{6} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SetNameRequest) GetName() string { | func (x *SetNameRequest) GetName() string { | ||||||
| @@ -433,7 +378,7 @@ type SetNameResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *SetNameResponse) Reset() { | func (x *SetNameResponse) Reset() { | ||||||
| 	*x = SetNameResponse{} | 	*x = SetNameResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[7] | 	mi := &file_user_v1_user_proto_msgTypes[7] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -445,7 +390,7 @@ func (x *SetNameResponse) String() string { | |||||||
| func (*SetNameResponse) ProtoMessage() {} | func (*SetNameResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SetNameResponse) ProtoReflect() protoreflect.Message { | func (x *SetNameResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[7] | 	mi := &file_user_v1_user_proto_msgTypes[7] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -458,7 +403,7 @@ func (x *SetNameResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SetNameResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use SetNameResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*SetNameResponse) Descriptor() ([]byte, []int) { | func (*SetNameResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{7} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{7} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type GetAvatarUploadURLRequest struct { | type GetAvatarUploadURLRequest struct { | ||||||
| @@ -469,7 +414,7 @@ type GetAvatarUploadURLRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *GetAvatarUploadURLRequest) Reset() { | func (x *GetAvatarUploadURLRequest) Reset() { | ||||||
| 	*x = GetAvatarUploadURLRequest{} | 	*x = GetAvatarUploadURLRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[8] | 	mi := &file_user_v1_user_proto_msgTypes[8] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -481,7 +426,7 @@ func (x *GetAvatarUploadURLRequest) String() string { | |||||||
| func (*GetAvatarUploadURLRequest) ProtoMessage() {} | func (*GetAvatarUploadURLRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *GetAvatarUploadURLRequest) ProtoReflect() protoreflect.Message { | func (x *GetAvatarUploadURLRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[8] | 	mi := &file_user_v1_user_proto_msgTypes[8] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -494,19 +439,20 @@ func (x *GetAvatarUploadURLRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use GetAvatarUploadURLRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use GetAvatarUploadURLRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*GetAvatarUploadURLRequest) Descriptor() ([]byte, []int) { | func (*GetAvatarUploadURLRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{8} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{8} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type GetAvatarUploadURLResponse struct { | type GetAvatarUploadURLResponse struct { | ||||||
| 	state         protoimpl.MessageState `protogen:"open.v1"` | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	Url           string                 `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` | 	Key           string                 `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` | ||||||
|  | 	Url           string                 `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` | ||||||
| 	unknownFields protoimpl.UnknownFields | 	unknownFields protoimpl.UnknownFields | ||||||
| 	sizeCache     protoimpl.SizeCache | 	sizeCache     protoimpl.SizeCache | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *GetAvatarUploadURLResponse) Reset() { | func (x *GetAvatarUploadURLResponse) Reset() { | ||||||
| 	*x = GetAvatarUploadURLResponse{} | 	*x = GetAvatarUploadURLResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[9] | 	mi := &file_user_v1_user_proto_msgTypes[9] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -518,7 +464,7 @@ func (x *GetAvatarUploadURLResponse) String() string { | |||||||
| func (*GetAvatarUploadURLResponse) ProtoMessage() {} | func (*GetAvatarUploadURLResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *GetAvatarUploadURLResponse) ProtoReflect() protoreflect.Message { | func (x *GetAvatarUploadURLResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[9] | 	mi := &file_user_v1_user_proto_msgTypes[9] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -531,7 +477,14 @@ func (x *GetAvatarUploadURLResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use GetAvatarUploadURLResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use GetAvatarUploadURLResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*GetAvatarUploadURLResponse) Descriptor() ([]byte, []int) { | func (*GetAvatarUploadURLResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{9} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{9} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *GetAvatarUploadURLResponse) GetKey() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Key | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *GetAvatarUploadURLResponse) GetUrl() string { | func (x *GetAvatarUploadURLResponse) GetUrl() string { | ||||||
| @@ -543,14 +496,14 @@ func (x *GetAvatarUploadURLResponse) GetUrl() string { | |||||||
| 
 | 
 | ||||||
| type SetAvatarRequest struct { | type SetAvatarRequest struct { | ||||||
| 	state         protoimpl.MessageState `protogen:"open.v1"` | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
| 	Url           string                 `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` | 	Key           string                 `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` | ||||||
| 	unknownFields protoimpl.UnknownFields | 	unknownFields protoimpl.UnknownFields | ||||||
| 	sizeCache     protoimpl.SizeCache | 	sizeCache     protoimpl.SizeCache | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SetAvatarRequest) Reset() { | func (x *SetAvatarRequest) Reset() { | ||||||
| 	*x = SetAvatarRequest{} | 	*x = SetAvatarRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[10] | 	mi := &file_user_v1_user_proto_msgTypes[10] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -562,7 +515,7 @@ func (x *SetAvatarRequest) String() string { | |||||||
| func (*SetAvatarRequest) ProtoMessage() {} | func (*SetAvatarRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SetAvatarRequest) ProtoReflect() protoreflect.Message { | func (x *SetAvatarRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[10] | 	mi := &file_user_v1_user_proto_msgTypes[10] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -575,12 +528,12 @@ func (x *SetAvatarRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SetAvatarRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use SetAvatarRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*SetAvatarRequest) Descriptor() ([]byte, []int) { | func (*SetAvatarRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{10} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{10} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *SetAvatarRequest) GetUrl() string { | func (x *SetAvatarRequest) GetKey() string { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.Url | 		return x.Key | ||||||
| 	} | 	} | ||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| @@ -593,7 +546,7 @@ type SetAvatarResponse struct { | |||||||
| 
 | 
 | ||||||
| func (x *SetAvatarResponse) Reset() { | func (x *SetAvatarResponse) Reset() { | ||||||
| 	*x = SetAvatarResponse{} | 	*x = SetAvatarResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[11] | 	mi := &file_user_v1_user_proto_msgTypes[11] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -605,7 +558,7 @@ func (x *SetAvatarResponse) String() string { | |||||||
| func (*SetAvatarResponse) ProtoMessage() {} | func (*SetAvatarResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *SetAvatarResponse) ProtoReflect() protoreflect.Message { | func (x *SetAvatarResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[11] | 	mi := &file_user_v1_user_proto_msgTypes[11] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -618,7 +571,87 @@ func (x *SetAvatarResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use SetAvatarResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use SetAvatarResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*SetAvatarResponse) Descriptor() ([]byte, []int) { | func (*SetAvatarResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{11} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{11} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | type SetDescriptionRequest struct { | ||||||
|  | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
|  | 	Description   string                 `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` | ||||||
|  | 	unknownFields protoimpl.UnknownFields | ||||||
|  | 	sizeCache     protoimpl.SizeCache | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionRequest) Reset() { | ||||||
|  | 	*x = SetDescriptionRequest{} | ||||||
|  | 	mi := &file_user_v1_user_proto_msgTypes[12] | ||||||
|  | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 	ms.StoreMessageInfo(mi) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionRequest) String() string { | ||||||
|  | 	return protoimpl.X.MessageStringOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (*SetDescriptionRequest) ProtoMessage() {} | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionRequest) ProtoReflect() protoreflect.Message { | ||||||
|  | 	mi := &file_user_v1_user_proto_msgTypes[12] | ||||||
|  | 	if x != nil { | ||||||
|  | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 		if ms.LoadMessageInfo() == nil { | ||||||
|  | 			ms.StoreMessageInfo(mi) | ||||||
|  | 		} | ||||||
|  | 		return ms | ||||||
|  | 	} | ||||||
|  | 	return mi.MessageOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Deprecated: Use SetDescriptionRequest.ProtoReflect.Descriptor instead. | ||||||
|  | func (*SetDescriptionRequest) Descriptor() ([]byte, []int) { | ||||||
|  | 	return file_user_v1_user_proto_rawDescGZIP(), []int{12} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionRequest) GetDescription() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Description | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | type SetDescriptionResponse struct { | ||||||
|  | 	state         protoimpl.MessageState `protogen:"open.v1"` | ||||||
|  | 	unknownFields protoimpl.UnknownFields | ||||||
|  | 	sizeCache     protoimpl.SizeCache | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionResponse) Reset() { | ||||||
|  | 	*x = SetDescriptionResponse{} | ||||||
|  | 	mi := &file_user_v1_user_proto_msgTypes[13] | ||||||
|  | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 	ms.StoreMessageInfo(mi) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionResponse) String() string { | ||||||
|  | 	return protoimpl.X.MessageStringOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (*SetDescriptionResponse) ProtoMessage() {} | ||||||
|  | 
 | ||||||
|  | func (x *SetDescriptionResponse) ProtoReflect() protoreflect.Message { | ||||||
|  | 	mi := &file_user_v1_user_proto_msgTypes[13] | ||||||
|  | 	if x != nil { | ||||||
|  | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
|  | 		if ms.LoadMessageInfo() == nil { | ||||||
|  | 			ms.StoreMessageInfo(mi) | ||||||
|  | 		} | ||||||
|  | 		return ms | ||||||
|  | 	} | ||||||
|  | 	return mi.MessageOf(x) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // Deprecated: Use SetDescriptionResponse.ProtoReflect.Descriptor instead. | ||||||
|  | func (*SetDescriptionResponse) Descriptor() ([]byte, []int) { | ||||||
|  | 	return file_user_v1_user_proto_rawDescGZIP(), []int{13} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type GetUserInfoRequest struct { | type GetUserInfoRequest struct { | ||||||
| @@ -629,7 +662,7 @@ type GetUserInfoRequest struct { | |||||||
| 
 | 
 | ||||||
| func (x *GetUserInfoRequest) Reset() { | func (x *GetUserInfoRequest) Reset() { | ||||||
| 	*x = GetUserInfoRequest{} | 	*x = GetUserInfoRequest{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[12] | 	mi := &file_user_v1_user_proto_msgTypes[14] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -641,7 +674,7 @@ func (x *GetUserInfoRequest) String() string { | |||||||
| func (*GetUserInfoRequest) ProtoMessage() {} | func (*GetUserInfoRequest) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { | func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[12] | 	mi := &file_user_v1_user_proto_msgTypes[14] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -654,7 +687,7 @@ func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead. | // Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead. | ||||||
| func (*GetUserInfoRequest) Descriptor() ([]byte, []int) { | func (*GetUserInfoRequest) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{12} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{14} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type GetUserInfoResponse struct { | type GetUserInfoResponse struct { | ||||||
| @@ -662,16 +695,17 @@ type GetUserInfoResponse struct { | |||||||
| 	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | 	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | ||||||
| 	Avatar         string                 `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` | 	Avatar         string                 `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` | ||||||
| 	InvitationCode string                 `protobuf:"bytes,3,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"` | 	InvitationCode string                 `protobuf:"bytes,3,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"` | ||||||
| 	Name           string                 `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` | 	Description    string                 `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` | ||||||
| 	Phone          string                 `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` | 	Name           string                 `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` | ||||||
| 	Email          string                 `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` | 	Phone          string                 `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"` | ||||||
|  | 	Email          string                 `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` | ||||||
| 	unknownFields  protoimpl.UnknownFields | 	unknownFields  protoimpl.UnknownFields | ||||||
| 	sizeCache      protoimpl.SizeCache | 	sizeCache      protoimpl.SizeCache | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *GetUserInfoResponse) Reset() { | func (x *GetUserInfoResponse) Reset() { | ||||||
| 	*x = GetUserInfoResponse{} | 	*x = GetUserInfoResponse{} | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[13] | 	mi := &file_user_v1_user_proto_msgTypes[15] | ||||||
| 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 	ms.StoreMessageInfo(mi) | 	ms.StoreMessageInfo(mi) | ||||||
| } | } | ||||||
| @@ -683,7 +717,7 @@ func (x *GetUserInfoResponse) String() string { | |||||||
| func (*GetUserInfoResponse) ProtoMessage() {} | func (*GetUserInfoResponse) ProtoMessage() {} | ||||||
| 
 | 
 | ||||||
| func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message { | func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message { | ||||||
| 	mi := &file_account_v1_account_proto_msgTypes[13] | 	mi := &file_user_v1_user_proto_msgTypes[15] | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||||||
| 		if ms.LoadMessageInfo() == nil { | 		if ms.LoadMessageInfo() == nil { | ||||||
| @@ -696,7 +730,7 @@ func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message { | |||||||
| 
 | 
 | ||||||
| // Deprecated: Use GetUserInfoResponse.ProtoReflect.Descriptor instead. | // Deprecated: Use GetUserInfoResponse.ProtoReflect.Descriptor instead. | ||||||
| func (*GetUserInfoResponse) Descriptor() ([]byte, []int) { | func (*GetUserInfoResponse) Descriptor() ([]byte, []int) { | ||||||
| 	return file_account_v1_account_proto_rawDescGZIP(), []int{13} | 	return file_user_v1_user_proto_rawDescGZIP(), []int{15} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (x *GetUserInfoResponse) GetId() string { | func (x *GetUserInfoResponse) GetId() string { | ||||||
| @@ -720,6 +754,13 @@ func (x *GetUserInfoResponse) GetInvitationCode() string { | |||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func (x *GetUserInfoResponse) GetDescription() string { | ||||||
|  | 	if x != nil { | ||||||
|  | 		return x.Description | ||||||
|  | 	} | ||||||
|  | 	return "" | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func (x *GetUserInfoResponse) GetName() string { | func (x *GetUserInfoResponse) GetName() string { | ||||||
| 	if x != nil { | 	if x != nil { | ||||||
| 		return x.Name | 		return x.Name | ||||||
| @@ -741,27 +782,26 @@ func (x *GetUserInfoResponse) GetEmail() string { | |||||||
| 	return "" | 	return "" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var File_account_v1_account_proto protoreflect.FileDescriptor | var File_user_v1_user_proto protoreflect.FileDescriptor | ||||||
| 
 | 
 | ||||||
| const file_account_v1_account_proto_rawDesc = "" + | const file_user_v1_user_proto_rawDesc = "" + | ||||||
| 	"\n" + | 	"\n" + | ||||||
| 	"\x18account/v1/account.proto\x12\n" + | 	"\x12user/v1/user.proto\x12\auser.v1\x1a\x13enums/v1/user.proto\"k\n" + | ||||||
| 	"account.v1\"m\n" + | 	"\x15SendCredentialRequest\x129\n" + | ||||||
| 	"\x15SendCredentialRequest\x12;\n" + | 	"\tauth_type\x18\x01 \x01(\x0e2\x1c.enums.v1.AuthenticationTypeR\bauthType\x12\x17\n" + | ||||||
| 	"\tauth_type\x18\x01 \x01(\x0e2\x1e.account.v1.AuthenticationTypeR\bauthType\x12\x17\n" + |  | ||||||
| 	"\aauth_id\x18\x02 \x01(\tR\x06authId\"\x18\n" + | 	"\aauth_id\x18\x02 \x01(\tR\x06authId\"\x18\n" + | ||||||
| 	"\x16SendCredentialResponse\"\xac\x01\n" + | 	"\x16SendCredentialResponse\"\xaa\x01\n" + | ||||||
| 	"\vAuthRequest\x12;\n" + | 	"\vAuthRequest\x129\n" + | ||||||
| 	"\tauth_type\x18\x01 \x01(\x0e2\x1e.account.v1.AuthenticationTypeR\bauthType\x12\x17\n" + | 	"\tauth_type\x18\x01 \x01(\x0e2\x1c.enums.v1.AuthenticationTypeR\bauthType\x12\x17\n" + | ||||||
| 	"\aauth_id\x18\x02 \x01(\tR\x06authId\x12\x1e\n" + | 	"\aauth_id\x18\x02 \x01(\tR\x06authId\x12\x1e\n" + | ||||||
| 	"\n" + | 	"\n" + | ||||||
| 	"credential\x18\x03 \x01(\tR\n" + | 	"credential\x18\x03 \x01(\tR\n" + | ||||||
| 	"credential\x12'\n" + | 	"credential\x12'\n" + | ||||||
| 	"\x0finvitation_code\x18\x04 \x01(\tR\x0einvitationCode\"$\n" + | 	"\x0finvitation_code\x18\x04 \x01(\tR\x0einvitationCode\"$\n" + | ||||||
| 	"\fAuthResponse\x12\x14\n" + | 	"\fAuthResponse\x12\x14\n" + | ||||||
| 	"\x05token\x18\x01 \x01(\tR\x05token\"\xa6\x01\n" + | 	"\x05token\x18\x01 \x01(\tR\x05token\"\xa4\x01\n" + | ||||||
| 	"\x12SetPasswordRequest\x12;\n" + | 	"\x12SetPasswordRequest\x129\n" + | ||||||
| 	"\tauth_type\x18\x01 \x01(\x0e2\x1e.account.v1.AuthenticationTypeR\bauthType\x12\x17\n" + | 	"\tauth_type\x18\x01 \x01(\x0e2\x1c.enums.v1.AuthenticationTypeR\bauthType\x12\x17\n" + | ||||||
| 	"\aauth_id\x18\x02 \x01(\tR\x06authId\x12\x1e\n" + | 	"\aauth_id\x18\x02 \x01(\tR\x06authId\x12\x1e\n" + | ||||||
| 	"\n" + | 	"\n" + | ||||||
| 	"credential\x18\x03 \x01(\tR\n" + | 	"credential\x18\x03 \x01(\tR\n" + | ||||||
| @@ -771,112 +811,89 @@ const file_account_v1_account_proto_rawDesc = "" + | |||||||
| 	"\x0eSetNameRequest\x12\x12\n" + | 	"\x0eSetNameRequest\x12\x12\n" + | ||||||
| 	"\x04name\x18\x01 \x01(\tR\x04name\"\x11\n" + | 	"\x04name\x18\x01 \x01(\tR\x04name\"\x11\n" + | ||||||
| 	"\x0fSetNameResponse\"\x1b\n" + | 	"\x0fSetNameResponse\"\x1b\n" + | ||||||
| 	"\x19GetAvatarUploadURLRequest\".\n" + | 	"\x19GetAvatarUploadURLRequest\"@\n" + | ||||||
| 	"\x1aGetAvatarUploadURLResponse\x12\x10\n" + | 	"\x1aGetAvatarUploadURLResponse\x12\x10\n" + | ||||||
| 	"\x03url\x18\x01 \x01(\tR\x03url\"$\n" + | 	"\x03key\x18\x01 \x01(\tR\x03key\x12\x10\n" + | ||||||
|  | 	"\x03url\x18\x02 \x01(\tR\x03url\"$\n" + | ||||||
| 	"\x10SetAvatarRequest\x12\x10\n" + | 	"\x10SetAvatarRequest\x12\x10\n" + | ||||||
| 	"\x03url\x18\x01 \x01(\tR\x03url\"\x13\n" + | 	"\x03key\x18\x01 \x01(\tR\x03key\"\x13\n" + | ||||||
| 	"\x11SetAvatarResponse\"\x14\n" + | 	"\x11SetAvatarResponse\"9\n" + | ||||||
| 	"\x12GetUserInfoRequest\"\xa6\x01\n" + | 	"\x15SetDescriptionRequest\x12 \n" + | ||||||
|  | 	"\vdescription\x18\x01 \x01(\tR\vdescription\"\x18\n" + | ||||||
|  | 	"\x16SetDescriptionResponse\"\x14\n" + | ||||||
|  | 	"\x12GetUserInfoRequest\"\xc8\x01\n" + | ||||||
| 	"\x13GetUserInfoResponse\x12\x0e\n" + | 	"\x13GetUserInfoResponse\x12\x0e\n" + | ||||||
| 	"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + | 	"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + | ||||||
| 	"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12'\n" + | 	"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12'\n" + | ||||||
| 	"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12\x12\n" + | 	"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12 \n" + | ||||||
| 	"\x04name\x18\x04 \x01(\tR\x04name\x12\x14\n" + | 	"\vdescription\x18\x04 \x01(\tR\vdescription\x12\x12\n" + | ||||||
| 	"\x05phone\x18\x05 \x01(\tR\x05phone\x12\x14\n" + | 	"\x04name\x18\x05 \x01(\tR\x04name\x12\x14\n" + | ||||||
| 	"\x05email\x18\x06 \x01(\tR\x05email*\xb5\x01\n" + | 	"\x05phone\x18\x06 \x01(\tR\x05phone\x12\x14\n" + | ||||||
| 	"\x12AuthenticationType\x12#\n" + | 	"\x05email\x18\a \x01(\tR\x05emailB1Z/git.shenxianhe.cn/shenxianhe/sdk/user/v1;userv1b\x06proto3" | ||||||
| 	"\x1fAUTHENTICATION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n" + |  | ||||||
| 	"\x18AUTHENTICATION_TYPE_NAME\x10\x01\x12\x1d\n" + |  | ||||||
| 	"\x19AUTHENTICATION_TYPE_PHONE\x10\x02\x12\x1d\n" + |  | ||||||
| 	"\x19AUTHENTICATION_TYPE_EMAIL\x10\x03\x12\x1e\n" + |  | ||||||
| 	"\x1aAUTHENTICATION_TYPE_WECHAT\x10\x042\xb7\x04\n" + |  | ||||||
| 	"\x0eAccountService\x12W\n" + |  | ||||||
| 	"\x0eSendCredential\x12!.account.v1.SendCredentialRequest\x1a\".account.v1.SendCredentialResponse\x129\n" + |  | ||||||
| 	"\x04Auth\x12\x17.account.v1.AuthRequest\x1a\x18.account.v1.AuthResponse\x12N\n" + |  | ||||||
| 	"\vSetPassword\x12\x1e.account.v1.SetPasswordRequest\x1a\x1f.account.v1.SetPasswordResponse\x12B\n" + |  | ||||||
| 	"\aSetName\x12\x1a.account.v1.SetNameRequest\x1a\x1b.account.v1.SetNameResponse\x12c\n" + |  | ||||||
| 	"\x12GetAvatarUploadURL\x12%.account.v1.GetAvatarUploadURLRequest\x1a&.account.v1.GetAvatarUploadURLResponse\x12H\n" + |  | ||||||
| 	"\tSetAvatar\x12\x1c.account.v1.SetAvatarRequest\x1a\x1d.account.v1.SetAvatarResponse\x12N\n" + |  | ||||||
| 	"\vGetUserInfo\x12\x1e.account.v1.GetUserInfoRequest\x1a\x1f.account.v1.GetUserInfoResponseB7Z5git.shenxianhe.cn/shenxianhe/sdk/account/v1;accountv1b\x06proto3" |  | ||||||
| 
 | 
 | ||||||
| var ( | var ( | ||||||
| 	file_account_v1_account_proto_rawDescOnce sync.Once | 	file_user_v1_user_proto_rawDescOnce sync.Once | ||||||
| 	file_account_v1_account_proto_rawDescData []byte | 	file_user_v1_user_proto_rawDescData []byte | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func file_account_v1_account_proto_rawDescGZIP() []byte { | func file_user_v1_user_proto_rawDescGZIP() []byte { | ||||||
| 	file_account_v1_account_proto_rawDescOnce.Do(func() { | 	file_user_v1_user_proto_rawDescOnce.Do(func() { | ||||||
| 		file_account_v1_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_account_v1_account_proto_rawDesc), len(file_account_v1_account_proto_rawDesc))) | 		file_user_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_user_v1_user_proto_rawDesc), len(file_user_v1_user_proto_rawDesc))) | ||||||
| 	}) | 	}) | ||||||
| 	return file_account_v1_account_proto_rawDescData | 	return file_user_v1_user_proto_rawDescData | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var file_account_v1_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1) | var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 16) | ||||||
| var file_account_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 14) | var file_user_v1_user_proto_goTypes = []any{ | ||||||
| var file_account_v1_account_proto_goTypes = []any{ | 	(*SendCredentialRequest)(nil),      // 0: user.v1.SendCredentialRequest | ||||||
| 	(AuthenticationType)(0),            // 0: account.v1.AuthenticationType | 	(*SendCredentialResponse)(nil),     // 1: user.v1.SendCredentialResponse | ||||||
| 	(*SendCredentialRequest)(nil),      // 1: account.v1.SendCredentialRequest | 	(*AuthRequest)(nil),                // 2: user.v1.AuthRequest | ||||||
| 	(*SendCredentialResponse)(nil),     // 2: account.v1.SendCredentialResponse | 	(*AuthResponse)(nil),               // 3: user.v1.AuthResponse | ||||||
| 	(*AuthRequest)(nil),                // 3: account.v1.AuthRequest | 	(*SetPasswordRequest)(nil),         // 4: user.v1.SetPasswordRequest | ||||||
| 	(*AuthResponse)(nil),               // 4: account.v1.AuthResponse | 	(*SetPasswordResponse)(nil),        // 5: user.v1.SetPasswordResponse | ||||||
| 	(*SetPasswordRequest)(nil),         // 5: account.v1.SetPasswordRequest | 	(*SetNameRequest)(nil),             // 6: user.v1.SetNameRequest | ||||||
| 	(*SetPasswordResponse)(nil),        // 6: account.v1.SetPasswordResponse | 	(*SetNameResponse)(nil),            // 7: user.v1.SetNameResponse | ||||||
| 	(*SetNameRequest)(nil),             // 7: account.v1.SetNameRequest | 	(*GetAvatarUploadURLRequest)(nil),  // 8: user.v1.GetAvatarUploadURLRequest | ||||||
| 	(*SetNameResponse)(nil),            // 8: account.v1.SetNameResponse | 	(*GetAvatarUploadURLResponse)(nil), // 9: user.v1.GetAvatarUploadURLResponse | ||||||
| 	(*GetAvatarUploadURLRequest)(nil),  // 9: account.v1.GetAvatarUploadURLRequest | 	(*SetAvatarRequest)(nil),           // 10: user.v1.SetAvatarRequest | ||||||
| 	(*GetAvatarUploadURLResponse)(nil), // 10: account.v1.GetAvatarUploadURLResponse | 	(*SetAvatarResponse)(nil),          // 11: user.v1.SetAvatarResponse | ||||||
| 	(*SetAvatarRequest)(nil),           // 11: account.v1.SetAvatarRequest | 	(*SetDescriptionRequest)(nil),      // 12: user.v1.SetDescriptionRequest | ||||||
| 	(*SetAvatarResponse)(nil),          // 12: account.v1.SetAvatarResponse | 	(*SetDescriptionResponse)(nil),     // 13: user.v1.SetDescriptionResponse | ||||||
| 	(*GetUserInfoRequest)(nil),         // 13: account.v1.GetUserInfoRequest | 	(*GetUserInfoRequest)(nil),         // 14: user.v1.GetUserInfoRequest | ||||||
| 	(*GetUserInfoResponse)(nil),        // 14: account.v1.GetUserInfoResponse | 	(*GetUserInfoResponse)(nil),        // 15: user.v1.GetUserInfoResponse | ||||||
|  | 	(v1.AuthenticationType)(0),         // 16: enums.v1.AuthenticationType | ||||||
| } | } | ||||||
| var file_account_v1_account_proto_depIdxs = []int32{ | var file_user_v1_user_proto_depIdxs = []int32{ | ||||||
| 	0,  // 0: account.v1.SendCredentialRequest.auth_type:type_name -> account.v1.AuthenticationType | 	16, // 0: user.v1.SendCredentialRequest.auth_type:type_name -> enums.v1.AuthenticationType | ||||||
| 	0,  // 1: account.v1.AuthRequest.auth_type:type_name -> account.v1.AuthenticationType | 	16, // 1: user.v1.AuthRequest.auth_type:type_name -> enums.v1.AuthenticationType | ||||||
| 	0,  // 2: account.v1.SetPasswordRequest.auth_type:type_name -> account.v1.AuthenticationType | 	16, // 2: user.v1.SetPasswordRequest.auth_type:type_name -> enums.v1.AuthenticationType | ||||||
| 	1,  // 3: account.v1.AccountService.SendCredential:input_type -> account.v1.SendCredentialRequest | 	3,  // [3:3] is the sub-list for method output_type | ||||||
| 	3,  // 4: account.v1.AccountService.Auth:input_type -> account.v1.AuthRequest | 	3,  // [3:3] is the sub-list for method input_type | ||||||
| 	5,  // 5: account.v1.AccountService.SetPassword:input_type -> account.v1.SetPasswordRequest |  | ||||||
| 	7,  // 6: account.v1.AccountService.SetName:input_type -> account.v1.SetNameRequest |  | ||||||
| 	9,  // 7: account.v1.AccountService.GetAvatarUploadURL:input_type -> account.v1.GetAvatarUploadURLRequest |  | ||||||
| 	11, // 8: account.v1.AccountService.SetAvatar:input_type -> account.v1.SetAvatarRequest |  | ||||||
| 	13, // 9: account.v1.AccountService.GetUserInfo:input_type -> account.v1.GetUserInfoRequest |  | ||||||
| 	2,  // 10: account.v1.AccountService.SendCredential:output_type -> account.v1.SendCredentialResponse |  | ||||||
| 	4,  // 11: account.v1.AccountService.Auth:output_type -> account.v1.AuthResponse |  | ||||||
| 	6,  // 12: account.v1.AccountService.SetPassword:output_type -> account.v1.SetPasswordResponse |  | ||||||
| 	8,  // 13: account.v1.AccountService.SetName:output_type -> account.v1.SetNameResponse |  | ||||||
| 	10, // 14: account.v1.AccountService.GetAvatarUploadURL:output_type -> account.v1.GetAvatarUploadURLResponse |  | ||||||
| 	12, // 15: account.v1.AccountService.SetAvatar:output_type -> account.v1.SetAvatarResponse |  | ||||||
| 	14, // 16: account.v1.AccountService.GetUserInfo:output_type -> account.v1.GetUserInfoResponse |  | ||||||
| 	10, // [10:17] is the sub-list for method output_type |  | ||||||
| 	3,  // [3:10] is the sub-list for method input_type |  | ||||||
| 	3,  // [3:3] is the sub-list for extension type_name | 	3,  // [3:3] is the sub-list for extension type_name | ||||||
| 	3,  // [3:3] is the sub-list for extension extendee | 	3,  // [3:3] is the sub-list for extension extendee | ||||||
| 	0,  // [0:3] is the sub-list for field type_name | 	0,  // [0:3] is the sub-list for field type_name | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func init() { file_account_v1_account_proto_init() } | func init() { file_user_v1_user_proto_init() } | ||||||
| func file_account_v1_account_proto_init() { | func file_user_v1_user_proto_init() { | ||||||
| 	if File_account_v1_account_proto != nil { | 	if File_user_v1_user_proto != nil { | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	type x struct{} | 	type x struct{} | ||||||
| 	out := protoimpl.TypeBuilder{ | 	out := protoimpl.TypeBuilder{ | ||||||
| 		File: protoimpl.DescBuilder{ | 		File: protoimpl.DescBuilder{ | ||||||
| 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||||||
| 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_v1_account_proto_rawDesc), len(file_account_v1_account_proto_rawDesc)), | 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_v1_user_proto_rawDesc), len(file_user_v1_user_proto_rawDesc)), | ||||||
| 			NumEnums:      1, | 			NumEnums:      0, | ||||||
| 			NumMessages:   14, | 			NumMessages:   16, | ||||||
| 			NumExtensions: 0, | 			NumExtensions: 0, | ||||||
| 			NumServices:   1, | 			NumServices:   0, | ||||||
| 		}, | 		}, | ||||||
| 		GoTypes:           file_account_v1_account_proto_goTypes, | 		GoTypes:           file_user_v1_user_proto_goTypes, | ||||||
| 		DependencyIndexes: file_account_v1_account_proto_depIdxs, | 		DependencyIndexes: file_user_v1_user_proto_depIdxs, | ||||||
| 		EnumInfos:         file_account_v1_account_proto_enumTypes, | 		MessageInfos:      file_user_v1_user_proto_msgTypes, | ||||||
| 		MessageInfos:      file_account_v1_account_proto_msgTypes, |  | ||||||
| 	}.Build() | 	}.Build() | ||||||
| 	File_account_v1_account_proto = out.File | 	File_user_v1_user_proto = out.File | ||||||
| 	file_account_v1_account_proto_goTypes = nil | 	file_user_v1_user_proto_goTypes = nil | ||||||
| 	file_account_v1_account_proto_depIdxs = nil | 	file_user_v1_user_proto_depIdxs = nil | ||||||
| } | } | ||||||
							
								
								
									
										307
									
								
								user/v1/userv1connect/service.connect.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										307
									
								
								user/v1/userv1connect/service.connect.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,307 @@ | |||||||
|  | // Code generated by protoc-gen-connect-go. DO NOT EDIT. | ||||||
|  | // | ||||||
|  | // Source: user/v1/service.proto | ||||||
|  |  | ||||||
|  | package userv1connect | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	connect "connectrpc.com/connect" | ||||||
|  | 	context "context" | ||||||
|  | 	errors "errors" | ||||||
|  | 	v1 "git.shenxianhe.cn/shenxianhe/sdk/user/v1" | ||||||
|  | 	http "net/http" | ||||||
|  | 	strings "strings" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // This is a compile-time assertion to ensure that this generated file and the connect package are | ||||||
|  | // compatible. If you get a compiler error that this constant is not defined, this code was | ||||||
|  | // generated with a version of connect newer than the one compiled into your binary. You can fix the | ||||||
|  | // problem by either regenerating this code with an older version of connect or updating the connect | ||||||
|  | // version compiled into your binary. | ||||||
|  | const _ = connect.IsAtLeastVersion1_13_0 | ||||||
|  |  | ||||||
|  | const ( | ||||||
|  | 	// UserServiceName is the fully-qualified name of the UserService service. | ||||||
|  | 	UserServiceName = "user.v1.UserService" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // These constants are the fully-qualified names of the RPCs defined in this package. They're | ||||||
|  | // exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. | ||||||
|  | // | ||||||
|  | // Note that these are different from the fully-qualified method names used by | ||||||
|  | // google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to | ||||||
|  | // reflection-formatted method names, remove the leading slash and convert the remaining slash to a | ||||||
|  | // period. | ||||||
|  | const ( | ||||||
|  | 	// UserServiceSendCredentialProcedure is the fully-qualified name of the UserService's | ||||||
|  | 	// SendCredential RPC. | ||||||
|  | 	UserServiceSendCredentialProcedure = "/user.v1.UserService/SendCredential" | ||||||
|  | 	// UserServiceAuthProcedure is the fully-qualified name of the UserService's Auth RPC. | ||||||
|  | 	UserServiceAuthProcedure = "/user.v1.UserService/Auth" | ||||||
|  | 	// UserServiceSetPasswordProcedure is the fully-qualified name of the UserService's SetPassword RPC. | ||||||
|  | 	UserServiceSetPasswordProcedure = "/user.v1.UserService/SetPassword" | ||||||
|  | 	// UserServiceSetNameProcedure is the fully-qualified name of the UserService's SetName RPC. | ||||||
|  | 	UserServiceSetNameProcedure = "/user.v1.UserService/SetName" | ||||||
|  | 	// UserServiceGetAvatarUploadURLProcedure is the fully-qualified name of the UserService's | ||||||
|  | 	// GetAvatarUploadURL RPC. | ||||||
|  | 	UserServiceGetAvatarUploadURLProcedure = "/user.v1.UserService/GetAvatarUploadURL" | ||||||
|  | 	// UserServiceSetAvatarProcedure is the fully-qualified name of the UserService's SetAvatar RPC. | ||||||
|  | 	UserServiceSetAvatarProcedure = "/user.v1.UserService/SetAvatar" | ||||||
|  | 	// UserServiceSetDescriptionProcedure is the fully-qualified name of the UserService's | ||||||
|  | 	// SetDescription RPC. | ||||||
|  | 	UserServiceSetDescriptionProcedure = "/user.v1.UserService/SetDescription" | ||||||
|  | 	// UserServiceGetUserInfoProcedure is the fully-qualified name of the UserService's GetUserInfo RPC. | ||||||
|  | 	UserServiceGetUserInfoProcedure = "/user.v1.UserService/GetUserInfo" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | // UserServiceClient is a client for the user.v1.UserService service. | ||||||
|  | type UserServiceClient interface { | ||||||
|  | 	SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) | ||||||
|  | 	Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) | ||||||
|  | 	SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) | ||||||
|  | 	SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) | ||||||
|  | 	GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) | ||||||
|  | 	SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) | ||||||
|  | 	SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) | ||||||
|  | 	GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // NewUserServiceClient constructs a client for the user.v1.UserService service. By default, it uses | ||||||
|  | // the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends | ||||||
|  | // uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or | ||||||
|  | // connect.WithGRPCWeb() options. | ||||||
|  | // | ||||||
|  | // The URL supplied here should be the base URL for the Connect or gRPC server (for example, | ||||||
|  | // http://api.acme.com or https://acme.com/grpc). | ||||||
|  | func NewUserServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UserServiceClient { | ||||||
|  | 	baseURL = strings.TrimRight(baseURL, "/") | ||||||
|  | 	userServiceMethods := v1.File_user_v1_service_proto.Services().ByName("UserService").Methods() | ||||||
|  | 	return &userServiceClient{ | ||||||
|  | 		sendCredential: connect.NewClient[v1.SendCredentialRequest, v1.SendCredentialResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceSendCredentialProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("SendCredential")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		auth: connect.NewClient[v1.AuthRequest, v1.AuthResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceAuthProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("Auth")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		setPassword: connect.NewClient[v1.SetPasswordRequest, v1.SetPasswordResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceSetPasswordProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("SetPassword")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		setName: connect.NewClient[v1.SetNameRequest, v1.SetNameResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceSetNameProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("SetName")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		getAvatarUploadURL: connect.NewClient[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceGetAvatarUploadURLProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("GetAvatarUploadURL")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		setAvatar: connect.NewClient[v1.SetAvatarRequest, v1.SetAvatarResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceSetAvatarProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("SetAvatar")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		setDescription: connect.NewClient[v1.SetDescriptionRequest, v1.SetDescriptionResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceSetDescriptionProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("SetDescription")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 		getUserInfo: connect.NewClient[v1.GetUserInfoRequest, v1.GetUserInfoResponse]( | ||||||
|  | 			httpClient, | ||||||
|  | 			baseURL+UserServiceGetUserInfoProcedure, | ||||||
|  | 			connect.WithSchema(userServiceMethods.ByName("GetUserInfo")), | ||||||
|  | 			connect.WithClientOptions(opts...), | ||||||
|  | 		), | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // userServiceClient implements UserServiceClient. | ||||||
|  | type userServiceClient struct { | ||||||
|  | 	sendCredential     *connect.Client[v1.SendCredentialRequest, v1.SendCredentialResponse] | ||||||
|  | 	auth               *connect.Client[v1.AuthRequest, v1.AuthResponse] | ||||||
|  | 	setPassword        *connect.Client[v1.SetPasswordRequest, v1.SetPasswordResponse] | ||||||
|  | 	setName            *connect.Client[v1.SetNameRequest, v1.SetNameResponse] | ||||||
|  | 	getAvatarUploadURL *connect.Client[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse] | ||||||
|  | 	setAvatar          *connect.Client[v1.SetAvatarRequest, v1.SetAvatarResponse] | ||||||
|  | 	setDescription     *connect.Client[v1.SetDescriptionRequest, v1.SetDescriptionResponse] | ||||||
|  | 	getUserInfo        *connect.Client[v1.GetUserInfoRequest, v1.GetUserInfoResponse] | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // SendCredential calls user.v1.UserService.SendCredential. | ||||||
|  | func (c *userServiceClient) SendCredential(ctx context.Context, req *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) { | ||||||
|  | 	return c.sendCredential.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Auth calls user.v1.UserService.Auth. | ||||||
|  | func (c *userServiceClient) Auth(ctx context.Context, req *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) { | ||||||
|  | 	return c.auth.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // SetPassword calls user.v1.UserService.SetPassword. | ||||||
|  | func (c *userServiceClient) SetPassword(ctx context.Context, req *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) { | ||||||
|  | 	return c.setPassword.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // SetName calls user.v1.UserService.SetName. | ||||||
|  | func (c *userServiceClient) SetName(ctx context.Context, req *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) { | ||||||
|  | 	return c.setName.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // GetAvatarUploadURL calls user.v1.UserService.GetAvatarUploadURL. | ||||||
|  | func (c *userServiceClient) GetAvatarUploadURL(ctx context.Context, req *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) { | ||||||
|  | 	return c.getAvatarUploadURL.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // SetAvatar calls user.v1.UserService.SetAvatar. | ||||||
|  | func (c *userServiceClient) SetAvatar(ctx context.Context, req *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) { | ||||||
|  | 	return c.setAvatar.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // SetDescription calls user.v1.UserService.SetDescription. | ||||||
|  | func (c *userServiceClient) SetDescription(ctx context.Context, req *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) { | ||||||
|  | 	return c.setDescription.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // GetUserInfo calls user.v1.UserService.GetUserInfo. | ||||||
|  | func (c *userServiceClient) GetUserInfo(ctx context.Context, req *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) { | ||||||
|  | 	return c.getUserInfo.CallUnary(ctx, req) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // UserServiceHandler is an implementation of the user.v1.UserService service. | ||||||
|  | type UserServiceHandler interface { | ||||||
|  | 	SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) | ||||||
|  | 	Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) | ||||||
|  | 	SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) | ||||||
|  | 	SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) | ||||||
|  | 	GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) | ||||||
|  | 	SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) | ||||||
|  | 	SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) | ||||||
|  | 	GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // NewUserServiceHandler builds an HTTP handler from the service implementation. It returns the path | ||||||
|  | // on which to mount the handler and the handler itself. | ||||||
|  | // | ||||||
|  | // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf | ||||||
|  | // and JSON codecs. They also support gzip compression. | ||||||
|  | func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { | ||||||
|  | 	userServiceMethods := v1.File_user_v1_service_proto.Services().ByName("UserService").Methods() | ||||||
|  | 	userServiceSendCredentialHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceSendCredentialProcedure, | ||||||
|  | 		svc.SendCredential, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("SendCredential")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceAuthHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceAuthProcedure, | ||||||
|  | 		svc.Auth, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("Auth")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceSetPasswordHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceSetPasswordProcedure, | ||||||
|  | 		svc.SetPassword, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("SetPassword")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceSetNameHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceSetNameProcedure, | ||||||
|  | 		svc.SetName, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("SetName")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceGetAvatarUploadURLHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceGetAvatarUploadURLProcedure, | ||||||
|  | 		svc.GetAvatarUploadURL, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("GetAvatarUploadURL")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceSetAvatarHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceSetAvatarProcedure, | ||||||
|  | 		svc.SetAvatar, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("SetAvatar")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceSetDescriptionHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceSetDescriptionProcedure, | ||||||
|  | 		svc.SetDescription, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("SetDescription")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	userServiceGetUserInfoHandler := connect.NewUnaryHandler( | ||||||
|  | 		UserServiceGetUserInfoProcedure, | ||||||
|  | 		svc.GetUserInfo, | ||||||
|  | 		connect.WithSchema(userServiceMethods.ByName("GetUserInfo")), | ||||||
|  | 		connect.WithHandlerOptions(opts...), | ||||||
|  | 	) | ||||||
|  | 	return "/user.v1.UserService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||||||
|  | 		switch r.URL.Path { | ||||||
|  | 		case UserServiceSendCredentialProcedure: | ||||||
|  | 			userServiceSendCredentialHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceAuthProcedure: | ||||||
|  | 			userServiceAuthHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceSetPasswordProcedure: | ||||||
|  | 			userServiceSetPasswordHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceSetNameProcedure: | ||||||
|  | 			userServiceSetNameHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceGetAvatarUploadURLProcedure: | ||||||
|  | 			userServiceGetAvatarUploadURLHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceSetAvatarProcedure: | ||||||
|  | 			userServiceSetAvatarHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceSetDescriptionProcedure: | ||||||
|  | 			userServiceSetDescriptionHandler.ServeHTTP(w, r) | ||||||
|  | 		case UserServiceGetUserInfoProcedure: | ||||||
|  | 			userServiceGetUserInfoHandler.ServeHTTP(w, r) | ||||||
|  | 		default: | ||||||
|  | 			http.NotFound(w, r) | ||||||
|  | 		} | ||||||
|  | 	}) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // UnimplementedUserServiceHandler returns CodeUnimplemented from all methods. | ||||||
|  | type UnimplementedUserServiceHandler struct{} | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.SendCredential is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.Auth is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.SetPassword is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.SetName is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.GetAvatarUploadURL is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.SetAvatar is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.SetDescription is not implemented")) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (UnimplementedUserServiceHandler) GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) { | ||||||
|  | 	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("user.v1.UserService.GetUserInfo is not implemented")) | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user