1196 lines
52 KiB
Go
1196 lines
52 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
// versions:
|
||
// - protoc-gen-go-grpc v1.5.1
|
||
// - protoc v5.29.2
|
||
// source: api/proto/user/v1/user.proto
|
||
|
||
package userv1
|
||
|
||
import (
|
||
context "context"
|
||
grpc "google.golang.org/grpc"
|
||
codes "google.golang.org/grpc/codes"
|
||
status "google.golang.org/grpc/status"
|
||
)
|
||
|
||
// This is a compile-time assertion to ensure that this generated file
|
||
// is compatible with the grpc package it is being compiled against.
|
||
// Requires gRPC-Go v1.64.0 or later.
|
||
const _ = grpc.SupportPackageIsVersion9
|
||
|
||
const (
|
||
UserService_GetUser_FullMethodName = "/hyapp.user.v1.UserService/GetUser"
|
||
UserService_BatchGetUsers_FullMethodName = "/hyapp.user.v1.UserService/BatchGetUsers"
|
||
UserService_UpdateUserProfile_FullMethodName = "/hyapp.user.v1.UserService/UpdateUserProfile"
|
||
UserService_ChangeUserCountry_FullMethodName = "/hyapp.user.v1.UserService/ChangeUserCountry"
|
||
UserService_CompleteOnboarding_FullMethodName = "/hyapp.user.v1.UserService/CompleteOnboarding"
|
||
)
|
||
|
||
// UserServiceClient is the client API for UserService service.
|
||
//
|
||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
//
|
||
// UserService 提供用户主状态、基础资料和注册资料读写接口。
|
||
type UserServiceClient interface {
|
||
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
|
||
BatchGetUsers(ctx context.Context, in *BatchGetUsersRequest, opts ...grpc.CallOption) (*BatchGetUsersResponse, error)
|
||
UpdateUserProfile(ctx context.Context, in *UpdateUserProfileRequest, opts ...grpc.CallOption) (*UpdateUserProfileResponse, error)
|
||
ChangeUserCountry(ctx context.Context, in *ChangeUserCountryRequest, opts ...grpc.CallOption) (*ChangeUserCountryResponse, error)
|
||
CompleteOnboarding(ctx context.Context, in *CompleteOnboardingRequest, opts ...grpc.CallOption) (*CompleteOnboardingResponse, error)
|
||
}
|
||
|
||
type userServiceClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
||
return &userServiceClient{cc}
|
||
}
|
||
|
||
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(GetUserResponse)
|
||
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) BatchGetUsers(ctx context.Context, in *BatchGetUsersRequest, opts ...grpc.CallOption) (*BatchGetUsersResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(BatchGetUsersResponse)
|
||
err := c.cc.Invoke(ctx, UserService_BatchGetUsers_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) UpdateUserProfile(ctx context.Context, in *UpdateUserProfileRequest, opts ...grpc.CallOption) (*UpdateUserProfileResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(UpdateUserProfileResponse)
|
||
err := c.cc.Invoke(ctx, UserService_UpdateUserProfile_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) ChangeUserCountry(ctx context.Context, in *ChangeUserCountryRequest, opts ...grpc.CallOption) (*ChangeUserCountryResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ChangeUserCountryResponse)
|
||
err := c.cc.Invoke(ctx, UserService_ChangeUserCountry_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) CompleteOnboarding(ctx context.Context, in *CompleteOnboardingRequest, opts ...grpc.CallOption) (*CompleteOnboardingResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(CompleteOnboardingResponse)
|
||
err := c.cc.Invoke(ctx, UserService_CompleteOnboarding_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// UserServiceServer is the server API for UserService service.
|
||
// All implementations must embed UnimplementedUserServiceServer
|
||
// for forward compatibility.
|
||
//
|
||
// UserService 提供用户主状态、基础资料和注册资料读写接口。
|
||
type UserServiceServer interface {
|
||
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
|
||
BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersResponse, error)
|
||
UpdateUserProfile(context.Context, *UpdateUserProfileRequest) (*UpdateUserProfileResponse, error)
|
||
ChangeUserCountry(context.Context, *ChangeUserCountryRequest) (*ChangeUserCountryResponse, error)
|
||
CompleteOnboarding(context.Context, *CompleteOnboardingRequest) (*CompleteOnboardingResponse, error)
|
||
mustEmbedUnimplementedUserServiceServer()
|
||
}
|
||
|
||
// UnimplementedUserServiceServer must be embedded to have
|
||
// forward compatible implementations.
|
||
//
|
||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||
// pointer dereference when methods are called.
|
||
type UnimplementedUserServiceServer struct{}
|
||
|
||
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method BatchGetUsers not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) UpdateUserProfile(context.Context, *UpdateUserProfileRequest) (*UpdateUserProfileResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserProfile not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) ChangeUserCountry(context.Context, *ChangeUserCountryRequest) (*ChangeUserCountryResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ChangeUserCountry not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) CompleteOnboarding(context.Context, *CompleteOnboardingRequest) (*CompleteOnboardingResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method CompleteOnboarding not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
|
||
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to UserServiceServer will
|
||
// result in compilation errors.
|
||
type UnsafeUserServiceServer interface {
|
||
mustEmbedUnimplementedUserServiceServer()
|
||
}
|
||
|
||
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
|
||
// If the following call pancis, it indicates UnimplementedUserServiceServer was
|
||
// embedded by pointer and is nil. This will cause panics if an
|
||
// unimplemented method is ever invoked, so we test this at initialization
|
||
// time to prevent it from happening at runtime later due to I/O.
|
||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||
t.testEmbeddedByValue()
|
||
}
|
||
s.RegisterService(&UserService_ServiceDesc, srv)
|
||
}
|
||
|
||
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).GetUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserService_GetUser_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_BatchGetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(BatchGetUsersRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).BatchGetUsers(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserService_BatchGetUsers_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).BatchGetUsers(ctx, req.(*BatchGetUsersRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_UpdateUserProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(UpdateUserProfileRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).UpdateUserProfile(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserService_UpdateUserProfile_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).UpdateUserProfile(ctx, req.(*UpdateUserProfileRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_ChangeUserCountry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ChangeUserCountryRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).ChangeUserCountry(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserService_ChangeUserCountry_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).ChangeUserCountry(ctx, req.(*ChangeUserCountryRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_CompleteOnboarding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(CompleteOnboardingRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).CompleteOnboarding(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserService_CompleteOnboarding_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).CompleteOnboarding(ctx, req.(*CompleteOnboardingRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var UserService_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "hyapp.user.v1.UserService",
|
||
HandlerType: (*UserServiceServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "GetUser",
|
||
Handler: _UserService_GetUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "BatchGetUsers",
|
||
Handler: _UserService_BatchGetUsers_Handler,
|
||
},
|
||
{
|
||
MethodName: "UpdateUserProfile",
|
||
Handler: _UserService_UpdateUserProfile_Handler,
|
||
},
|
||
{
|
||
MethodName: "ChangeUserCountry",
|
||
Handler: _UserService_ChangeUserCountry_Handler,
|
||
},
|
||
{
|
||
MethodName: "CompleteOnboarding",
|
||
Handler: _UserService_CompleteOnboarding_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{},
|
||
Metadata: "api/proto/user/v1/user.proto",
|
||
}
|
||
|
||
const (
|
||
CountryAdminService_CreateCountry_FullMethodName = "/hyapp.user.v1.CountryAdminService/CreateCountry"
|
||
CountryAdminService_ListCountries_FullMethodName = "/hyapp.user.v1.CountryAdminService/ListCountries"
|
||
CountryAdminService_UpdateCountry_FullMethodName = "/hyapp.user.v1.CountryAdminService/UpdateCountry"
|
||
CountryAdminService_EnableCountry_FullMethodName = "/hyapp.user.v1.CountryAdminService/EnableCountry"
|
||
CountryAdminService_DisableCountry_FullMethodName = "/hyapp.user.v1.CountryAdminService/DisableCountry"
|
||
)
|
||
|
||
// CountryAdminServiceClient is the client API for CountryAdminService service.
|
||
//
|
||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
//
|
||
// CountryAdminService 承载国家主数据管理 RPC,公网暴露前必须由 gateway admin 鉴权。
|
||
type CountryAdminServiceClient interface {
|
||
CreateCountry(ctx context.Context, in *CreateCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error)
|
||
ListCountries(ctx context.Context, in *ListCountriesRequest, opts ...grpc.CallOption) (*ListCountriesResponse, error)
|
||
UpdateCountry(ctx context.Context, in *UpdateCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error)
|
||
EnableCountry(ctx context.Context, in *EnableCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error)
|
||
DisableCountry(ctx context.Context, in *DisableCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error)
|
||
}
|
||
|
||
type countryAdminServiceClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewCountryAdminServiceClient(cc grpc.ClientConnInterface) CountryAdminServiceClient {
|
||
return &countryAdminServiceClient{cc}
|
||
}
|
||
|
||
func (c *countryAdminServiceClient) CreateCountry(ctx context.Context, in *CreateCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(CountryResponse)
|
||
err := c.cc.Invoke(ctx, CountryAdminService_CreateCountry_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *countryAdminServiceClient) ListCountries(ctx context.Context, in *ListCountriesRequest, opts ...grpc.CallOption) (*ListCountriesResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ListCountriesResponse)
|
||
err := c.cc.Invoke(ctx, CountryAdminService_ListCountries_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *countryAdminServiceClient) UpdateCountry(ctx context.Context, in *UpdateCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(CountryResponse)
|
||
err := c.cc.Invoke(ctx, CountryAdminService_UpdateCountry_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *countryAdminServiceClient) EnableCountry(ctx context.Context, in *EnableCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(CountryResponse)
|
||
err := c.cc.Invoke(ctx, CountryAdminService_EnableCountry_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *countryAdminServiceClient) DisableCountry(ctx context.Context, in *DisableCountryRequest, opts ...grpc.CallOption) (*CountryResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(CountryResponse)
|
||
err := c.cc.Invoke(ctx, CountryAdminService_DisableCountry_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// CountryAdminServiceServer is the server API for CountryAdminService service.
|
||
// All implementations must embed UnimplementedCountryAdminServiceServer
|
||
// for forward compatibility.
|
||
//
|
||
// CountryAdminService 承载国家主数据管理 RPC,公网暴露前必须由 gateway admin 鉴权。
|
||
type CountryAdminServiceServer interface {
|
||
CreateCountry(context.Context, *CreateCountryRequest) (*CountryResponse, error)
|
||
ListCountries(context.Context, *ListCountriesRequest) (*ListCountriesResponse, error)
|
||
UpdateCountry(context.Context, *UpdateCountryRequest) (*CountryResponse, error)
|
||
EnableCountry(context.Context, *EnableCountryRequest) (*CountryResponse, error)
|
||
DisableCountry(context.Context, *DisableCountryRequest) (*CountryResponse, error)
|
||
mustEmbedUnimplementedCountryAdminServiceServer()
|
||
}
|
||
|
||
// UnimplementedCountryAdminServiceServer must be embedded to have
|
||
// forward compatible implementations.
|
||
//
|
||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||
// pointer dereference when methods are called.
|
||
type UnimplementedCountryAdminServiceServer struct{}
|
||
|
||
func (UnimplementedCountryAdminServiceServer) CreateCountry(context.Context, *CreateCountryRequest) (*CountryResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method CreateCountry not implemented")
|
||
}
|
||
func (UnimplementedCountryAdminServiceServer) ListCountries(context.Context, *ListCountriesRequest) (*ListCountriesResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ListCountries not implemented")
|
||
}
|
||
func (UnimplementedCountryAdminServiceServer) UpdateCountry(context.Context, *UpdateCountryRequest) (*CountryResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method UpdateCountry not implemented")
|
||
}
|
||
func (UnimplementedCountryAdminServiceServer) EnableCountry(context.Context, *EnableCountryRequest) (*CountryResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method EnableCountry not implemented")
|
||
}
|
||
func (UnimplementedCountryAdminServiceServer) DisableCountry(context.Context, *DisableCountryRequest) (*CountryResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method DisableCountry not implemented")
|
||
}
|
||
func (UnimplementedCountryAdminServiceServer) mustEmbedUnimplementedCountryAdminServiceServer() {}
|
||
func (UnimplementedCountryAdminServiceServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeCountryAdminServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to CountryAdminServiceServer will
|
||
// result in compilation errors.
|
||
type UnsafeCountryAdminServiceServer interface {
|
||
mustEmbedUnimplementedCountryAdminServiceServer()
|
||
}
|
||
|
||
func RegisterCountryAdminServiceServer(s grpc.ServiceRegistrar, srv CountryAdminServiceServer) {
|
||
// If the following call pancis, it indicates UnimplementedCountryAdminServiceServer was
|
||
// embedded by pointer and is nil. This will cause panics if an
|
||
// unimplemented method is ever invoked, so we test this at initialization
|
||
// time to prevent it from happening at runtime later due to I/O.
|
||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||
t.testEmbeddedByValue()
|
||
}
|
||
s.RegisterService(&CountryAdminService_ServiceDesc, srv)
|
||
}
|
||
|
||
func _CountryAdminService_CreateCountry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(CreateCountryRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(CountryAdminServiceServer).CreateCountry(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: CountryAdminService_CreateCountry_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(CountryAdminServiceServer).CreateCountry(ctx, req.(*CreateCountryRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _CountryAdminService_ListCountries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ListCountriesRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(CountryAdminServiceServer).ListCountries(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: CountryAdminService_ListCountries_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(CountryAdminServiceServer).ListCountries(ctx, req.(*ListCountriesRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _CountryAdminService_UpdateCountry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(UpdateCountryRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(CountryAdminServiceServer).UpdateCountry(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: CountryAdminService_UpdateCountry_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(CountryAdminServiceServer).UpdateCountry(ctx, req.(*UpdateCountryRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _CountryAdminService_EnableCountry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(EnableCountryRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(CountryAdminServiceServer).EnableCountry(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: CountryAdminService_EnableCountry_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(CountryAdminServiceServer).EnableCountry(ctx, req.(*EnableCountryRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _CountryAdminService_DisableCountry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(DisableCountryRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(CountryAdminServiceServer).DisableCountry(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: CountryAdminService_DisableCountry_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(CountryAdminServiceServer).DisableCountry(ctx, req.(*DisableCountryRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// CountryAdminService_ServiceDesc is the grpc.ServiceDesc for CountryAdminService service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var CountryAdminService_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "hyapp.user.v1.CountryAdminService",
|
||
HandlerType: (*CountryAdminServiceServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "CreateCountry",
|
||
Handler: _CountryAdminService_CreateCountry_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListCountries",
|
||
Handler: _CountryAdminService_ListCountries_Handler,
|
||
},
|
||
{
|
||
MethodName: "UpdateCountry",
|
||
Handler: _CountryAdminService_UpdateCountry_Handler,
|
||
},
|
||
{
|
||
MethodName: "EnableCountry",
|
||
Handler: _CountryAdminService_EnableCountry_Handler,
|
||
},
|
||
{
|
||
MethodName: "DisableCountry",
|
||
Handler: _CountryAdminService_DisableCountry_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{},
|
||
Metadata: "api/proto/user/v1/user.proto",
|
||
}
|
||
|
||
const (
|
||
CountryQueryService_ListRegistrationCountries_FullMethodName = "/hyapp.user.v1.CountryQueryService/ListRegistrationCountries"
|
||
)
|
||
|
||
// CountryQueryServiceClient is the client API for CountryQueryService service.
|
||
//
|
||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
//
|
||
// CountryQueryService 承载 App 注册页公开国家列表查询。
|
||
type CountryQueryServiceClient interface {
|
||
ListRegistrationCountries(ctx context.Context, in *ListRegistrationCountriesRequest, opts ...grpc.CallOption) (*ListRegistrationCountriesResponse, error)
|
||
}
|
||
|
||
type countryQueryServiceClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewCountryQueryServiceClient(cc grpc.ClientConnInterface) CountryQueryServiceClient {
|
||
return &countryQueryServiceClient{cc}
|
||
}
|
||
|
||
func (c *countryQueryServiceClient) ListRegistrationCountries(ctx context.Context, in *ListRegistrationCountriesRequest, opts ...grpc.CallOption) (*ListRegistrationCountriesResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ListRegistrationCountriesResponse)
|
||
err := c.cc.Invoke(ctx, CountryQueryService_ListRegistrationCountries_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// CountryQueryServiceServer is the server API for CountryQueryService service.
|
||
// All implementations must embed UnimplementedCountryQueryServiceServer
|
||
// for forward compatibility.
|
||
//
|
||
// CountryQueryService 承载 App 注册页公开国家列表查询。
|
||
type CountryQueryServiceServer interface {
|
||
ListRegistrationCountries(context.Context, *ListRegistrationCountriesRequest) (*ListRegistrationCountriesResponse, error)
|
||
mustEmbedUnimplementedCountryQueryServiceServer()
|
||
}
|
||
|
||
// UnimplementedCountryQueryServiceServer must be embedded to have
|
||
// forward compatible implementations.
|
||
//
|
||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||
// pointer dereference when methods are called.
|
||
type UnimplementedCountryQueryServiceServer struct{}
|
||
|
||
func (UnimplementedCountryQueryServiceServer) ListRegistrationCountries(context.Context, *ListRegistrationCountriesRequest) (*ListRegistrationCountriesResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ListRegistrationCountries not implemented")
|
||
}
|
||
func (UnimplementedCountryQueryServiceServer) mustEmbedUnimplementedCountryQueryServiceServer() {}
|
||
func (UnimplementedCountryQueryServiceServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeCountryQueryServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to CountryQueryServiceServer will
|
||
// result in compilation errors.
|
||
type UnsafeCountryQueryServiceServer interface {
|
||
mustEmbedUnimplementedCountryQueryServiceServer()
|
||
}
|
||
|
||
func RegisterCountryQueryServiceServer(s grpc.ServiceRegistrar, srv CountryQueryServiceServer) {
|
||
// If the following call pancis, it indicates UnimplementedCountryQueryServiceServer was
|
||
// embedded by pointer and is nil. This will cause panics if an
|
||
// unimplemented method is ever invoked, so we test this at initialization
|
||
// time to prevent it from happening at runtime later due to I/O.
|
||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||
t.testEmbeddedByValue()
|
||
}
|
||
s.RegisterService(&CountryQueryService_ServiceDesc, srv)
|
||
}
|
||
|
||
func _CountryQueryService_ListRegistrationCountries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ListRegistrationCountriesRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(CountryQueryServiceServer).ListRegistrationCountries(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: CountryQueryService_ListRegistrationCountries_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(CountryQueryServiceServer).ListRegistrationCountries(ctx, req.(*ListRegistrationCountriesRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// CountryQueryService_ServiceDesc is the grpc.ServiceDesc for CountryQueryService service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var CountryQueryService_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "hyapp.user.v1.CountryQueryService",
|
||
HandlerType: (*CountryQueryServiceServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "ListRegistrationCountries",
|
||
Handler: _CountryQueryService_ListRegistrationCountries_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{},
|
||
Metadata: "api/proto/user/v1/user.proto",
|
||
}
|
||
|
||
const (
|
||
RegionAdminService_CreateRegion_FullMethodName = "/hyapp.user.v1.RegionAdminService/CreateRegion"
|
||
RegionAdminService_ListRegions_FullMethodName = "/hyapp.user.v1.RegionAdminService/ListRegions"
|
||
RegionAdminService_GetRegion_FullMethodName = "/hyapp.user.v1.RegionAdminService/GetRegion"
|
||
RegionAdminService_UpdateRegion_FullMethodName = "/hyapp.user.v1.RegionAdminService/UpdateRegion"
|
||
RegionAdminService_ReplaceRegionCountries_FullMethodName = "/hyapp.user.v1.RegionAdminService/ReplaceRegionCountries"
|
||
RegionAdminService_DisableRegion_FullMethodName = "/hyapp.user.v1.RegionAdminService/DisableRegion"
|
||
)
|
||
|
||
// RegionAdminServiceClient is the client API for RegionAdminService service.
|
||
//
|
||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
//
|
||
// RegionAdminService 承载区域和国家归属管理 RPC,公网暴露前必须由 gateway admin 鉴权。
|
||
type RegionAdminServiceClient interface {
|
||
CreateRegion(ctx context.Context, in *CreateRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error)
|
||
ListRegions(ctx context.Context, in *ListRegionsRequest, opts ...grpc.CallOption) (*ListRegionsResponse, error)
|
||
GetRegion(ctx context.Context, in *GetRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error)
|
||
UpdateRegion(ctx context.Context, in *UpdateRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error)
|
||
ReplaceRegionCountries(ctx context.Context, in *ReplaceRegionCountriesRequest, opts ...grpc.CallOption) (*RegionResponse, error)
|
||
DisableRegion(ctx context.Context, in *DisableRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error)
|
||
}
|
||
|
||
type regionAdminServiceClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewRegionAdminServiceClient(cc grpc.ClientConnInterface) RegionAdminServiceClient {
|
||
return ®ionAdminServiceClient{cc}
|
||
}
|
||
|
||
func (c *regionAdminServiceClient) CreateRegion(ctx context.Context, in *CreateRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(RegionResponse)
|
||
err := c.cc.Invoke(ctx, RegionAdminService_CreateRegion_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *regionAdminServiceClient) ListRegions(ctx context.Context, in *ListRegionsRequest, opts ...grpc.CallOption) (*ListRegionsResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ListRegionsResponse)
|
||
err := c.cc.Invoke(ctx, RegionAdminService_ListRegions_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *regionAdminServiceClient) GetRegion(ctx context.Context, in *GetRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(RegionResponse)
|
||
err := c.cc.Invoke(ctx, RegionAdminService_GetRegion_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *regionAdminServiceClient) UpdateRegion(ctx context.Context, in *UpdateRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(RegionResponse)
|
||
err := c.cc.Invoke(ctx, RegionAdminService_UpdateRegion_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *regionAdminServiceClient) ReplaceRegionCountries(ctx context.Context, in *ReplaceRegionCountriesRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(RegionResponse)
|
||
err := c.cc.Invoke(ctx, RegionAdminService_ReplaceRegionCountries_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *regionAdminServiceClient) DisableRegion(ctx context.Context, in *DisableRegionRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(RegionResponse)
|
||
err := c.cc.Invoke(ctx, RegionAdminService_DisableRegion_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// RegionAdminServiceServer is the server API for RegionAdminService service.
|
||
// All implementations must embed UnimplementedRegionAdminServiceServer
|
||
// for forward compatibility.
|
||
//
|
||
// RegionAdminService 承载区域和国家归属管理 RPC,公网暴露前必须由 gateway admin 鉴权。
|
||
type RegionAdminServiceServer interface {
|
||
CreateRegion(context.Context, *CreateRegionRequest) (*RegionResponse, error)
|
||
ListRegions(context.Context, *ListRegionsRequest) (*ListRegionsResponse, error)
|
||
GetRegion(context.Context, *GetRegionRequest) (*RegionResponse, error)
|
||
UpdateRegion(context.Context, *UpdateRegionRequest) (*RegionResponse, error)
|
||
ReplaceRegionCountries(context.Context, *ReplaceRegionCountriesRequest) (*RegionResponse, error)
|
||
DisableRegion(context.Context, *DisableRegionRequest) (*RegionResponse, error)
|
||
mustEmbedUnimplementedRegionAdminServiceServer()
|
||
}
|
||
|
||
// UnimplementedRegionAdminServiceServer must be embedded to have
|
||
// forward compatible implementations.
|
||
//
|
||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||
// pointer dereference when methods are called.
|
||
type UnimplementedRegionAdminServiceServer struct{}
|
||
|
||
func (UnimplementedRegionAdminServiceServer) CreateRegion(context.Context, *CreateRegionRequest) (*RegionResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method CreateRegion not implemented")
|
||
}
|
||
func (UnimplementedRegionAdminServiceServer) ListRegions(context.Context, *ListRegionsRequest) (*ListRegionsResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ListRegions not implemented")
|
||
}
|
||
func (UnimplementedRegionAdminServiceServer) GetRegion(context.Context, *GetRegionRequest) (*RegionResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetRegion not implemented")
|
||
}
|
||
func (UnimplementedRegionAdminServiceServer) UpdateRegion(context.Context, *UpdateRegionRequest) (*RegionResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method UpdateRegion not implemented")
|
||
}
|
||
func (UnimplementedRegionAdminServiceServer) ReplaceRegionCountries(context.Context, *ReplaceRegionCountriesRequest) (*RegionResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ReplaceRegionCountries not implemented")
|
||
}
|
||
func (UnimplementedRegionAdminServiceServer) DisableRegion(context.Context, *DisableRegionRequest) (*RegionResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method DisableRegion not implemented")
|
||
}
|
||
func (UnimplementedRegionAdminServiceServer) mustEmbedUnimplementedRegionAdminServiceServer() {}
|
||
func (UnimplementedRegionAdminServiceServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeRegionAdminServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to RegionAdminServiceServer will
|
||
// result in compilation errors.
|
||
type UnsafeRegionAdminServiceServer interface {
|
||
mustEmbedUnimplementedRegionAdminServiceServer()
|
||
}
|
||
|
||
func RegisterRegionAdminServiceServer(s grpc.ServiceRegistrar, srv RegionAdminServiceServer) {
|
||
// If the following call pancis, it indicates UnimplementedRegionAdminServiceServer was
|
||
// embedded by pointer and is nil. This will cause panics if an
|
||
// unimplemented method is ever invoked, so we test this at initialization
|
||
// time to prevent it from happening at runtime later due to I/O.
|
||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||
t.testEmbeddedByValue()
|
||
}
|
||
s.RegisterService(&RegionAdminService_ServiceDesc, srv)
|
||
}
|
||
|
||
func _RegionAdminService_CreateRegion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(CreateRegionRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(RegionAdminServiceServer).CreateRegion(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: RegionAdminService_CreateRegion_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(RegionAdminServiceServer).CreateRegion(ctx, req.(*CreateRegionRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _RegionAdminService_ListRegions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ListRegionsRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(RegionAdminServiceServer).ListRegions(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: RegionAdminService_ListRegions_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(RegionAdminServiceServer).ListRegions(ctx, req.(*ListRegionsRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _RegionAdminService_GetRegion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetRegionRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(RegionAdminServiceServer).GetRegion(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: RegionAdminService_GetRegion_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(RegionAdminServiceServer).GetRegion(ctx, req.(*GetRegionRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _RegionAdminService_UpdateRegion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(UpdateRegionRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(RegionAdminServiceServer).UpdateRegion(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: RegionAdminService_UpdateRegion_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(RegionAdminServiceServer).UpdateRegion(ctx, req.(*UpdateRegionRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _RegionAdminService_ReplaceRegionCountries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ReplaceRegionCountriesRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(RegionAdminServiceServer).ReplaceRegionCountries(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: RegionAdminService_ReplaceRegionCountries_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(RegionAdminServiceServer).ReplaceRegionCountries(ctx, req.(*ReplaceRegionCountriesRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _RegionAdminService_DisableRegion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(DisableRegionRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(RegionAdminServiceServer).DisableRegion(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: RegionAdminService_DisableRegion_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(RegionAdminServiceServer).DisableRegion(ctx, req.(*DisableRegionRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// RegionAdminService_ServiceDesc is the grpc.ServiceDesc for RegionAdminService service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var RegionAdminService_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "hyapp.user.v1.RegionAdminService",
|
||
HandlerType: (*RegionAdminServiceServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "CreateRegion",
|
||
Handler: _RegionAdminService_CreateRegion_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListRegions",
|
||
Handler: _RegionAdminService_ListRegions_Handler,
|
||
},
|
||
{
|
||
MethodName: "GetRegion",
|
||
Handler: _RegionAdminService_GetRegion_Handler,
|
||
},
|
||
{
|
||
MethodName: "UpdateRegion",
|
||
Handler: _RegionAdminService_UpdateRegion_Handler,
|
||
},
|
||
{
|
||
MethodName: "ReplaceRegionCountries",
|
||
Handler: _RegionAdminService_ReplaceRegionCountries_Handler,
|
||
},
|
||
{
|
||
MethodName: "DisableRegion",
|
||
Handler: _RegionAdminService_DisableRegion_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{},
|
||
Metadata: "api/proto/user/v1/user.proto",
|
||
}
|
||
|
||
const (
|
||
UserIdentityService_GetUserIdentity_FullMethodName = "/hyapp.user.v1.UserIdentityService/GetUserIdentity"
|
||
UserIdentityService_ResolveDisplayUserID_FullMethodName = "/hyapp.user.v1.UserIdentityService/ResolveDisplayUserID"
|
||
UserIdentityService_ChangeDisplayUserID_FullMethodName = "/hyapp.user.v1.UserIdentityService/ChangeDisplayUserID"
|
||
UserIdentityService_ApplyPrettyDisplayUserID_FullMethodName = "/hyapp.user.v1.UserIdentityService/ApplyPrettyDisplayUserID"
|
||
UserIdentityService_ExpirePrettyDisplayUserID_FullMethodName = "/hyapp.user.v1.UserIdentityService/ExpirePrettyDisplayUserID"
|
||
)
|
||
|
||
// UserIdentityServiceClient is the client API for UserIdentityService service.
|
||
//
|
||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
//
|
||
// UserIdentityService 是短号解析和变更的唯一内部 owner。
|
||
type UserIdentityServiceClient interface {
|
||
GetUserIdentity(ctx context.Context, in *GetUserIdentityRequest, opts ...grpc.CallOption) (*GetUserIdentityResponse, error)
|
||
ResolveDisplayUserID(ctx context.Context, in *ResolveDisplayUserIDRequest, opts ...grpc.CallOption) (*ResolveDisplayUserIDResponse, error)
|
||
ChangeDisplayUserID(ctx context.Context, in *ChangeDisplayUserIDRequest, opts ...grpc.CallOption) (*ChangeDisplayUserIDResponse, error)
|
||
ApplyPrettyDisplayUserID(ctx context.Context, in *ApplyPrettyDisplayUserIDRequest, opts ...grpc.CallOption) (*ApplyPrettyDisplayUserIDResponse, error)
|
||
ExpirePrettyDisplayUserID(ctx context.Context, in *ExpirePrettyDisplayUserIDRequest, opts ...grpc.CallOption) (*ExpirePrettyDisplayUserIDResponse, error)
|
||
}
|
||
|
||
type userIdentityServiceClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewUserIdentityServiceClient(cc grpc.ClientConnInterface) UserIdentityServiceClient {
|
||
return &userIdentityServiceClient{cc}
|
||
}
|
||
|
||
func (c *userIdentityServiceClient) GetUserIdentity(ctx context.Context, in *GetUserIdentityRequest, opts ...grpc.CallOption) (*GetUserIdentityResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(GetUserIdentityResponse)
|
||
err := c.cc.Invoke(ctx, UserIdentityService_GetUserIdentity_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userIdentityServiceClient) ResolveDisplayUserID(ctx context.Context, in *ResolveDisplayUserIDRequest, opts ...grpc.CallOption) (*ResolveDisplayUserIDResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ResolveDisplayUserIDResponse)
|
||
err := c.cc.Invoke(ctx, UserIdentityService_ResolveDisplayUserID_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userIdentityServiceClient) ChangeDisplayUserID(ctx context.Context, in *ChangeDisplayUserIDRequest, opts ...grpc.CallOption) (*ChangeDisplayUserIDResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ChangeDisplayUserIDResponse)
|
||
err := c.cc.Invoke(ctx, UserIdentityService_ChangeDisplayUserID_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userIdentityServiceClient) ApplyPrettyDisplayUserID(ctx context.Context, in *ApplyPrettyDisplayUserIDRequest, opts ...grpc.CallOption) (*ApplyPrettyDisplayUserIDResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ApplyPrettyDisplayUserIDResponse)
|
||
err := c.cc.Invoke(ctx, UserIdentityService_ApplyPrettyDisplayUserID_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userIdentityServiceClient) ExpirePrettyDisplayUserID(ctx context.Context, in *ExpirePrettyDisplayUserIDRequest, opts ...grpc.CallOption) (*ExpirePrettyDisplayUserIDResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ExpirePrettyDisplayUserIDResponse)
|
||
err := c.cc.Invoke(ctx, UserIdentityService_ExpirePrettyDisplayUserID_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// UserIdentityServiceServer is the server API for UserIdentityService service.
|
||
// All implementations must embed UnimplementedUserIdentityServiceServer
|
||
// for forward compatibility.
|
||
//
|
||
// UserIdentityService 是短号解析和变更的唯一内部 owner。
|
||
type UserIdentityServiceServer interface {
|
||
GetUserIdentity(context.Context, *GetUserIdentityRequest) (*GetUserIdentityResponse, error)
|
||
ResolveDisplayUserID(context.Context, *ResolveDisplayUserIDRequest) (*ResolveDisplayUserIDResponse, error)
|
||
ChangeDisplayUserID(context.Context, *ChangeDisplayUserIDRequest) (*ChangeDisplayUserIDResponse, error)
|
||
ApplyPrettyDisplayUserID(context.Context, *ApplyPrettyDisplayUserIDRequest) (*ApplyPrettyDisplayUserIDResponse, error)
|
||
ExpirePrettyDisplayUserID(context.Context, *ExpirePrettyDisplayUserIDRequest) (*ExpirePrettyDisplayUserIDResponse, error)
|
||
mustEmbedUnimplementedUserIdentityServiceServer()
|
||
}
|
||
|
||
// UnimplementedUserIdentityServiceServer must be embedded to have
|
||
// forward compatible implementations.
|
||
//
|
||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||
// pointer dereference when methods are called.
|
||
type UnimplementedUserIdentityServiceServer struct{}
|
||
|
||
func (UnimplementedUserIdentityServiceServer) GetUserIdentity(context.Context, *GetUserIdentityRequest) (*GetUserIdentityResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetUserIdentity not implemented")
|
||
}
|
||
func (UnimplementedUserIdentityServiceServer) ResolveDisplayUserID(context.Context, *ResolveDisplayUserIDRequest) (*ResolveDisplayUserIDResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ResolveDisplayUserID not implemented")
|
||
}
|
||
func (UnimplementedUserIdentityServiceServer) ChangeDisplayUserID(context.Context, *ChangeDisplayUserIDRequest) (*ChangeDisplayUserIDResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ChangeDisplayUserID not implemented")
|
||
}
|
||
func (UnimplementedUserIdentityServiceServer) ApplyPrettyDisplayUserID(context.Context, *ApplyPrettyDisplayUserIDRequest) (*ApplyPrettyDisplayUserIDResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ApplyPrettyDisplayUserID not implemented")
|
||
}
|
||
func (UnimplementedUserIdentityServiceServer) ExpirePrettyDisplayUserID(context.Context, *ExpirePrettyDisplayUserIDRequest) (*ExpirePrettyDisplayUserIDResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ExpirePrettyDisplayUserID not implemented")
|
||
}
|
||
func (UnimplementedUserIdentityServiceServer) mustEmbedUnimplementedUserIdentityServiceServer() {}
|
||
func (UnimplementedUserIdentityServiceServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeUserIdentityServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to UserIdentityServiceServer will
|
||
// result in compilation errors.
|
||
type UnsafeUserIdentityServiceServer interface {
|
||
mustEmbedUnimplementedUserIdentityServiceServer()
|
||
}
|
||
|
||
func RegisterUserIdentityServiceServer(s grpc.ServiceRegistrar, srv UserIdentityServiceServer) {
|
||
// If the following call pancis, it indicates UnimplementedUserIdentityServiceServer was
|
||
// embedded by pointer and is nil. This will cause panics if an
|
||
// unimplemented method is ever invoked, so we test this at initialization
|
||
// time to prevent it from happening at runtime later due to I/O.
|
||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||
t.testEmbeddedByValue()
|
||
}
|
||
s.RegisterService(&UserIdentityService_ServiceDesc, srv)
|
||
}
|
||
|
||
func _UserIdentityService_GetUserIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetUserIdentityRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserIdentityServiceServer).GetUserIdentity(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserIdentityService_GetUserIdentity_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserIdentityServiceServer).GetUserIdentity(ctx, req.(*GetUserIdentityRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserIdentityService_ResolveDisplayUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ResolveDisplayUserIDRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserIdentityServiceServer).ResolveDisplayUserID(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserIdentityService_ResolveDisplayUserID_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserIdentityServiceServer).ResolveDisplayUserID(ctx, req.(*ResolveDisplayUserIDRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserIdentityService_ChangeDisplayUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ChangeDisplayUserIDRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserIdentityServiceServer).ChangeDisplayUserID(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserIdentityService_ChangeDisplayUserID_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserIdentityServiceServer).ChangeDisplayUserID(ctx, req.(*ChangeDisplayUserIDRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserIdentityService_ApplyPrettyDisplayUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ApplyPrettyDisplayUserIDRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserIdentityServiceServer).ApplyPrettyDisplayUserID(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserIdentityService_ApplyPrettyDisplayUserID_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserIdentityServiceServer).ApplyPrettyDisplayUserID(ctx, req.(*ApplyPrettyDisplayUserIDRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserIdentityService_ExpirePrettyDisplayUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ExpirePrettyDisplayUserIDRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserIdentityServiceServer).ExpirePrettyDisplayUserID(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: UserIdentityService_ExpirePrettyDisplayUserID_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserIdentityServiceServer).ExpirePrettyDisplayUserID(ctx, req.(*ExpirePrettyDisplayUserIDRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// UserIdentityService_ServiceDesc is the grpc.ServiceDesc for UserIdentityService service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var UserIdentityService_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "hyapp.user.v1.UserIdentityService",
|
||
HandlerType: (*UserIdentityServiceServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "GetUserIdentity",
|
||
Handler: _UserIdentityService_GetUserIdentity_Handler,
|
||
},
|
||
{
|
||
MethodName: "ResolveDisplayUserID",
|
||
Handler: _UserIdentityService_ResolveDisplayUserID_Handler,
|
||
},
|
||
{
|
||
MethodName: "ChangeDisplayUserID",
|
||
Handler: _UserIdentityService_ChangeDisplayUserID_Handler,
|
||
},
|
||
{
|
||
MethodName: "ApplyPrettyDisplayUserID",
|
||
Handler: _UserIdentityService_ApplyPrettyDisplayUserID_Handler,
|
||
},
|
||
{
|
||
MethodName: "ExpirePrettyDisplayUserID",
|
||
Handler: _UserIdentityService_ExpirePrettyDisplayUserID_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{},
|
||
Metadata: "api/proto/user/v1/user.proto",
|
||
}
|