102 lines
3.0 KiB
Dart
102 lines
3.0 KiB
Dart
// This is a generated file - do not edit.
|
|
//
|
|
// Generated from msg.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 'blocks.pb.dart' as $1;
|
|
import 'msg.pb.dart' as $0;
|
|
|
|
export 'msg.pb.dart';
|
|
|
|
/// im msg service
|
|
@$pb.GrpcServiceName('mcs.Msg')
|
|
class MsgClient 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 = [
|
|
'',
|
|
];
|
|
|
|
MsgClient(super.channel, {super.options, super.interceptors});
|
|
|
|
/// 推送消息
|
|
$grpc.ResponseFuture<$1.StatusReply> push(
|
|
$0.MsgPushRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$push, request, options: options);
|
|
}
|
|
|
|
/// 消息到达确认
|
|
$grpc.ResponseFuture<$1.StatusReply> ack(
|
|
$0.AckRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$ack, request, options: options);
|
|
}
|
|
|
|
// method descriptors
|
|
|
|
static final _$push = $grpc.ClientMethod<$0.MsgPushRequest, $1.StatusReply>(
|
|
'/mcs.Msg/Push',
|
|
($0.MsgPushRequest value) => value.writeToBuffer(),
|
|
$1.StatusReply.fromBuffer);
|
|
static final _$ack = $grpc.ClientMethod<$0.AckRequest, $1.StatusReply>(
|
|
'/mcs.Msg/Ack',
|
|
($0.AckRequest value) => value.writeToBuffer(),
|
|
$1.StatusReply.fromBuffer);
|
|
}
|
|
|
|
@$pb.GrpcServiceName('mcs.Msg')
|
|
abstract class MsgServiceBase extends $grpc.Service {
|
|
$core.String get $name => 'mcs.Msg';
|
|
|
|
MsgServiceBase() {
|
|
$addMethod($grpc.ServiceMethod<$0.MsgPushRequest, $1.StatusReply>(
|
|
'Push',
|
|
push_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.MsgPushRequest.fromBuffer(value),
|
|
($1.StatusReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$0.AckRequest, $1.StatusReply>(
|
|
'Ack',
|
|
ack_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.AckRequest.fromBuffer(value),
|
|
($1.StatusReply value) => value.writeToBuffer()));
|
|
}
|
|
|
|
$async.Future<$1.StatusReply> push_Pre($grpc.ServiceCall $call,
|
|
$async.Future<$0.MsgPushRequest> $request) async {
|
|
return push($call, await $request);
|
|
}
|
|
|
|
$async.Future<$1.StatusReply> push(
|
|
$grpc.ServiceCall call, $0.MsgPushRequest request);
|
|
|
|
$async.Future<$1.StatusReply> ack_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.AckRequest> $request) async {
|
|
return ack($call, await $request);
|
|
}
|
|
|
|
$async.Future<$1.StatusReply> ack(
|
|
$grpc.ServiceCall call, $0.AckRequest request);
|
|
}
|