fix bug
This commit is contained in:
parent
82b70ee00b
commit
a5ac99b1e0
|
@ -1,135 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from mail.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
|
||||
|
||||
/// sms module
|
||||
class SendMailRequest extends $pb.GeneratedMessage {
|
||||
factory SendMailRequest({
|
||||
$core.String? signName,
|
||||
}) {
|
||||
final result = create();
|
||||
if (signName != null) result.signName = signName;
|
||||
return result;
|
||||
}
|
||||
|
||||
SendMailRequest._();
|
||||
|
||||
factory SendMailRequest.fromBuffer($core.List<$core.int> data,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(data, registry);
|
||||
factory SendMailRequest.fromJson($core.String json,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(json, registry);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
_omitMessageNames ? '' : 'SendMailRequest',
|
||||
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, _omitFieldNames ? '' : 'signName')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SendMailRequest clone() => SendMailRequest()..mergeFromMessage(this);
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SendMailRequest copyWith(void Function(SendMailRequest) updates) =>
|
||||
super.copyWith((message) => updates(message as SendMailRequest))
|
||||
as SendMailRequest;
|
||||
|
||||
@$core.override
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SendMailRequest create() => SendMailRequest._();
|
||||
@$core.override
|
||||
SendMailRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<SendMailRequest> createRepeated() =>
|
||||
$pb.PbList<SendMailRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SendMailRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SendMailRequest>(create);
|
||||
static SendMailRequest? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get signName => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set signName($core.String value) => $_setString(0, value);
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasSignName() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearSignName() => $_clearField(1);
|
||||
}
|
||||
|
||||
class SendMailResponse extends $pb.GeneratedMessage {
|
||||
factory SendMailResponse({
|
||||
$core.String? requestId,
|
||||
}) {
|
||||
final result = create();
|
||||
if (requestId != null) result.requestId = requestId;
|
||||
return result;
|
||||
}
|
||||
|
||||
SendMailResponse._();
|
||||
|
||||
factory SendMailResponse.fromBuffer($core.List<$core.int> data,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(data, registry);
|
||||
factory SendMailResponse.fromJson($core.String json,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(json, registry);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
_omitMessageNames ? '' : 'SendMailResponse',
|
||||
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, _omitFieldNames ? '' : 'requestId')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SendMailResponse clone() => SendMailResponse()..mergeFromMessage(this);
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SendMailResponse copyWith(void Function(SendMailResponse) updates) =>
|
||||
super.copyWith((message) => updates(message as SendMailResponse))
|
||||
as SendMailResponse;
|
||||
|
||||
@$core.override
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SendMailResponse create() => SendMailResponse._();
|
||||
@$core.override
|
||||
SendMailResponse createEmptyInstance() => create();
|
||||
static $pb.PbList<SendMailResponse> createRepeated() =>
|
||||
$pb.PbList<SendMailResponse>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SendMailResponse getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SendMailResponse>(create);
|
||||
static SendMailResponse? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get requestId => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set requestId($core.String value) => $_setString(0, value);
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasRequestId() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearRequestId() => $_clearField(1);
|
||||
}
|
||||
|
||||
const $core.bool _omitFieldNames =
|
||||
$core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const $core.bool _omitMessageNames =
|
||||
$core.bool.fromEnvironment('protobuf.omit_message_names');
|
|
@ -1,11 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from mail.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names
|
|
@ -1,73 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from mail.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
|
||||
import 'dart:async' as $async;
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:grpc/service_api.dart' as $grpc;
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'mail.pb.dart' as $0;
|
||||
|
||||
export 'mail.pb.dart';
|
||||
|
||||
/// Mail method
|
||||
@$pb.GrpcServiceName('notify.Mail')
|
||||
class MailClient extends $grpc.Client {
|
||||
/// The hostname for this service.
|
||||
static const $core.String defaultHost = '';
|
||||
|
||||
/// OAuth scopes needed for the client.
|
||||
static const $core.List<$core.String> oauthScopes = [
|
||||
'',
|
||||
];
|
||||
|
||||
MailClient(super.channel, {super.options, super.interceptors});
|
||||
|
||||
$grpc.ResponseFuture<$0.SendMailResponse> sendMail(
|
||||
$0.SendMailRequest request, {
|
||||
$grpc.CallOptions? options,
|
||||
}) {
|
||||
return $createUnaryCall(_$sendMail, request, options: options);
|
||||
}
|
||||
|
||||
// method descriptors
|
||||
|
||||
static final _$sendMail =
|
||||
$grpc.ClientMethod<$0.SendMailRequest, $0.SendMailResponse>(
|
||||
'/notify.Mail/SendMail',
|
||||
($0.SendMailRequest value) => value.writeToBuffer(),
|
||||
$0.SendMailResponse.fromBuffer);
|
||||
}
|
||||
|
||||
@$pb.GrpcServiceName('notify.Mail')
|
||||
abstract class MailServiceBase extends $grpc.Service {
|
||||
$core.String get $name => 'notify.Mail';
|
||||
|
||||
MailServiceBase() {
|
||||
$addMethod($grpc.ServiceMethod<$0.SendMailRequest, $0.SendMailResponse>(
|
||||
'SendMail',
|
||||
sendMail_Pre,
|
||||
false,
|
||||
false,
|
||||
($core.List<$core.int> value) => $0.SendMailRequest.fromBuffer(value),
|
||||
($0.SendMailResponse value) => value.writeToBuffer()));
|
||||
}
|
||||
|
||||
$async.Future<$0.SendMailResponse> sendMail_Pre($grpc.ServiceCall $call,
|
||||
$async.Future<$0.SendMailRequest> $request) async {
|
||||
return sendMail($call, await $request);
|
||||
}
|
||||
|
||||
$async.Future<$0.SendMailResponse> sendMail(
|
||||
$grpc.ServiceCall call, $0.SendMailRequest request);
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from mail.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use sendMailRequestDescriptor instead')
|
||||
const SendMailRequest$json = {
|
||||
'1': 'SendMailRequest',
|
||||
'2': [
|
||||
{'1': 'sign_name', '3': 1, '4': 1, '5': 9, '10': 'signName'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SendMailRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List sendMailRequestDescriptor = $convert.base64Decode(
|
||||
'Cg9TZW5kTWFpbFJlcXVlc3QSGwoJc2lnbl9uYW1lGAEgASgJUghzaWduTmFtZQ==');
|
||||
|
||||
@$core.Deprecated('Use sendMailResponseDescriptor instead')
|
||||
const SendMailResponse$json = {
|
||||
'1': 'SendMailResponse',
|
||||
'2': [
|
||||
{'1': 'request_id', '3': 1, '4': 1, '5': 9, '10': 'requestId'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SendMailResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List sendMailResponseDescriptor = $convert.base64Decode(
|
||||
'ChBTZW5kTWFpbFJlc3BvbnNlEh0KCnJlcXVlc3RfaWQYASABKAlSCXJlcXVlc3RJZA==');
|
|
@ -1,370 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from sms.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:fixnum/fixnum.dart' as $fixnum;
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
|
||||
|
||||
/// sms module
|
||||
class SmsSendRequest extends $pb.GeneratedMessage {
|
||||
factory SmsSendRequest({
|
||||
$core.String? signName,
|
||||
$core.String? templateCode,
|
||||
$core.String? phone,
|
||||
$core.Iterable<$core.MapEntry<$core.String, $core.String>>? paramters,
|
||||
$core.bool? generateCode,
|
||||
$fixnum.Int64? expireInterval,
|
||||
$fixnum.Int64? codeWidth,
|
||||
$core.String? codeKey,
|
||||
$core.bool? hasBlackListFilter,
|
||||
$core.bool? wihoutLimit,
|
||||
}) {
|
||||
final result = create();
|
||||
if (signName != null) result.signName = signName;
|
||||
if (templateCode != null) result.templateCode = templateCode;
|
||||
if (phone != null) result.phone = phone;
|
||||
if (paramters != null) result.paramters.addEntries(paramters);
|
||||
if (generateCode != null) result.generateCode = generateCode;
|
||||
if (expireInterval != null) result.expireInterval = expireInterval;
|
||||
if (codeWidth != null) result.codeWidth = codeWidth;
|
||||
if (codeKey != null) result.codeKey = codeKey;
|
||||
if (hasBlackListFilter != null)
|
||||
result.hasBlackListFilter = hasBlackListFilter;
|
||||
if (wihoutLimit != null) result.wihoutLimit = wihoutLimit;
|
||||
return result;
|
||||
}
|
||||
|
||||
SmsSendRequest._();
|
||||
|
||||
factory SmsSendRequest.fromBuffer($core.List<$core.int> data,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(data, registry);
|
||||
factory SmsSendRequest.fromJson($core.String json,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(json, registry);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
_omitMessageNames ? '' : 'SmsSendRequest',
|
||||
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, _omitFieldNames ? '' : 'signName')
|
||||
..aOS(2, _omitFieldNames ? '' : 'templateCode')
|
||||
..aOS(3, _omitFieldNames ? '' : 'phone')
|
||||
..m<$core.String, $core.String>(5, _omitFieldNames ? '' : 'paramters',
|
||||
entryClassName: 'SmsSendRequest.ParamtersEntry',
|
||||
keyFieldType: $pb.PbFieldType.OS,
|
||||
valueFieldType: $pb.PbFieldType.OS,
|
||||
packageName: const $pb.PackageName('notify'))
|
||||
..aOB(6, _omitFieldNames ? '' : 'generateCode')
|
||||
..aInt64(7, _omitFieldNames ? '' : 'expireInterval')
|
||||
..aInt64(8, _omitFieldNames ? '' : 'codeWidth')
|
||||
..aOS(9, _omitFieldNames ? '' : 'codeKey')
|
||||
..aOB(10, _omitFieldNames ? '' : 'hasBlackListFilter')
|
||||
..aOB(11, _omitFieldNames ? '' : 'wihoutLimit')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SmsSendRequest clone() => SmsSendRequest()..mergeFromMessage(this);
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SmsSendRequest copyWith(void Function(SmsSendRequest) updates) =>
|
||||
super.copyWith((message) => updates(message as SmsSendRequest))
|
||||
as SmsSendRequest;
|
||||
|
||||
@$core.override
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SmsSendRequest create() => SmsSendRequest._();
|
||||
@$core.override
|
||||
SmsSendRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<SmsSendRequest> createRepeated() =>
|
||||
$pb.PbList<SmsSendRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SmsSendRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SmsSendRequest>(create);
|
||||
static SmsSendRequest? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get signName => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set signName($core.String value) => $_setString(0, value);
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasSignName() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearSignName() => $_clearField(1);
|
||||
|
||||
@$pb.TagNumber(2)
|
||||
$core.String get templateCode => $_getSZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set templateCode($core.String value) => $_setString(1, value);
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasTemplateCode() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearTemplateCode() => $_clearField(2);
|
||||
|
||||
@$pb.TagNumber(3)
|
||||
$core.String get phone => $_getSZ(2);
|
||||
@$pb.TagNumber(3)
|
||||
set phone($core.String value) => $_setString(2, value);
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasPhone() => $_has(2);
|
||||
@$pb.TagNumber(3)
|
||||
void clearPhone() => $_clearField(3);
|
||||
|
||||
@$pb.TagNumber(5)
|
||||
$pb.PbMap<$core.String, $core.String> get paramters => $_getMap(3);
|
||||
|
||||
/// 验证码相关
|
||||
@$pb.TagNumber(6)
|
||||
$core.bool get generateCode => $_getBF(4);
|
||||
@$pb.TagNumber(6)
|
||||
set generateCode($core.bool value) => $_setBool(4, value);
|
||||
@$pb.TagNumber(6)
|
||||
$core.bool hasGenerateCode() => $_has(4);
|
||||
@$pb.TagNumber(6)
|
||||
void clearGenerateCode() => $_clearField(6);
|
||||
|
||||
@$pb.TagNumber(7)
|
||||
$fixnum.Int64 get expireInterval => $_getI64(5);
|
||||
@$pb.TagNumber(7)
|
||||
set expireInterval($fixnum.Int64 value) => $_setInt64(5, value);
|
||||
@$pb.TagNumber(7)
|
||||
$core.bool hasExpireInterval() => $_has(5);
|
||||
@$pb.TagNumber(7)
|
||||
void clearExpireInterval() => $_clearField(7);
|
||||
|
||||
@$pb.TagNumber(8)
|
||||
$fixnum.Int64 get codeWidth => $_getI64(6);
|
||||
@$pb.TagNumber(8)
|
||||
set codeWidth($fixnum.Int64 value) => $_setInt64(6, value);
|
||||
@$pb.TagNumber(8)
|
||||
$core.bool hasCodeWidth() => $_has(6);
|
||||
@$pb.TagNumber(8)
|
||||
void clearCodeWidth() => $_clearField(8);
|
||||
|
||||
@$pb.TagNumber(9)
|
||||
$core.String get codeKey => $_getSZ(7);
|
||||
@$pb.TagNumber(9)
|
||||
set codeKey($core.String value) => $_setString(7, value);
|
||||
@$pb.TagNumber(9)
|
||||
$core.bool hasCodeKey() => $_has(7);
|
||||
@$pb.TagNumber(9)
|
||||
void clearCodeKey() => $_clearField(9);
|
||||
|
||||
@$pb.TagNumber(10)
|
||||
$core.bool get hasBlackListFilter => $_getBF(8);
|
||||
@$pb.TagNumber(10)
|
||||
set hasBlackListFilter($core.bool value) => $_setBool(8, value);
|
||||
@$pb.TagNumber(10)
|
||||
$core.bool hasHasBlackListFilter() => $_has(8);
|
||||
@$pb.TagNumber(10)
|
||||
void clearHasBlackListFilter() => $_clearField(10);
|
||||
|
||||
@$pb.TagNumber(11)
|
||||
$core.bool get wihoutLimit => $_getBF(9);
|
||||
@$pb.TagNumber(11)
|
||||
set wihoutLimit($core.bool value) => $_setBool(9, value);
|
||||
@$pb.TagNumber(11)
|
||||
$core.bool hasWihoutLimit() => $_has(9);
|
||||
@$pb.TagNumber(11)
|
||||
void clearWihoutLimit() => $_clearField(11);
|
||||
}
|
||||
|
||||
class SmsSendResponse extends $pb.GeneratedMessage {
|
||||
factory SmsSendResponse({
|
||||
$core.String? bizId,
|
||||
}) {
|
||||
final result = create();
|
||||
if (bizId != null) result.bizId = bizId;
|
||||
return result;
|
||||
}
|
||||
|
||||
SmsSendResponse._();
|
||||
|
||||
factory SmsSendResponse.fromBuffer($core.List<$core.int> data,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(data, registry);
|
||||
factory SmsSendResponse.fromJson($core.String json,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(json, registry);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
_omitMessageNames ? '' : 'SmsSendResponse',
|
||||
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(2, _omitFieldNames ? '' : 'bizId')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SmsSendResponse clone() => SmsSendResponse()..mergeFromMessage(this);
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SmsSendResponse copyWith(void Function(SmsSendResponse) updates) =>
|
||||
super.copyWith((message) => updates(message as SmsSendResponse))
|
||||
as SmsSendResponse;
|
||||
|
||||
@$core.override
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SmsSendResponse create() => SmsSendResponse._();
|
||||
@$core.override
|
||||
SmsSendResponse createEmptyInstance() => create();
|
||||
static $pb.PbList<SmsSendResponse> createRepeated() =>
|
||||
$pb.PbList<SmsSendResponse>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SmsSendResponse getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SmsSendResponse>(create);
|
||||
static SmsSendResponse? _defaultInstance;
|
||||
|
||||
/// string request_id = 1;
|
||||
@$pb.TagNumber(2)
|
||||
$core.String get bizId => $_getSZ(0);
|
||||
@$pb.TagNumber(2)
|
||||
set bizId($core.String value) => $_setString(0, value);
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasBizId() => $_has(0);
|
||||
@$pb.TagNumber(2)
|
||||
void clearBizId() => $_clearField(2);
|
||||
}
|
||||
|
||||
class SmsVerifyRequest extends $pb.GeneratedMessage {
|
||||
factory SmsVerifyRequest({
|
||||
$core.String? phone,
|
||||
$core.String? code,
|
||||
}) {
|
||||
final result = create();
|
||||
if (phone != null) result.phone = phone;
|
||||
if (code != null) result.code = code;
|
||||
return result;
|
||||
}
|
||||
|
||||
SmsVerifyRequest._();
|
||||
|
||||
factory SmsVerifyRequest.fromBuffer($core.List<$core.int> data,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(data, registry);
|
||||
factory SmsVerifyRequest.fromJson($core.String json,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(json, registry);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
_omitMessageNames ? '' : 'SmsVerifyRequest',
|
||||
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(2, _omitFieldNames ? '' : 'phone')
|
||||
..aOS(3, _omitFieldNames ? '' : 'code')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SmsVerifyRequest clone() => SmsVerifyRequest()..mergeFromMessage(this);
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
SmsVerifyRequest copyWith(void Function(SmsVerifyRequest) updates) =>
|
||||
super.copyWith((message) => updates(message as SmsVerifyRequest))
|
||||
as SmsVerifyRequest;
|
||||
|
||||
@$core.override
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SmsVerifyRequest create() => SmsVerifyRequest._();
|
||||
@$core.override
|
||||
SmsVerifyRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<SmsVerifyRequest> createRepeated() =>
|
||||
$pb.PbList<SmsVerifyRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SmsVerifyRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SmsVerifyRequest>(create);
|
||||
static SmsVerifyRequest? _defaultInstance;
|
||||
|
||||
/// string request_id = 1;
|
||||
@$pb.TagNumber(2)
|
||||
$core.String get phone => $_getSZ(0);
|
||||
@$pb.TagNumber(2)
|
||||
set phone($core.String value) => $_setString(0, value);
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasPhone() => $_has(0);
|
||||
@$pb.TagNumber(2)
|
||||
void clearPhone() => $_clearField(2);
|
||||
|
||||
@$pb.TagNumber(3)
|
||||
$core.String get code => $_getSZ(1);
|
||||
@$pb.TagNumber(3)
|
||||
set code($core.String value) => $_setString(1, value);
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasCode() => $_has(1);
|
||||
@$pb.TagNumber(3)
|
||||
void clearCode() => $_clearField(3);
|
||||
}
|
||||
|
||||
class PassResponse extends $pb.GeneratedMessage {
|
||||
factory PassResponse({
|
||||
$core.bool? pass,
|
||||
}) {
|
||||
final result = create();
|
||||
if (pass != null) result.pass = pass;
|
||||
return result;
|
||||
}
|
||||
|
||||
PassResponse._();
|
||||
|
||||
factory PassResponse.fromBuffer($core.List<$core.int> data,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(data, registry);
|
||||
factory PassResponse.fromJson($core.String json,
|
||||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(json, registry);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
_omitMessageNames ? '' : 'PassResponse',
|
||||
package: const $pb.PackageName(_omitMessageNames ? '' : 'notify'),
|
||||
createEmptyInstance: create)
|
||||
..aOB(1, _omitFieldNames ? '' : 'pass')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
PassResponse clone() => PassResponse()..mergeFromMessage(this);
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
PassResponse copyWith(void Function(PassResponse) updates) =>
|
||||
super.copyWith((message) => updates(message as PassResponse))
|
||||
as PassResponse;
|
||||
|
||||
@$core.override
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static PassResponse create() => PassResponse._();
|
||||
@$core.override
|
||||
PassResponse createEmptyInstance() => create();
|
||||
static $pb.PbList<PassResponse> createRepeated() =>
|
||||
$pb.PbList<PassResponse>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static PassResponse getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<PassResponse>(create);
|
||||
static PassResponse? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool get pass => $_getBF(0);
|
||||
@$pb.TagNumber(1)
|
||||
set pass($core.bool value) => $_setBool(0, value);
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasPass() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearPass() => $_clearField(1);
|
||||
}
|
||||
|
||||
const $core.bool _omitFieldNames =
|
||||
$core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const $core.bool _omitMessageNames =
|
||||
$core.bool.fromEnvironment('protobuf.omit_message_names');
|
|
@ -1,11 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from sms.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names
|
|
@ -1,100 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from sms.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
|
||||
import 'dart:async' as $async;
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:grpc/service_api.dart' as $grpc;
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'sms.pb.dart' as $0;
|
||||
|
||||
export 'sms.pb.dart';
|
||||
|
||||
/// sms method
|
||||
@$pb.GrpcServiceName('notify.Sms')
|
||||
class SmsClient extends $grpc.Client {
|
||||
/// The hostname for this service.
|
||||
static const $core.String defaultHost = '';
|
||||
|
||||
/// OAuth scopes needed for the client.
|
||||
static const $core.List<$core.String> oauthScopes = [
|
||||
'',
|
||||
];
|
||||
|
||||
SmsClient(super.channel, {super.options, super.interceptors});
|
||||
|
||||
$grpc.ResponseFuture<$0.SmsSendResponse> send(
|
||||
$0.SmsSendRequest request, {
|
||||
$grpc.CallOptions? options,
|
||||
}) {
|
||||
return $createUnaryCall(_$send, request, options: options);
|
||||
}
|
||||
|
||||
$grpc.ResponseFuture<$0.PassResponse> verify(
|
||||
$0.SmsVerifyRequest request, {
|
||||
$grpc.CallOptions? options,
|
||||
}) {
|
||||
return $createUnaryCall(_$verify, request, options: options);
|
||||
}
|
||||
|
||||
// method descriptors
|
||||
|
||||
static final _$send =
|
||||
$grpc.ClientMethod<$0.SmsSendRequest, $0.SmsSendResponse>(
|
||||
'/notify.Sms/Send',
|
||||
($0.SmsSendRequest value) => value.writeToBuffer(),
|
||||
$0.SmsSendResponse.fromBuffer);
|
||||
static final _$verify =
|
||||
$grpc.ClientMethod<$0.SmsVerifyRequest, $0.PassResponse>(
|
||||
'/notify.Sms/Verify',
|
||||
($0.SmsVerifyRequest value) => value.writeToBuffer(),
|
||||
$0.PassResponse.fromBuffer);
|
||||
}
|
||||
|
||||
@$pb.GrpcServiceName('notify.Sms')
|
||||
abstract class SmsServiceBase extends $grpc.Service {
|
||||
$core.String get $name => 'notify.Sms';
|
||||
|
||||
SmsServiceBase() {
|
||||
$addMethod($grpc.ServiceMethod<$0.SmsSendRequest, $0.SmsSendResponse>(
|
||||
'Send',
|
||||
send_Pre,
|
||||
false,
|
||||
false,
|
||||
($core.List<$core.int> value) => $0.SmsSendRequest.fromBuffer(value),
|
||||
($0.SmsSendResponse value) => value.writeToBuffer()));
|
||||
$addMethod($grpc.ServiceMethod<$0.SmsVerifyRequest, $0.PassResponse>(
|
||||
'Verify',
|
||||
verify_Pre,
|
||||
false,
|
||||
false,
|
||||
($core.List<$core.int> value) => $0.SmsVerifyRequest.fromBuffer(value),
|
||||
($0.PassResponse value) => value.writeToBuffer()));
|
||||
}
|
||||
|
||||
$async.Future<$0.SmsSendResponse> send_Pre($grpc.ServiceCall $call,
|
||||
$async.Future<$0.SmsSendRequest> $request) async {
|
||||
return send($call, await $request);
|
||||
}
|
||||
|
||||
$async.Future<$0.SmsSendResponse> send(
|
||||
$grpc.ServiceCall call, $0.SmsSendRequest request);
|
||||
|
||||
$async.Future<$0.PassResponse> verify_Pre($grpc.ServiceCall $call,
|
||||
$async.Future<$0.SmsVerifyRequest> $request) async {
|
||||
return verify($call, await $request);
|
||||
}
|
||||
|
||||
$async.Future<$0.PassResponse> verify(
|
||||
$grpc.ServiceCall call, $0.SmsVerifyRequest request);
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
// This is a generated file - do not edit.
|
||||
//
|
||||
// Generated from sms.proto.
|
||||
|
||||
// @dart = 3.3
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use smsSendRequestDescriptor instead')
|
||||
const SmsSendRequest$json = {
|
||||
'1': 'SmsSendRequest',
|
||||
'2': [
|
||||
{'1': 'sign_name', '3': 1, '4': 1, '5': 9, '10': 'signName'},
|
||||
{'1': 'template_code', '3': 2, '4': 1, '5': 9, '10': 'templateCode'},
|
||||
{'1': 'phone', '3': 3, '4': 1, '5': 9, '10': 'phone'},
|
||||
{
|
||||
'1': 'paramters',
|
||||
'3': 5,
|
||||
'4': 3,
|
||||
'5': 11,
|
||||
'6': '.notify.SmsSendRequest.ParamtersEntry',
|
||||
'10': 'paramters'
|
||||
},
|
||||
{'1': 'generate_code', '3': 6, '4': 1, '5': 8, '10': 'generateCode'},
|
||||
{'1': 'expire_interval', '3': 7, '4': 1, '5': 3, '10': 'expireInterval'},
|
||||
{'1': 'code_width', '3': 8, '4': 1, '5': 3, '10': 'codeWidth'},
|
||||
{'1': 'code_key', '3': 9, '4': 1, '5': 9, '10': 'codeKey'},
|
||||
{
|
||||
'1': 'has_black_list_filter',
|
||||
'3': 10,
|
||||
'4': 1,
|
||||
'5': 8,
|
||||
'10': 'hasBlackListFilter'
|
||||
},
|
||||
{'1': 'wihout_limit', '3': 11, '4': 1, '5': 8, '10': 'wihoutLimit'},
|
||||
],
|
||||
'3': [SmsSendRequest_ParamtersEntry$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use smsSendRequestDescriptor instead')
|
||||
const SmsSendRequest_ParamtersEntry$json = {
|
||||
'1': 'ParamtersEntry',
|
||||
'2': [
|
||||
{'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
|
||||
{'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'},
|
||||
],
|
||||
'7': {'7': true},
|
||||
};
|
||||
|
||||
/// Descriptor for `SmsSendRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List smsSendRequestDescriptor = $convert.base64Decode(
|
||||
'Cg5TbXNTZW5kUmVxdWVzdBIbCglzaWduX25hbWUYASABKAlSCHNpZ25OYW1lEiMKDXRlbXBsYX'
|
||||
'RlX2NvZGUYAiABKAlSDHRlbXBsYXRlQ29kZRIUCgVwaG9uZRgDIAEoCVIFcGhvbmUSQwoJcGFy'
|
||||
'YW10ZXJzGAUgAygLMiUubm90aWZ5LlNtc1NlbmRSZXF1ZXN0LlBhcmFtdGVyc0VudHJ5UglwYX'
|
||||
'JhbXRlcnMSIwoNZ2VuZXJhdGVfY29kZRgGIAEoCFIMZ2VuZXJhdGVDb2RlEicKD2V4cGlyZV9p'
|
||||
'bnRlcnZhbBgHIAEoA1IOZXhwaXJlSW50ZXJ2YWwSHQoKY29kZV93aWR0aBgIIAEoA1IJY29kZV'
|
||||
'dpZHRoEhkKCGNvZGVfa2V5GAkgASgJUgdjb2RlS2V5EjEKFWhhc19ibGFja19saXN0X2ZpbHRl'
|
||||
'chgKIAEoCFISaGFzQmxhY2tMaXN0RmlsdGVyEiEKDHdpaG91dF9saW1pdBgLIAEoCFILd2lob3'
|
||||
'V0TGltaXQaPAoOUGFyYW10ZXJzRW50cnkSEAoDa2V5GAEgASgJUgNrZXkSFAoFdmFsdWUYAiAB'
|
||||
'KAlSBXZhbHVlOgI4AQ==');
|
||||
|
||||
@$core.Deprecated('Use smsSendResponseDescriptor instead')
|
||||
const SmsSendResponse$json = {
|
||||
'1': 'SmsSendResponse',
|
||||
'2': [
|
||||
{'1': 'biz_id', '3': 2, '4': 1, '5': 9, '10': 'bizId'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SmsSendResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List smsSendResponseDescriptor = $convert
|
||||
.base64Decode('Cg9TbXNTZW5kUmVzcG9uc2USFQoGYml6X2lkGAIgASgJUgViaXpJZA==');
|
||||
|
||||
@$core.Deprecated('Use smsVerifyRequestDescriptor instead')
|
||||
const SmsVerifyRequest$json = {
|
||||
'1': 'SmsVerifyRequest',
|
||||
'2': [
|
||||
{'1': 'phone', '3': 2, '4': 1, '5': 9, '10': 'phone'},
|
||||
{'1': 'code', '3': 3, '4': 1, '5': 9, '10': 'code'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SmsVerifyRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List smsVerifyRequestDescriptor = $convert.base64Decode(
|
||||
'ChBTbXNWZXJpZnlSZXF1ZXN0EhQKBXBob25lGAIgASgJUgVwaG9uZRISCgRjb2RlGAMgASgJUg'
|
||||
'Rjb2Rl');
|
||||
|
||||
@$core.Deprecated('Use passResponseDescriptor instead')
|
||||
const PassResponse$json = {
|
||||
'1': 'PassResponse',
|
||||
'2': [
|
||||
{'1': 'pass', '3': 1, '4': 1, '5': 8, '10': 'pass'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `PassResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List passResponseDescriptor =
|
||||
$convert.base64Decode('CgxQYXNzUmVzcG9uc2USEgoEcGFzcxgBIAEoCFIEcGFzcw==');
|
|
@ -1,177 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: mail.proto
|
||||
|
||||
package notify
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// sms module
|
||||
type SendMailRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SignName string `protobuf:"bytes,1,opt,name=sign_name,json=signName,proto3" json:"sign_name,omitempty"` // 必传项
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendMailRequest) Reset() {
|
||||
*x = SendMailRequest{}
|
||||
mi := &file_mail_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendMailRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendMailRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SendMailRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mail_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendMailRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SendMailRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mail_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SendMailRequest) GetSignName() string {
|
||||
if x != nil {
|
||||
return x.SignName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SendMailResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendMailResponse) Reset() {
|
||||
*x = SendMailResponse{}
|
||||
mi := &file_mail_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendMailResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendMailResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SendMailResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mail_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendMailResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SendMailResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mail_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SendMailResponse) GetRequestId() string {
|
||||
if x != nil {
|
||||
return x.RequestId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_mail_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_mail_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"mail.proto\x12\x06notify\".\n" +
|
||||
"\x0fSendMailRequest\x12\x1b\n" +
|
||||
"\tsign_name\x18\x01 \x01(\tR\bsignName\"1\n" +
|
||||
"\x10SendMailResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"request_id\x18\x01 \x01(\tR\trequestId2E\n" +
|
||||
"\x04Mail\x12=\n" +
|
||||
"\bSendMail\x12\x17.notify.SendMailRequest\x1a\x18.notify.SendMailResponseB\n" +
|
||||
"Z\b./notifyb\x06proto3"
|
||||
|
||||
var (
|
||||
file_mail_proto_rawDescOnce sync.Once
|
||||
file_mail_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_mail_proto_rawDescGZIP() []byte {
|
||||
file_mail_proto_rawDescOnce.Do(func() {
|
||||
file_mail_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mail_proto_rawDesc), len(file_mail_proto_rawDesc)))
|
||||
})
|
||||
return file_mail_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mail_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_mail_proto_goTypes = []any{
|
||||
(*SendMailRequest)(nil), // 0: notify.SendMailRequest
|
||||
(*SendMailResponse)(nil), // 1: notify.SendMailResponse
|
||||
}
|
||||
var file_mail_proto_depIdxs = []int32{
|
||||
0, // 0: notify.Mail.SendMail:input_type -> notify.SendMailRequest
|
||||
1, // 1: notify.Mail.SendMail:output_type -> notify.SendMailResponse
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mail_proto_init() }
|
||||
func file_mail_proto_init() {
|
||||
if File_mail_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mail_proto_rawDesc), len(file_mail_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_mail_proto_goTypes,
|
||||
DependencyIndexes: file_mail_proto_depIdxs,
|
||||
MessageInfos: file_mail_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mail_proto = out.File
|
||||
file_mail_proto_goTypes = nil
|
||||
file_mail_proto_depIdxs = nil
|
||||
}
|
|
@ -1,125 +0,0 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: mail.proto
|
||||
|
||||
package notify
|
||||
|
||||
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 (
|
||||
Mail_SendMail_FullMethodName = "/notify.Mail/SendMail"
|
||||
)
|
||||
|
||||
// MailClient is the client API for Mail 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.
|
||||
//
|
||||
// Mail method
|
||||
type MailClient interface {
|
||||
SendMail(ctx context.Context, in *SendMailRequest, opts ...grpc.CallOption) (*SendMailResponse, error)
|
||||
}
|
||||
|
||||
type mailClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMailClient(cc grpc.ClientConnInterface) MailClient {
|
||||
return &mailClient{cc}
|
||||
}
|
||||
|
||||
func (c *mailClient) SendMail(ctx context.Context, in *SendMailRequest, opts ...grpc.CallOption) (*SendMailResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SendMailResponse)
|
||||
err := c.cc.Invoke(ctx, Mail_SendMail_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MailServer is the server API for Mail service.
|
||||
// All implementations must embed UnimplementedMailServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Mail method
|
||||
type MailServer interface {
|
||||
SendMail(context.Context, *SendMailRequest) (*SendMailResponse, error)
|
||||
mustEmbedUnimplementedMailServer()
|
||||
}
|
||||
|
||||
// UnimplementedMailServer 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 UnimplementedMailServer struct{}
|
||||
|
||||
func (UnimplementedMailServer) SendMail(context.Context, *SendMailRequest) (*SendMailResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendMail not implemented")
|
||||
}
|
||||
func (UnimplementedMailServer) mustEmbedUnimplementedMailServer() {}
|
||||
func (UnimplementedMailServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMailServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MailServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMailServer interface {
|
||||
mustEmbedUnimplementedMailServer()
|
||||
}
|
||||
|
||||
func RegisterMailServer(s grpc.ServiceRegistrar, srv MailServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMailServer 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(&Mail_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Mail_SendMail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendMailRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MailServer).SendMail(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Mail_SendMail_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MailServer).SendMail(ctx, req.(*SendMailRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Mail_ServiceDesc is the grpc.ServiceDesc for Mail service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Mail_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "notify.Mail",
|
||||
HandlerType: (*MailServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "SendMail",
|
||||
Handler: _Mail_SendMail_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "mail.proto",
|
||||
}
|
|
@ -1,372 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: sms.proto
|
||||
|
||||
package notify
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// sms module
|
||||
type SmsSendRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SignName string `protobuf:"bytes,1,opt,name=sign_name,json=signName,proto3" json:"sign_name,omitempty"` // 必传项
|
||||
TemplateCode string `protobuf:"bytes,2,opt,name=template_code,json=templateCode,proto3" json:"template_code,omitempty"` // 必传项
|
||||
Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` // 必传项
|
||||
Paramters map[string]string `protobuf:"bytes,5,rep,name=paramters,proto3" json:"paramters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
// 验证码相关
|
||||
GenerateCode bool `protobuf:"varint,6,opt,name=generate_code,json=generateCode,proto3" json:"generate_code,omitempty"` //是否生成验证码
|
||||
ExpireInterval int64 `protobuf:"varint,7,opt,name=expire_interval,json=expireInterval,proto3" json:"expire_interval,omitempty"` //验证码缓存时间,单位:分钟,仅generate_code为true时会缓存,默认5分钟
|
||||
CodeWidth int64 `protobuf:"varint,8,opt,name=code_width,json=codeWidth,proto3" json:"code_width,omitempty"` //验证码长度,默认 4
|
||||
CodeKey string `protobuf:"bytes,9,opt,name=code_key,json=codeKey,proto3" json:"code_key,omitempty"` //template_code 模板中验证码的标识,默认code
|
||||
HasBlackListFilter bool `protobuf:"varint,10,opt,name=has_black_list_filter,json=hasBlackListFilter,proto3" json:"has_black_list_filter,omitempty"` // 是否黑单过滤,默认不过滤
|
||||
WihoutLimit bool `protobuf:"varint,11,opt,name=wihout_limit,json=wihoutLimit,proto3" json:"wihout_limit,omitempty"` //忽略每天短信条数上线限制,默认不忽略
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) Reset() {
|
||||
*x = SmsSendRequest{}
|
||||
mi := &file_sms_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SmsSendRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SmsSendRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_sms_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SmsSendRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SmsSendRequest) Descriptor() ([]byte, []int) {
|
||||
return file_sms_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetSignName() string {
|
||||
if x != nil {
|
||||
return x.SignName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetTemplateCode() string {
|
||||
if x != nil {
|
||||
return x.TemplateCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetParamters() map[string]string {
|
||||
if x != nil {
|
||||
return x.Paramters
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetGenerateCode() bool {
|
||||
if x != nil {
|
||||
return x.GenerateCode
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetExpireInterval() int64 {
|
||||
if x != nil {
|
||||
return x.ExpireInterval
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetCodeWidth() int64 {
|
||||
if x != nil {
|
||||
return x.CodeWidth
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetCodeKey() string {
|
||||
if x != nil {
|
||||
return x.CodeKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetHasBlackListFilter() bool {
|
||||
if x != nil {
|
||||
return x.HasBlackListFilter
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *SmsSendRequest) GetWihoutLimit() bool {
|
||||
if x != nil {
|
||||
return x.WihoutLimit
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type SmsSendResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// string request_id = 1;
|
||||
BizId string `protobuf:"bytes,2,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SmsSendResponse) Reset() {
|
||||
*x = SmsSendResponse{}
|
||||
mi := &file_sms_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SmsSendResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SmsSendResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SmsSendResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_sms_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SmsSendResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SmsSendResponse) Descriptor() ([]byte, []int) {
|
||||
return file_sms_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SmsSendResponse) GetBizId() string {
|
||||
if x != nil {
|
||||
return x.BizId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SmsVerifyRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// string request_id = 1;
|
||||
Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SmsVerifyRequest) Reset() {
|
||||
*x = SmsVerifyRequest{}
|
||||
mi := &file_sms_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SmsVerifyRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SmsVerifyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SmsVerifyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_sms_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SmsVerifyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SmsVerifyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_sms_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SmsVerifyRequest) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SmsVerifyRequest) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type PassResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Pass bool `protobuf:"varint,1,opt,name=pass,proto3" json:"pass,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PassResponse) Reset() {
|
||||
*x = PassResponse{}
|
||||
mi := &file_sms_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PassResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PassResponse) ProtoMessage() {}
|
||||
|
||||
func (x *PassResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_sms_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PassResponse.ProtoReflect.Descriptor instead.
|
||||
func (*PassResponse) Descriptor() ([]byte, []int) {
|
||||
return file_sms_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PassResponse) GetPass() bool {
|
||||
if x != nil {
|
||||
return x.Pass
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_sms_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_sms_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\tsms.proto\x12\x06notify\"\xc9\x03\n" +
|
||||
"\x0eSmsSendRequest\x12\x1b\n" +
|
||||
"\tsign_name\x18\x01 \x01(\tR\bsignName\x12#\n" +
|
||||
"\rtemplate_code\x18\x02 \x01(\tR\ftemplateCode\x12\x14\n" +
|
||||
"\x05phone\x18\x03 \x01(\tR\x05phone\x12C\n" +
|
||||
"\tparamters\x18\x05 \x03(\v2%.notify.SmsSendRequest.ParamtersEntryR\tparamters\x12#\n" +
|
||||
"\rgenerate_code\x18\x06 \x01(\bR\fgenerateCode\x12'\n" +
|
||||
"\x0fexpire_interval\x18\a \x01(\x03R\x0eexpireInterval\x12\x1d\n" +
|
||||
"\n" +
|
||||
"code_width\x18\b \x01(\x03R\tcodeWidth\x12\x19\n" +
|
||||
"\bcode_key\x18\t \x01(\tR\acodeKey\x121\n" +
|
||||
"\x15has_black_list_filter\x18\n" +
|
||||
" \x01(\bR\x12hasBlackListFilter\x12!\n" +
|
||||
"\fwihout_limit\x18\v \x01(\bR\vwihoutLimit\x1a<\n" +
|
||||
"\x0eParamtersEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"(\n" +
|
||||
"\x0fSmsSendResponse\x12\x15\n" +
|
||||
"\x06biz_id\x18\x02 \x01(\tR\x05bizId\"<\n" +
|
||||
"\x10SmsVerifyRequest\x12\x14\n" +
|
||||
"\x05phone\x18\x02 \x01(\tR\x05phone\x12\x12\n" +
|
||||
"\x04code\x18\x03 \x01(\tR\x04code\"\"\n" +
|
||||
"\fPassResponse\x12\x12\n" +
|
||||
"\x04pass\x18\x01 \x01(\bR\x04pass2x\n" +
|
||||
"\x03Sms\x127\n" +
|
||||
"\x04Send\x12\x16.notify.SmsSendRequest\x1a\x17.notify.SmsSendResponse\x128\n" +
|
||||
"\x06Verify\x12\x18.notify.SmsVerifyRequest\x1a\x14.notify.PassResponseB\n" +
|
||||
"Z\b./notifyb\x06proto3"
|
||||
|
||||
var (
|
||||
file_sms_proto_rawDescOnce sync.Once
|
||||
file_sms_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_sms_proto_rawDescGZIP() []byte {
|
||||
file_sms_proto_rawDescOnce.Do(func() {
|
||||
file_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sms_proto_rawDesc), len(file_sms_proto_rawDesc)))
|
||||
})
|
||||
return file_sms_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_sms_proto_goTypes = []any{
|
||||
(*SmsSendRequest)(nil), // 0: notify.SmsSendRequest
|
||||
(*SmsSendResponse)(nil), // 1: notify.SmsSendResponse
|
||||
(*SmsVerifyRequest)(nil), // 2: notify.SmsVerifyRequest
|
||||
(*PassResponse)(nil), // 3: notify.PassResponse
|
||||
nil, // 4: notify.SmsSendRequest.ParamtersEntry
|
||||
}
|
||||
var file_sms_proto_depIdxs = []int32{
|
||||
4, // 0: notify.SmsSendRequest.paramters:type_name -> notify.SmsSendRequest.ParamtersEntry
|
||||
0, // 1: notify.Sms.Send:input_type -> notify.SmsSendRequest
|
||||
2, // 2: notify.Sms.Verify:input_type -> notify.SmsVerifyRequest
|
||||
1, // 3: notify.Sms.Send:output_type -> notify.SmsSendResponse
|
||||
3, // 4: notify.Sms.Verify:output_type -> notify.PassResponse
|
||||
3, // [3:5] is the sub-list for method output_type
|
||||
1, // [1:3] 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
|
||||
}
|
||||
|
||||
func init() { file_sms_proto_init() }
|
||||
func file_sms_proto_init() {
|
||||
if File_sms_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_sms_proto_rawDesc), len(file_sms_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_sms_proto_goTypes,
|
||||
DependencyIndexes: file_sms_proto_depIdxs,
|
||||
MessageInfos: file_sms_proto_msgTypes,
|
||||
}.Build()
|
||||
File_sms_proto = out.File
|
||||
file_sms_proto_goTypes = nil
|
||||
file_sms_proto_depIdxs = nil
|
||||
}
|
|
@ -1,163 +0,0 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: sms.proto
|
||||
|
||||
package notify
|
||||
|
||||
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 (
|
||||
Sms_Send_FullMethodName = "/notify.Sms/Send"
|
||||
Sms_Verify_FullMethodName = "/notify.Sms/Verify"
|
||||
)
|
||||
|
||||
// SmsClient is the client API for Sms 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.
|
||||
//
|
||||
// sms method
|
||||
type SmsClient interface {
|
||||
Send(ctx context.Context, in *SmsSendRequest, opts ...grpc.CallOption) (*SmsSendResponse, error)
|
||||
Verify(ctx context.Context, in *SmsVerifyRequest, opts ...grpc.CallOption) (*PassResponse, error)
|
||||
}
|
||||
|
||||
type smsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSmsClient(cc grpc.ClientConnInterface) SmsClient {
|
||||
return &smsClient{cc}
|
||||
}
|
||||
|
||||
func (c *smsClient) Send(ctx context.Context, in *SmsSendRequest, opts ...grpc.CallOption) (*SmsSendResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SmsSendResponse)
|
||||
err := c.cc.Invoke(ctx, Sms_Send_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *smsClient) Verify(ctx context.Context, in *SmsVerifyRequest, opts ...grpc.CallOption) (*PassResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PassResponse)
|
||||
err := c.cc.Invoke(ctx, Sms_Verify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SmsServer is the server API for Sms service.
|
||||
// All implementations must embed UnimplementedSmsServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// sms method
|
||||
type SmsServer interface {
|
||||
Send(context.Context, *SmsSendRequest) (*SmsSendResponse, error)
|
||||
Verify(context.Context, *SmsVerifyRequest) (*PassResponse, error)
|
||||
mustEmbedUnimplementedSmsServer()
|
||||
}
|
||||
|
||||
// UnimplementedSmsServer 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 UnimplementedSmsServer struct{}
|
||||
|
||||
func (UnimplementedSmsServer) Send(context.Context, *SmsSendRequest) (*SmsSendResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
|
||||
}
|
||||
func (UnimplementedSmsServer) Verify(context.Context, *SmsVerifyRequest) (*PassResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
|
||||
}
|
||||
func (UnimplementedSmsServer) mustEmbedUnimplementedSmsServer() {}
|
||||
func (UnimplementedSmsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSmsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SmsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSmsServer interface {
|
||||
mustEmbedUnimplementedSmsServer()
|
||||
}
|
||||
|
||||
func RegisterSmsServer(s grpc.ServiceRegistrar, srv SmsServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSmsServer 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(&Sms_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Sms_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SmsSendRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SmsServer).Send(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Sms_Send_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SmsServer).Send(ctx, req.(*SmsSendRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Sms_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SmsVerifyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SmsServer).Verify(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Sms_Verify_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SmsServer).Verify(ctx, req.(*SmsVerifyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Sms_ServiceDesc is the grpc.ServiceDesc for Sms service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Sms_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "notify.Sms",
|
||||
HandlerType: (*SmsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Send",
|
||||
Handler: _Sms_Send_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Verify",
|
||||
Handler: _Sms_Verify_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "sms.proto",
|
||||
}
|
Loading…
Reference in New Issue