feat: new proto
This commit is contained in:
parent
4a87e93fd2
commit
eb4150ecba
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.19.4
|
||||
// source: generate/protobuf/member.proto
|
||||
|
||||
|
@ -8,6 +8,7 @@ package member
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
@ -15,25 +16,29 @@ import (
|
|||
|
||||
// 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.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Account_CreateUserAccount_FullMethodName = "/member.Account/CreateUserAccount"
|
||||
Account_GetUserAccountInfo_FullMethodName = "/member.Account/GetUserAccountInfo"
|
||||
Account_UpdateUserToken_FullMethodName = "/member.Account/UpdateUserToken"
|
||||
Account_GetUidByAccount_FullMethodName = "/member.Account/GetUidByAccount"
|
||||
Account_BindAccount_FullMethodName = "/member.Account/BindAccount"
|
||||
Account_BindUserInfo_FullMethodName = "/member.Account/BindUserInfo"
|
||||
Account_UpdateUserInfo_FullMethodName = "/member.Account/UpdateUserInfo"
|
||||
Account_UpdateStatus_FullMethodName = "/member.Account/UpdateStatus"
|
||||
Account_GetUserInfo_FullMethodName = "/member.Account/GetUserInfo"
|
||||
Account_ListMember_FullMethodName = "/member.Account/ListMember"
|
||||
Account_GenerateRefreshCode_FullMethodName = "/member.Account/GenerateRefreshCode"
|
||||
Account_VerifyRefreshCode_FullMethodName = "/member.Account/VerifyRefreshCode"
|
||||
Account_CheckRefreshCode_FullMethodName = "/member.Account/CheckRefreshCode"
|
||||
Account_VerifyGoogleAuthResult_FullMethodName = "/member.Account/VerifyGoogleAuthResult"
|
||||
Account_VerifyPlatformAuthResult_FullMethodName = "/member.Account/VerifyPlatformAuthResult"
|
||||
Account_CreateUserAccount_FullMethodName = "/member.Account/CreateUserAccount"
|
||||
Account_GetUserAccountInfo_FullMethodName = "/member.Account/GetUserAccountInfo"
|
||||
Account_UpdateUserToken_FullMethodName = "/member.Account/UpdateUserToken"
|
||||
Account_GetUIDByAccount_FullMethodName = "/member.Account/GetUIDByAccount"
|
||||
Account_BindAccount_FullMethodName = "/member.Account/BindAccount"
|
||||
Account_BindUserInfo_FullMethodName = "/member.Account/BindUserInfo"
|
||||
Account_BindVerifyEmail_FullMethodName = "/member.Account/BindVerifyEmail"
|
||||
Account_BindVerifyPhone_FullMethodName = "/member.Account/BindVerifyPhone"
|
||||
Account_UpdateUserInfo_FullMethodName = "/member.Account/UpdateUserInfo"
|
||||
Account_UpdateStatus_FullMethodName = "/member.Account/UpdateStatus"
|
||||
Account_GetUserInfo_FullMethodName = "/member.Account/GetUserInfo"
|
||||
Account_ListMember_FullMethodName = "/member.Account/ListMember"
|
||||
Account_GenerateRefreshCode_FullMethodName = "/member.Account/GenerateRefreshCode"
|
||||
Account_VerifyRefreshCode_FullMethodName = "/member.Account/VerifyRefreshCode"
|
||||
Account_CheckRefreshCode_FullMethodName = "/member.Account/CheckRefreshCode"
|
||||
Account_VerifyGoogleAuthResult_FullMethodName = "/member.Account/VerifyGoogleAuthResult"
|
||||
Account_VerifyPlatformAuthResult_FullMethodName = "/member.Account/VerifyPlatformAuthResult"
|
||||
Account_LineCodeToAccessToken_FullMethodName = "/member.Account/LineCodeToAccessToken"
|
||||
Account_LineGetProfileByAccessToken_FullMethodName = "/member.Account/LineGetProfileByAccessToken"
|
||||
)
|
||||
|
||||
// AccountClient is the client API for Account service.
|
||||
|
@ -46,12 +51,16 @@ type AccountClient interface {
|
|||
GetUserAccountInfo(ctx context.Context, in *GetUIDByAccountReq, opts ...grpc.CallOption) (*GetAccountInfoResp, error)
|
||||
// UpdateUserToken 更新密碼
|
||||
UpdateUserToken(ctx context.Context, in *UpdateTokenReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// GetUidByAccount 用帳號換取 UID
|
||||
GetUidByAccount(ctx context.Context, in *GetUIDByAccountReq, opts ...grpc.CallOption) (*GetUidByAccountResp, error)
|
||||
// GetUIDByAccount 用帳號換取 UID
|
||||
GetUIDByAccount(ctx context.Context, in *GetUIDByAccountReq, opts ...grpc.CallOption) (*GetUIDByAccountResp, error)
|
||||
// BindAccount 綁定帳號 -> account bind to UID
|
||||
BindAccount(ctx context.Context, in *BindingUserReq, opts ...grpc.CallOption) (*BindingUserResp, error)
|
||||
// BindUserInfo 初次,綁定 User Info
|
||||
BindUserInfo(ctx context.Context, in *CreateUserInfoReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// BindVerifyEmail 綁定 Email
|
||||
BindVerifyEmail(ctx context.Context, in *BindVerifyEmailReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// BindVerifyPhone 綁定 Phone
|
||||
BindVerifyPhone(ctx context.Context, in *BindVerifyPhoneReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// UpdateUserInfo 更新 User Info
|
||||
UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// UpdateStatus 修改狀態
|
||||
|
@ -67,9 +76,13 @@ type AccountClient interface {
|
|||
// CheckRefreshCode 驗證忘記密碼 token 不刪除,只確認)
|
||||
CheckRefreshCode(ctx context.Context, in *VerifyRefreshCodeReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// VerifyGoogleAuthResult 驗證 google 登入是否有效
|
||||
VerifyGoogleAuthResult(ctx context.Context, in *VerifyAuthResultReq, opts ...grpc.CallOption) (*VerifyAuthResultResp, error)
|
||||
VerifyGoogleAuthResult(ctx context.Context, in *VerifyAuthResultReq, opts ...grpc.CallOption) (*VerifyGoogleAuthResultResp, error)
|
||||
// VerifyPlatformAuthResult 驗證 google 登入是否有效
|
||||
VerifyPlatformAuthResult(ctx context.Context, in *VerifyAuthResultReq, opts ...grpc.CallOption) (*VerifyAuthResultResp, error)
|
||||
// LineCodeToAccessToken Line 驗證相關
|
||||
LineCodeToAccessToken(ctx context.Context, in *LineGetTokenReq, opts ...grpc.CallOption) (*LineAccessTokenResp, error)
|
||||
// LineGetProfileByAccessToken Line 驗證相關
|
||||
LineGetProfileByAccessToken(ctx context.Context, in *LineGetUserInfoReq, opts ...grpc.CallOption) (*LineUserProfile, error)
|
||||
}
|
||||
|
||||
type accountClient struct {
|
||||
|
@ -110,10 +123,10 @@ func (c *accountClient) UpdateUserToken(ctx context.Context, in *UpdateTokenReq,
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) GetUidByAccount(ctx context.Context, in *GetUIDByAccountReq, opts ...grpc.CallOption) (*GetUidByAccountResp, error) {
|
||||
func (c *accountClient) GetUIDByAccount(ctx context.Context, in *GetUIDByAccountReq, opts ...grpc.CallOption) (*GetUIDByAccountResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUidByAccountResp)
|
||||
err := c.cc.Invoke(ctx, Account_GetUidByAccount_FullMethodName, in, out, cOpts...)
|
||||
out := new(GetUIDByAccountResp)
|
||||
err := c.cc.Invoke(ctx, Account_GetUIDByAccount_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -140,6 +153,26 @@ func (c *accountClient) BindUserInfo(ctx context.Context, in *CreateUserInfoReq,
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) BindVerifyEmail(ctx context.Context, in *BindVerifyEmailReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
err := c.cc.Invoke(ctx, Account_BindVerifyEmail_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) BindVerifyPhone(ctx context.Context, in *BindVerifyPhoneReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
err := c.cc.Invoke(ctx, Account_BindVerifyPhone_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
|
@ -210,9 +243,9 @@ func (c *accountClient) CheckRefreshCode(ctx context.Context, in *VerifyRefreshC
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) VerifyGoogleAuthResult(ctx context.Context, in *VerifyAuthResultReq, opts ...grpc.CallOption) (*VerifyAuthResultResp, error) {
|
||||
func (c *accountClient) VerifyGoogleAuthResult(ctx context.Context, in *VerifyAuthResultReq, opts ...grpc.CallOption) (*VerifyGoogleAuthResultResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(VerifyAuthResultResp)
|
||||
out := new(VerifyGoogleAuthResultResp)
|
||||
err := c.cc.Invoke(ctx, Account_VerifyGoogleAuthResult_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -230,9 +263,29 @@ func (c *accountClient) VerifyPlatformAuthResult(ctx context.Context, in *Verify
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) LineCodeToAccessToken(ctx context.Context, in *LineGetTokenReq, opts ...grpc.CallOption) (*LineAccessTokenResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LineAccessTokenResp)
|
||||
err := c.cc.Invoke(ctx, Account_LineCodeToAccessToken_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) LineGetProfileByAccessToken(ctx context.Context, in *LineGetUserInfoReq, opts ...grpc.CallOption) (*LineUserProfile, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LineUserProfile)
|
||||
err := c.cc.Invoke(ctx, Account_LineGetProfileByAccessToken_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountServer is the server API for Account service.
|
||||
// All implementations must embed UnimplementedAccountServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type AccountServer interface {
|
||||
// CreateUserAccount 建立帳號與密碼 -> 可登入,但可不可以做其他事情看業務流程,也可以只註冊就好
|
||||
CreateUserAccount(context.Context, *CreateLoginUserReq) (*OKResp, error)
|
||||
|
@ -240,12 +293,16 @@ type AccountServer interface {
|
|||
GetUserAccountInfo(context.Context, *GetUIDByAccountReq) (*GetAccountInfoResp, error)
|
||||
// UpdateUserToken 更新密碼
|
||||
UpdateUserToken(context.Context, *UpdateTokenReq) (*OKResp, error)
|
||||
// GetUidByAccount 用帳號換取 UID
|
||||
GetUidByAccount(context.Context, *GetUIDByAccountReq) (*GetUidByAccountResp, error)
|
||||
// GetUIDByAccount 用帳號換取 UID
|
||||
GetUIDByAccount(context.Context, *GetUIDByAccountReq) (*GetUIDByAccountResp, error)
|
||||
// BindAccount 綁定帳號 -> account bind to UID
|
||||
BindAccount(context.Context, *BindingUserReq) (*BindingUserResp, error)
|
||||
// BindUserInfo 初次,綁定 User Info
|
||||
BindUserInfo(context.Context, *CreateUserInfoReq) (*OKResp, error)
|
||||
// BindVerifyEmail 綁定 Email
|
||||
BindVerifyEmail(context.Context, *BindVerifyEmailReq) (*OKResp, error)
|
||||
// BindVerifyPhone 綁定 Phone
|
||||
BindVerifyPhone(context.Context, *BindVerifyPhoneReq) (*OKResp, error)
|
||||
// UpdateUserInfo 更新 User Info
|
||||
UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*OKResp, error)
|
||||
// UpdateStatus 修改狀態
|
||||
|
@ -261,15 +318,22 @@ type AccountServer interface {
|
|||
// CheckRefreshCode 驗證忘記密碼 token 不刪除,只確認)
|
||||
CheckRefreshCode(context.Context, *VerifyRefreshCodeReq) (*OKResp, error)
|
||||
// VerifyGoogleAuthResult 驗證 google 登入是否有效
|
||||
VerifyGoogleAuthResult(context.Context, *VerifyAuthResultReq) (*VerifyAuthResultResp, error)
|
||||
VerifyGoogleAuthResult(context.Context, *VerifyAuthResultReq) (*VerifyGoogleAuthResultResp, error)
|
||||
// VerifyPlatformAuthResult 驗證 google 登入是否有效
|
||||
VerifyPlatformAuthResult(context.Context, *VerifyAuthResultReq) (*VerifyAuthResultResp, error)
|
||||
// LineCodeToAccessToken Line 驗證相關
|
||||
LineCodeToAccessToken(context.Context, *LineGetTokenReq) (*LineAccessTokenResp, error)
|
||||
// LineGetProfileByAccessToken Line 驗證相關
|
||||
LineGetProfileByAccessToken(context.Context, *LineGetUserInfoReq) (*LineUserProfile, error)
|
||||
mustEmbedUnimplementedAccountServer()
|
||||
}
|
||||
|
||||
// UnimplementedAccountServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedAccountServer struct {
|
||||
}
|
||||
// UnimplementedAccountServer 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 UnimplementedAccountServer struct{}
|
||||
|
||||
func (UnimplementedAccountServer) CreateUserAccount(context.Context, *CreateLoginUserReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAccount not implemented")
|
||||
|
@ -280,8 +344,8 @@ func (UnimplementedAccountServer) GetUserAccountInfo(context.Context, *GetUIDByA
|
|||
func (UnimplementedAccountServer) UpdateUserToken(context.Context, *UpdateTokenReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserToken not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) GetUidByAccount(context.Context, *GetUIDByAccountReq) (*GetUidByAccountResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUidByAccount not implemented")
|
||||
func (UnimplementedAccountServer) GetUIDByAccount(context.Context, *GetUIDByAccountReq) (*GetUIDByAccountResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUIDByAccount not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) BindAccount(context.Context, *BindingUserReq) (*BindingUserResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindAccount not implemented")
|
||||
|
@ -289,6 +353,12 @@ func (UnimplementedAccountServer) BindAccount(context.Context, *BindingUserReq)
|
|||
func (UnimplementedAccountServer) BindUserInfo(context.Context, *CreateUserInfoReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindUserInfo not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) BindVerifyEmail(context.Context, *BindVerifyEmailReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindVerifyEmail not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) BindVerifyPhone(context.Context, *BindVerifyPhoneReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindVerifyPhone not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInfo not implemented")
|
||||
}
|
||||
|
@ -310,13 +380,20 @@ func (UnimplementedAccountServer) VerifyRefreshCode(context.Context, *VerifyRefr
|
|||
func (UnimplementedAccountServer) CheckRefreshCode(context.Context, *VerifyRefreshCodeReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckRefreshCode not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) VerifyGoogleAuthResult(context.Context, *VerifyAuthResultReq) (*VerifyAuthResultResp, error) {
|
||||
func (UnimplementedAccountServer) VerifyGoogleAuthResult(context.Context, *VerifyAuthResultReq) (*VerifyGoogleAuthResultResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VerifyGoogleAuthResult not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) VerifyPlatformAuthResult(context.Context, *VerifyAuthResultReq) (*VerifyAuthResultResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VerifyPlatformAuthResult not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) LineCodeToAccessToken(context.Context, *LineGetTokenReq) (*LineAccessTokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LineCodeToAccessToken not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) LineGetProfileByAccessToken(context.Context, *LineGetUserInfoReq) (*LineUserProfile, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LineGetProfileByAccessToken not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
|
||||
func (UnimplementedAccountServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountServer will
|
||||
|
@ -326,6 +403,13 @@ type UnsafeAccountServer interface {
|
|||
}
|
||||
|
||||
func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) {
|
||||
// If the following call pancis, it indicates UnimplementedAccountServer 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(&Account_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
@ -383,20 +467,20 @@ func _Account_UpdateUserToken_Handler(srv interface{}, ctx context.Context, dec
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_GetUidByAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Account_GetUIDByAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUIDByAccountReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).GetUidByAccount(ctx, in)
|
||||
return srv.(AccountServer).GetUIDByAccount(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_GetUidByAccount_FullMethodName,
|
||||
FullMethod: Account_GetUIDByAccount_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).GetUidByAccount(ctx, req.(*GetUIDByAccountReq))
|
||||
return srv.(AccountServer).GetUIDByAccount(ctx, req.(*GetUIDByAccountReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
@ -437,6 +521,42 @@ func _Account_BindUserInfo_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_BindVerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BindVerifyEmailReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).BindVerifyEmail(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_BindVerifyEmail_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).BindVerifyEmail(ctx, req.(*BindVerifyEmailReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_BindVerifyPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BindVerifyPhoneReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).BindVerifyPhone(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_BindVerifyPhone_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).BindVerifyPhone(ctx, req.(*BindVerifyPhoneReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_UpdateUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateUserInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -599,6 +719,42 @@ func _Account_VerifyPlatformAuthResult_Handler(srv interface{}, ctx context.Cont
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_LineCodeToAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LineGetTokenReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).LineCodeToAccessToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_LineCodeToAccessToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).LineCodeToAccessToken(ctx, req.(*LineGetTokenReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_LineGetProfileByAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LineGetUserInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).LineGetProfileByAccessToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_LineGetProfileByAccessToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).LineGetProfileByAccessToken(ctx, req.(*LineGetUserInfoReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Account_ServiceDesc is the grpc.ServiceDesc for Account service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
@ -619,8 +775,8 @@ var Account_ServiceDesc = grpc.ServiceDesc{
|
|||
Handler: _Account_UpdateUserToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUidByAccount",
|
||||
Handler: _Account_GetUidByAccount_Handler,
|
||||
MethodName: "GetUIDByAccount",
|
||||
Handler: _Account_GetUIDByAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BindAccount",
|
||||
|
@ -630,6 +786,14 @@ var Account_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "BindUserInfo",
|
||||
Handler: _Account_BindUserInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BindVerifyEmail",
|
||||
Handler: _Account_BindVerifyEmail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BindVerifyPhone",
|
||||
Handler: _Account_BindVerifyPhone_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateUserInfo",
|
||||
Handler: _Account_UpdateUserInfo_Handler,
|
||||
|
@ -666,6 +830,14 @@ var Account_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "VerifyPlatformAuthResult",
|
||||
Handler: _Account_VerifyPlatformAuthResult_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LineCodeToAccessToken",
|
||||
Handler: _Account_LineCodeToAccessToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LineGetProfileByAccessToken",
|
||||
Handler: _Account_LineGetProfileByAccessToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "generate/protobuf/member.proto",
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc-gen-go v1.36.1
|
||||
// protoc v3.19.4
|
||||
// source: generate/protobuf/notification.proto
|
||||
|
||||
package notification
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -22,18 +23,16 @@ const (
|
|||
|
||||
// OKResp
|
||||
type OKResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *OKResp) Reset() {
|
||||
*x = OKResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *OKResp) String() string {
|
||||
|
@ -44,7 +43,7 @@ func (*OKResp) ProtoMessage() {}
|
|||
|
||||
func (x *OKResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
|
@ -61,18 +60,16 @@ func (*OKResp) Descriptor() ([]byte, []int) {
|
|||
|
||||
// NoneReq
|
||||
type NoneReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *NoneReq) Reset() {
|
||||
*x = NoneReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *NoneReq) String() string {
|
||||
|
@ -83,7 +80,7 @@ func (*NoneReq) ProtoMessage() {}
|
|||
|
||||
func (x *NoneReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
|
@ -99,23 +96,20 @@ func (*NoneReq) Descriptor() ([]byte, []int) {
|
|||
}
|
||||
|
||||
type SendMailReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
|
||||
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
|
||||
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendMailReq) Reset() {
|
||||
*x = SendMailReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendMailReq) String() string {
|
||||
|
@ -126,7 +120,7 @@ func (*SendMailReq) ProtoMessage() {}
|
|||
|
||||
func (x *SendMailReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
|
@ -170,22 +164,19 @@ func (x *SendMailReq) GetFrom() string {
|
|||
}
|
||||
|
||||
type SendSMSReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
|
||||
Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
|
||||
RecipientName string `protobuf:"bytes,3,opt,name=recipient_name,json=recipientName,proto3" json:"recipient_name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
|
||||
Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
|
||||
RecipientName string `protobuf:"bytes,3,opt,name=recipient_name,json=recipientName,proto3" json:"recipient_name,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendSMSReq) Reset() {
|
||||
*x = SendSMSReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendSMSReq) String() string {
|
||||
|
@ -196,7 +187,7 @@ func (*SendSMSReq) ProtoMessage() {}
|
|||
|
||||
func (x *SendSMSReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
|
@ -232,35 +223,30 @@ func (x *SendSMSReq) GetRecipientName() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
type SendByTemplateIDReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
type TemplateReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"`
|
||||
TemplateId string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
|
||||
TemplateId string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
|
||||
Lang string `protobuf:"bytes,3,opt,name=lang,proto3" json:"lang,omitempty"`
|
||||
ContentData map[string]string `protobuf:"bytes,4,rep,name=content_data,json=contentData,proto3" json:"content_data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendByTemplateIDReq) Reset() {
|
||||
*x = SendByTemplateIDReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
func (x *TemplateReq) Reset() {
|
||||
*x = TemplateReq{}
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendByTemplateIDReq) String() string {
|
||||
func (x *TemplateReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendByTemplateIDReq) ProtoMessage() {}
|
||||
func (*TemplateReq) ProtoMessage() {}
|
||||
|
||||
func (x *SendByTemplateIDReq) ProtoReflect() protoreflect.Message {
|
||||
func (x *TemplateReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
|
@ -270,37 +256,75 @@ func (x *SendByTemplateIDReq) ProtoReflect() protoreflect.Message {
|
|||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendByTemplateIDReq.ProtoReflect.Descriptor instead.
|
||||
func (*SendByTemplateIDReq) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use TemplateReq.ProtoReflect.Descriptor instead.
|
||||
func (*TemplateReq) Descriptor() ([]byte, []int) {
|
||||
return file_generate_protobuf_notification_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SendByTemplateIDReq) GetTo() string {
|
||||
func (x *TemplateReq) GetLanguage() string {
|
||||
if x != nil {
|
||||
return x.To
|
||||
return x.Language
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendByTemplateIDReq) GetTemplateId() string {
|
||||
func (x *TemplateReq) GetTemplateId() string {
|
||||
if x != nil {
|
||||
return x.TemplateId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendByTemplateIDReq) GetLang() string {
|
||||
type TemplateResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TemplateResp) Reset() {
|
||||
*x = TemplateResp{}
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TemplateResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TemplateResp) ProtoMessage() {}
|
||||
|
||||
func (x *TemplateResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_generate_protobuf_notification_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
return x.Lang
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TemplateResp.ProtoReflect.Descriptor instead.
|
||||
func (*TemplateResp) Descriptor() ([]byte, []int) {
|
||||
return file_generate_protobuf_notification_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *TemplateResp) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendByTemplateIDReq) GetContentData() map[string]string {
|
||||
func (x *TemplateResp) GetBody() string {
|
||||
if x != nil {
|
||||
return x.ContentData
|
||||
return x.Body
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_generate_protobuf_notification_proto protoreflect.FileDescriptor
|
||||
|
@ -322,42 +346,30 @@ var file_generate_protobuf_notification_proto_rawDesc = []byte{
|
|||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x25, 0x0a, 0x0e,
|
||||
0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x79, 0x54, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x74,
|
||||
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x74,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67,
|
||||
0x12, 0x55, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x79, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x3e, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x65,
|
||||
0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xa8, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64,
|
||||
0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x53, 0x65, 0x6e,
|
||||
0x64, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x14, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x4f, 0x4b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d,
|
||||
0x73, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6e, 0x6f,
|
||||
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x4b, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x4f, 0x0a, 0x14, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x42, 0x79, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x21, 0x2e, 0x6e, 0x6f, 0x74, 0x69,
|
||||
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x79, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6e,
|
||||
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x4b, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x4e, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x42, 0x79, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x21, 0x2e, 0x6e, 0x6f, 0x74, 0x69,
|
||||
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x79, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6e,
|
||||
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x4b, 0x52, 0x65,
|
||||
0x73, 0x70, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x0b, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52,
|
||||
0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1f,
|
||||
0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22,
|
||||
0x38, 0x0a, 0x0c, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0xd3, 0x01, 0x0a, 0x0d, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x53,
|
||||
0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52,
|
||||
0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2e, 0x4f, 0x4b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64,
|
||||
0x53, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e,
|
||||
0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x4b, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63,
|
||||
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42,
|
||||
0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -374,28 +386,25 @@ func file_generate_protobuf_notification_proto_rawDescGZIP() []byte {
|
|||
|
||||
var file_generate_protobuf_notification_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_generate_protobuf_notification_proto_goTypes = []any{
|
||||
(*OKResp)(nil), // 0: notification.OKResp
|
||||
(*NoneReq)(nil), // 1: notification.NoneReq
|
||||
(*SendMailReq)(nil), // 2: notification.SendMailReq
|
||||
(*SendSMSReq)(nil), // 3: notification.SendSMSReq
|
||||
(*SendByTemplateIDReq)(nil), // 4: notification.SendByTemplateIDReq
|
||||
nil, // 5: notification.SendByTemplateIDReq.ContentDataEntry
|
||||
(*OKResp)(nil), // 0: notification.OKResp
|
||||
(*NoneReq)(nil), // 1: notification.NoneReq
|
||||
(*SendMailReq)(nil), // 2: notification.SendMailReq
|
||||
(*SendSMSReq)(nil), // 3: notification.SendSMSReq
|
||||
(*TemplateReq)(nil), // 4: notification.TemplateReq
|
||||
(*TemplateResp)(nil), // 5: notification.TemplateResp
|
||||
}
|
||||
var file_generate_protobuf_notification_proto_depIdxs = []int32{
|
||||
5, // 0: notification.SendByTemplateIDReq.content_data:type_name -> notification.SendByTemplateIDReq.ContentDataEntry
|
||||
2, // 1: notification.SenderService.SendMail:input_type -> notification.SendMailReq
|
||||
3, // 2: notification.SenderService.SendSms:input_type -> notification.SendSMSReq
|
||||
4, // 3: notification.SenderService.SendMailByTemplateId:input_type -> notification.SendByTemplateIDReq
|
||||
4, // 4: notification.SenderService.SendSmsByTemplateId:input_type -> notification.SendByTemplateIDReq
|
||||
0, // 5: notification.SenderService.SendMail:output_type -> notification.OKResp
|
||||
0, // 6: notification.SenderService.SendSms:output_type -> notification.OKResp
|
||||
0, // 7: notification.SenderService.SendMailByTemplateId:output_type -> notification.OKResp
|
||||
0, // 8: notification.SenderService.SendSmsByTemplateId:output_type -> notification.OKResp
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
2, // 0: notification.SenderService.SendMail:input_type -> notification.SendMailReq
|
||||
3, // 1: notification.SenderService.SendSms:input_type -> notification.SendSMSReq
|
||||
4, // 2: notification.SenderService.GetStaticTemplate:input_type -> notification.TemplateReq
|
||||
0, // 3: notification.SenderService.SendMail:output_type -> notification.OKResp
|
||||
0, // 4: notification.SenderService.SendSms:output_type -> notification.OKResp
|
||||
5, // 5: notification.SenderService.GetStaticTemplate:output_type -> notification.TemplateResp
|
||||
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_generate_protobuf_notification_proto_init() }
|
||||
|
@ -403,68 +412,6 @@ func file_generate_protobuf_notification_proto_init() {
|
|||
if File_generate_protobuf_notification_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_generate_protobuf_notification_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*OKResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_generate_protobuf_notification_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*NoneReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_generate_protobuf_notification_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SendMailReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_generate_protobuf_notification_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SendSMSReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_generate_protobuf_notification_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SendByTemplateIDReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.19.4
|
||||
// source: generate/protobuf/notification.proto
|
||||
|
||||
|
@ -8,6 +8,7 @@ package notification
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
@ -15,14 +16,13 @@ import (
|
|||
|
||||
// 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.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
SenderService_SendMail_FullMethodName = "/notification.SenderService/SendMail"
|
||||
SenderService_SendSms_FullMethodName = "/notification.SenderService/SendSms"
|
||||
SenderService_SendMailByTemplateId_FullMethodName = "/notification.SenderService/SendMailByTemplateId"
|
||||
SenderService_SendSmsByTemplateId_FullMethodName = "/notification.SenderService/SendSmsByTemplateId"
|
||||
SenderService_SendMail_FullMethodName = "/notification.SenderService/SendMail"
|
||||
SenderService_SendSms_FullMethodName = "/notification.SenderService/SendSms"
|
||||
SenderService_GetStaticTemplate_FullMethodName = "/notification.SenderService/GetStaticTemplate"
|
||||
)
|
||||
|
||||
// SenderServiceClient is the client API for SenderService service.
|
||||
|
@ -33,10 +33,8 @@ type SenderServiceClient interface {
|
|||
SendMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// SendSms 寄簡訊
|
||||
SendSms(ctx context.Context, in *SendSMSReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// SendMailByTemplateId 寄送模板信件
|
||||
SendMailByTemplateId(ctx context.Context, in *SendByTemplateIDReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// SendSmsByTemplateId 寄送模板簡訊
|
||||
SendSmsByTemplateId(ctx context.Context, in *SendByTemplateIDReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// 取得 Template
|
||||
GetStaticTemplate(ctx context.Context, in *TemplateReq, opts ...grpc.CallOption) (*TemplateResp, error)
|
||||
}
|
||||
|
||||
type senderServiceClient struct {
|
||||
|
@ -67,20 +65,10 @@ func (c *senderServiceClient) SendSms(ctx context.Context, in *SendSMSReq, opts
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *senderServiceClient) SendMailByTemplateId(ctx context.Context, in *SendByTemplateIDReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
func (c *senderServiceClient) GetStaticTemplate(ctx context.Context, in *TemplateReq, opts ...grpc.CallOption) (*TemplateResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
err := c.cc.Invoke(ctx, SenderService_SendMailByTemplateId_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *senderServiceClient) SendSmsByTemplateId(ctx context.Context, in *SendByTemplateIDReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
err := c.cc.Invoke(ctx, SenderService_SendSmsByTemplateId_FullMethodName, in, out, cOpts...)
|
||||
out := new(TemplateResp)
|
||||
err := c.cc.Invoke(ctx, SenderService_GetStaticTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -89,22 +77,23 @@ func (c *senderServiceClient) SendSmsByTemplateId(ctx context.Context, in *SendB
|
|||
|
||||
// SenderServiceServer is the server API for SenderService service.
|
||||
// All implementations must embed UnimplementedSenderServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type SenderServiceServer interface {
|
||||
// SendMail 寄信
|
||||
SendMail(context.Context, *SendMailReq) (*OKResp, error)
|
||||
// SendSms 寄簡訊
|
||||
SendSms(context.Context, *SendSMSReq) (*OKResp, error)
|
||||
// SendMailByTemplateId 寄送模板信件
|
||||
SendMailByTemplateId(context.Context, *SendByTemplateIDReq) (*OKResp, error)
|
||||
// SendSmsByTemplateId 寄送模板簡訊
|
||||
SendSmsByTemplateId(context.Context, *SendByTemplateIDReq) (*OKResp, error)
|
||||
// 取得 Template
|
||||
GetStaticTemplate(context.Context, *TemplateReq) (*TemplateResp, error)
|
||||
mustEmbedUnimplementedSenderServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSenderServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSenderServiceServer struct {
|
||||
}
|
||||
// UnimplementedSenderServiceServer 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 UnimplementedSenderServiceServer struct{}
|
||||
|
||||
func (UnimplementedSenderServiceServer) SendMail(context.Context, *SendMailReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendMail not implemented")
|
||||
|
@ -112,13 +101,11 @@ func (UnimplementedSenderServiceServer) SendMail(context.Context, *SendMailReq)
|
|||
func (UnimplementedSenderServiceServer) SendSms(context.Context, *SendSMSReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendSms not implemented")
|
||||
}
|
||||
func (UnimplementedSenderServiceServer) SendMailByTemplateId(context.Context, *SendByTemplateIDReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendMailByTemplateId not implemented")
|
||||
}
|
||||
func (UnimplementedSenderServiceServer) SendSmsByTemplateId(context.Context, *SendByTemplateIDReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendSmsByTemplateId not implemented")
|
||||
func (UnimplementedSenderServiceServer) GetStaticTemplate(context.Context, *TemplateReq) (*TemplateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStaticTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedSenderServiceServer) mustEmbedUnimplementedSenderServiceServer() {}
|
||||
func (UnimplementedSenderServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSenderServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SenderServiceServer will
|
||||
|
@ -128,6 +115,13 @@ type UnsafeSenderServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterSenderServiceServer(s grpc.ServiceRegistrar, srv SenderServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSenderServiceServer 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(&SenderService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
@ -167,38 +161,20 @@ func _SenderService_SendSms_Handler(srv interface{}, ctx context.Context, dec fu
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SenderService_SendMailByTemplateId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendByTemplateIDReq)
|
||||
func _SenderService_GetStaticTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TemplateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SenderServiceServer).SendMailByTemplateId(ctx, in)
|
||||
return srv.(SenderServiceServer).GetStaticTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SenderService_SendMailByTemplateId_FullMethodName,
|
||||
FullMethod: SenderService_GetStaticTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SenderServiceServer).SendMailByTemplateId(ctx, req.(*SendByTemplateIDReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SenderService_SendSmsByTemplateId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendByTemplateIDReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SenderServiceServer).SendSmsByTemplateId(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SenderService_SendSmsByTemplateId_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SenderServiceServer).SendSmsByTemplateId(ctx, req.(*SendByTemplateIDReq))
|
||||
return srv.(SenderServiceServer).GetStaticTemplate(ctx, req.(*TemplateReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
@ -219,12 +195,8 @@ var SenderService_ServiceDesc = grpc.ServiceDesc{
|
|||
Handler: _SenderService_SendSms_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendMailByTemplateId",
|
||||
Handler: _SenderService_SendMailByTemplateId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendSmsByTemplateId",
|
||||
Handler: _SenderService_SendSmsByTemplateId_Handler,
|
||||
MethodName: "GetStaticTemplate",
|
||||
Handler: _SenderService_GetStaticTemplate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.19.4
|
||||
// source: generate/protobuf/permission.proto
|
||||
|
||||
|
@ -15,8 +15,8 @@ import (
|
|||
|
||||
// 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.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
TokenService_NewToken_FullMethodName = "/permission.TokenService/NewToken"
|
||||
|
@ -24,11 +24,9 @@ const (
|
|||
TokenService_CancelToken_FullMethodName = "/permission.TokenService/CancelToken"
|
||||
TokenService_ValidationToken_FullMethodName = "/permission.TokenService/ValidationToken"
|
||||
TokenService_CancelTokens_FullMethodName = "/permission.TokenService/CancelTokens"
|
||||
TokenService_CancelTokenByDeviceId_FullMethodName = "/permission.TokenService/CancelTokenByDeviceId"
|
||||
TokenService_GetUserTokensByDeviceId_FullMethodName = "/permission.TokenService/GetUserTokensByDeviceId"
|
||||
TokenService_GetUserTokensByUid_FullMethodName = "/permission.TokenService/GetUserTokensByUid"
|
||||
TokenService_NewOneTimeToken_FullMethodName = "/permission.TokenService/NewOneTimeToken"
|
||||
TokenService_CancelOneTimeToken_FullMethodName = "/permission.TokenService/CancelOneTimeToken"
|
||||
TokenService_CancelTokenByDeviceID_FullMethodName = "/permission.TokenService/CancelTokenByDeviceID"
|
||||
TokenService_GetUserTokensByDeviceID_FullMethodName = "/permission.TokenService/GetUserTokensByDeviceID"
|
||||
TokenService_GetUserTokensByUID_FullMethodName = "/permission.TokenService/GetUserTokensByUID"
|
||||
)
|
||||
|
||||
// TokenServiceClient is the client API for TokenService service.
|
||||
|
@ -49,16 +47,12 @@ type TokenServiceClient interface {
|
|||
ValidationToken(ctx context.Context, in *ValidationTokenReq, opts ...grpc.CallOption) (*ValidationTokenResp, error)
|
||||
// CancelTokens 取消 Token 從UID 視角,以及 token id 視角出發, UID 登出,底下所有 Device ID 也要登出, Token ID 登出, 所有 UID + Device 都要登出
|
||||
CancelTokens(ctx context.Context, in *DoTokenByUIDReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// CancelTokenByDeviceId 取消 Token, 從 Device 視角出發,可以選,登出這個Device 下所有 token ,登出這個Device 下指定token
|
||||
CancelTokenByDeviceId(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// GetUserTokensByDeviceId 取得目前所對應的 DeviceID 所存在的 Tokens
|
||||
GetUserTokensByDeviceId(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*Tokens, error)
|
||||
// GetUserTokensByUid 取得目前所對應的 UID 所存在的 Tokens
|
||||
GetUserTokensByUid(ctx context.Context, in *QueryTokenByUIDReq, opts ...grpc.CallOption) (*Tokens, error)
|
||||
// NewOneTimeToken 建立一次性使用,例如:RefreshToken
|
||||
NewOneTimeToken(ctx context.Context, in *CreateOneTimeTokenReq, opts ...grpc.CallOption) (*CreateOneTimeTokenResp, error)
|
||||
// CancelOneTimeToken 取消一次性使用
|
||||
CancelOneTimeToken(ctx context.Context, in *CancelOneTimeTokenReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// CancelTokenByDeviceID 取消 Token, 從 Device 視角出發,可以選,登出這個Device 下所有 token ,登出這個Device 下指定token
|
||||
CancelTokenByDeviceID(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*OKResp, error)
|
||||
// GetUserTokensByDeviceID 取得目前所對應的 DeviceID 所存在的 Tokens
|
||||
GetUserTokensByDeviceID(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*Tokens, error)
|
||||
// GetUserTokensByUID 取得目前所對應的 UID 所存在的 Tokens
|
||||
GetUserTokensByUID(ctx context.Context, in *QueryTokenByUIDReq, opts ...grpc.CallOption) (*Tokens, error)
|
||||
}
|
||||
|
||||
type tokenServiceClient struct {
|
||||
|
@ -119,50 +113,30 @@ func (c *tokenServiceClient) CancelTokens(ctx context.Context, in *DoTokenByUIDR
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tokenServiceClient) CancelTokenByDeviceId(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
func (c *tokenServiceClient) CancelTokenByDeviceID(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
err := c.cc.Invoke(ctx, TokenService_CancelTokenByDeviceId_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, TokenService_CancelTokenByDeviceID_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tokenServiceClient) GetUserTokensByDeviceId(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*Tokens, error) {
|
||||
func (c *tokenServiceClient) GetUserTokensByDeviceID(ctx context.Context, in *DoTokenByDeviceIDReq, opts ...grpc.CallOption) (*Tokens, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Tokens)
|
||||
err := c.cc.Invoke(ctx, TokenService_GetUserTokensByDeviceId_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, TokenService_GetUserTokensByDeviceID_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tokenServiceClient) GetUserTokensByUid(ctx context.Context, in *QueryTokenByUIDReq, opts ...grpc.CallOption) (*Tokens, error) {
|
||||
func (c *tokenServiceClient) GetUserTokensByUID(ctx context.Context, in *QueryTokenByUIDReq, opts ...grpc.CallOption) (*Tokens, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Tokens)
|
||||
err := c.cc.Invoke(ctx, TokenService_GetUserTokensByUid_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tokenServiceClient) NewOneTimeToken(ctx context.Context, in *CreateOneTimeTokenReq, opts ...grpc.CallOption) (*CreateOneTimeTokenResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateOneTimeTokenResp)
|
||||
err := c.cc.Invoke(ctx, TokenService_NewOneTimeToken_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tokenServiceClient) CancelOneTimeToken(ctx context.Context, in *CancelOneTimeTokenReq, opts ...grpc.CallOption) (*OKResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(OKResp)
|
||||
err := c.cc.Invoke(ctx, TokenService_CancelOneTimeToken_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, TokenService_GetUserTokensByUID_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -171,7 +145,7 @@ func (c *tokenServiceClient) CancelOneTimeToken(ctx context.Context, in *CancelO
|
|||
|
||||
// TokenServiceServer is the server API for TokenService service.
|
||||
// All implementations must embed UnimplementedTokenServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 跟 Token 相關的大小事,這次只回應錯誤,以及結果,不統一規範
|
||||
// 錯誤碼應該在 Biz GW 在做回應,另外我這邊取名字比較通用,
|
||||
|
@ -187,22 +161,21 @@ type TokenServiceServer interface {
|
|||
ValidationToken(context.Context, *ValidationTokenReq) (*ValidationTokenResp, error)
|
||||
// CancelTokens 取消 Token 從UID 視角,以及 token id 視角出發, UID 登出,底下所有 Device ID 也要登出, Token ID 登出, 所有 UID + Device 都要登出
|
||||
CancelTokens(context.Context, *DoTokenByUIDReq) (*OKResp, error)
|
||||
// CancelTokenByDeviceId 取消 Token, 從 Device 視角出發,可以選,登出這個Device 下所有 token ,登出這個Device 下指定token
|
||||
CancelTokenByDeviceId(context.Context, *DoTokenByDeviceIDReq) (*OKResp, error)
|
||||
// GetUserTokensByDeviceId 取得目前所對應的 DeviceID 所存在的 Tokens
|
||||
GetUserTokensByDeviceId(context.Context, *DoTokenByDeviceIDReq) (*Tokens, error)
|
||||
// GetUserTokensByUid 取得目前所對應的 UID 所存在的 Tokens
|
||||
GetUserTokensByUid(context.Context, *QueryTokenByUIDReq) (*Tokens, error)
|
||||
// NewOneTimeToken 建立一次性使用,例如:RefreshToken
|
||||
NewOneTimeToken(context.Context, *CreateOneTimeTokenReq) (*CreateOneTimeTokenResp, error)
|
||||
// CancelOneTimeToken 取消一次性使用
|
||||
CancelOneTimeToken(context.Context, *CancelOneTimeTokenReq) (*OKResp, error)
|
||||
// CancelTokenByDeviceID 取消 Token, 從 Device 視角出發,可以選,登出這個Device 下所有 token ,登出這個Device 下指定token
|
||||
CancelTokenByDeviceID(context.Context, *DoTokenByDeviceIDReq) (*OKResp, error)
|
||||
// GetUserTokensByDeviceID 取得目前所對應的 DeviceID 所存在的 Tokens
|
||||
GetUserTokensByDeviceID(context.Context, *DoTokenByDeviceIDReq) (*Tokens, error)
|
||||
// GetUserTokensByUID 取得目前所對應的 UID 所存在的 Tokens
|
||||
GetUserTokensByUID(context.Context, *QueryTokenByUIDReq) (*Tokens, error)
|
||||
mustEmbedUnimplementedTokenServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedTokenServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedTokenServiceServer struct {
|
||||
}
|
||||
// UnimplementedTokenServiceServer 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 UnimplementedTokenServiceServer struct{}
|
||||
|
||||
func (UnimplementedTokenServiceServer) NewToken(context.Context, *AuthorizationReq) (*TokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NewToken not implemented")
|
||||
|
@ -219,22 +192,17 @@ func (UnimplementedTokenServiceServer) ValidationToken(context.Context, *Validat
|
|||
func (UnimplementedTokenServiceServer) CancelTokens(context.Context, *DoTokenByUIDReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelTokens not implemented")
|
||||
}
|
||||
func (UnimplementedTokenServiceServer) CancelTokenByDeviceId(context.Context, *DoTokenByDeviceIDReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelTokenByDeviceId not implemented")
|
||||
func (UnimplementedTokenServiceServer) CancelTokenByDeviceID(context.Context, *DoTokenByDeviceIDReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelTokenByDeviceID not implemented")
|
||||
}
|
||||
func (UnimplementedTokenServiceServer) GetUserTokensByDeviceId(context.Context, *DoTokenByDeviceIDReq) (*Tokens, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserTokensByDeviceId not implemented")
|
||||
func (UnimplementedTokenServiceServer) GetUserTokensByDeviceID(context.Context, *DoTokenByDeviceIDReq) (*Tokens, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserTokensByDeviceID not implemented")
|
||||
}
|
||||
func (UnimplementedTokenServiceServer) GetUserTokensByUid(context.Context, *QueryTokenByUIDReq) (*Tokens, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserTokensByUid not implemented")
|
||||
}
|
||||
func (UnimplementedTokenServiceServer) NewOneTimeToken(context.Context, *CreateOneTimeTokenReq) (*CreateOneTimeTokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NewOneTimeToken not implemented")
|
||||
}
|
||||
func (UnimplementedTokenServiceServer) CancelOneTimeToken(context.Context, *CancelOneTimeTokenReq) (*OKResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelOneTimeToken not implemented")
|
||||
func (UnimplementedTokenServiceServer) GetUserTokensByUID(context.Context, *QueryTokenByUIDReq) (*Tokens, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserTokensByUID not implemented")
|
||||
}
|
||||
func (UnimplementedTokenServiceServer) mustEmbedUnimplementedTokenServiceServer() {}
|
||||
func (UnimplementedTokenServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTokenServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TokenServiceServer will
|
||||
|
@ -244,6 +212,13 @@ type UnsafeTokenServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedTokenServiceServer 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(&TokenService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
@ -337,92 +312,56 @@ func _TokenService_CancelTokens_Handler(srv interface{}, ctx context.Context, de
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TokenService_CancelTokenByDeviceId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _TokenService_CancelTokenByDeviceID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DoTokenByDeviceIDReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TokenServiceServer).CancelTokenByDeviceId(ctx, in)
|
||||
return srv.(TokenServiceServer).CancelTokenByDeviceID(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TokenService_CancelTokenByDeviceId_FullMethodName,
|
||||
FullMethod: TokenService_CancelTokenByDeviceID_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TokenServiceServer).CancelTokenByDeviceId(ctx, req.(*DoTokenByDeviceIDReq))
|
||||
return srv.(TokenServiceServer).CancelTokenByDeviceID(ctx, req.(*DoTokenByDeviceIDReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TokenService_GetUserTokensByDeviceId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _TokenService_GetUserTokensByDeviceID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DoTokenByDeviceIDReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TokenServiceServer).GetUserTokensByDeviceId(ctx, in)
|
||||
return srv.(TokenServiceServer).GetUserTokensByDeviceID(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TokenService_GetUserTokensByDeviceId_FullMethodName,
|
||||
FullMethod: TokenService_GetUserTokensByDeviceID_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TokenServiceServer).GetUserTokensByDeviceId(ctx, req.(*DoTokenByDeviceIDReq))
|
||||
return srv.(TokenServiceServer).GetUserTokensByDeviceID(ctx, req.(*DoTokenByDeviceIDReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TokenService_GetUserTokensByUid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _TokenService_GetUserTokensByUID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryTokenByUIDReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TokenServiceServer).GetUserTokensByUid(ctx, in)
|
||||
return srv.(TokenServiceServer).GetUserTokensByUID(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TokenService_GetUserTokensByUid_FullMethodName,
|
||||
FullMethod: TokenService_GetUserTokensByUID_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TokenServiceServer).GetUserTokensByUid(ctx, req.(*QueryTokenByUIDReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TokenService_NewOneTimeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateOneTimeTokenReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TokenServiceServer).NewOneTimeToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TokenService_NewOneTimeToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TokenServiceServer).NewOneTimeToken(ctx, req.(*CreateOneTimeTokenReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TokenService_CancelOneTimeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CancelOneTimeTokenReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TokenServiceServer).CancelOneTimeToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TokenService_CancelOneTimeToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TokenServiceServer).CancelOneTimeToken(ctx, req.(*CancelOneTimeTokenReq))
|
||||
return srv.(TokenServiceServer).GetUserTokensByUID(ctx, req.(*QueryTokenByUIDReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
@ -455,24 +394,16 @@ var TokenService_ServiceDesc = grpc.ServiceDesc{
|
|||
Handler: _TokenService_CancelTokens_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CancelTokenByDeviceId",
|
||||
Handler: _TokenService_CancelTokenByDeviceId_Handler,
|
||||
MethodName: "CancelTokenByDeviceID",
|
||||
Handler: _TokenService_CancelTokenByDeviceID_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserTokensByDeviceId",
|
||||
Handler: _TokenService_GetUserTokensByDeviceId_Handler,
|
||||
MethodName: "GetUserTokensByDeviceID",
|
||||
Handler: _TokenService_GetUserTokensByDeviceID_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserTokensByUid",
|
||||
Handler: _TokenService_GetUserTokensByUid_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NewOneTimeToken",
|
||||
Handler: _TokenService_NewOneTimeToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CancelOneTimeToken",
|
||||
Handler: _TokenService_CancelOneTimeToken_Handler,
|
||||
MethodName: "GetUserTokensByUID",
|
||||
Handler: _TokenService_GetUserTokensByUID_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
|
|
Loading…
Reference in New Issue