268 lines
8.8 KiB
Dart
268 lines
8.8 KiB
Dart
// This is a generated file - do not edit.
|
|
//
|
|
// Generated from post.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 $0;
|
|
import 'post.pb.dart' as $1;
|
|
|
|
export 'post.pb.dart';
|
|
|
|
/// 推文相关操作
|
|
@$pb.GrpcServiceName('feed.Post')
|
|
class PostClient 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 = [
|
|
'',
|
|
];
|
|
|
|
PostClient(super.channel, {super.options, super.interceptors});
|
|
|
|
/// 推文列表
|
|
$grpc.ResponseFuture<$0.PostListReply> fetch(
|
|
$0.FetchRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$fetch, request, options: options);
|
|
}
|
|
|
|
/// 新建推文
|
|
$grpc.ResponseFuture<$0.StatusReply> create(
|
|
$0.PostItem request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$create, request, options: options);
|
|
}
|
|
|
|
/// 修改推文
|
|
$grpc.ResponseFuture<$0.StatusReply> change(
|
|
$0.PostItem request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$change, request, options: options);
|
|
}
|
|
|
|
/// 删除推文
|
|
$grpc.ResponseFuture<$0.StatusReply> remove(
|
|
$0.IdentRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$remove, request, options: options);
|
|
}
|
|
|
|
/// 评论列表
|
|
$grpc.ResponseFuture<$1.CommentListReply> commentList(
|
|
$0.FetchRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$commentList, request, options: options);
|
|
}
|
|
|
|
/// 新建评论
|
|
$grpc.ResponseFuture<$0.StatusReply> addComment(
|
|
$1.CommentItem request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$addComment, request, options: options);
|
|
}
|
|
|
|
/// 删除评论
|
|
$grpc.ResponseFuture<$0.StatusReply> deleteComment(
|
|
$0.IdentRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$deleteComment, request, options: options);
|
|
}
|
|
|
|
/// 计数操作
|
|
$grpc.ResponseFuture<$0.StatusReply> action(
|
|
$1.PostActionRequest request, {
|
|
$grpc.CallOptions? options,
|
|
}) {
|
|
return $createUnaryCall(_$action, request, options: options);
|
|
}
|
|
|
|
// method descriptors
|
|
|
|
static final _$fetch = $grpc.ClientMethod<$0.FetchRequest, $0.PostListReply>(
|
|
'/feed.Post/Fetch',
|
|
($0.FetchRequest value) => value.writeToBuffer(),
|
|
$0.PostListReply.fromBuffer);
|
|
static final _$create = $grpc.ClientMethod<$0.PostItem, $0.StatusReply>(
|
|
'/feed.Post/Create',
|
|
($0.PostItem value) => value.writeToBuffer(),
|
|
$0.StatusReply.fromBuffer);
|
|
static final _$change = $grpc.ClientMethod<$0.PostItem, $0.StatusReply>(
|
|
'/feed.Post/Change',
|
|
($0.PostItem value) => value.writeToBuffer(),
|
|
$0.StatusReply.fromBuffer);
|
|
static final _$remove = $grpc.ClientMethod<$0.IdentRequest, $0.StatusReply>(
|
|
'/feed.Post/Remove',
|
|
($0.IdentRequest value) => value.writeToBuffer(),
|
|
$0.StatusReply.fromBuffer);
|
|
static final _$commentList =
|
|
$grpc.ClientMethod<$0.FetchRequest, $1.CommentListReply>(
|
|
'/feed.Post/CommentList',
|
|
($0.FetchRequest value) => value.writeToBuffer(),
|
|
$1.CommentListReply.fromBuffer);
|
|
static final _$addComment =
|
|
$grpc.ClientMethod<$1.CommentItem, $0.StatusReply>(
|
|
'/feed.Post/AddComment',
|
|
($1.CommentItem value) => value.writeToBuffer(),
|
|
$0.StatusReply.fromBuffer);
|
|
static final _$deleteComment =
|
|
$grpc.ClientMethod<$0.IdentRequest, $0.StatusReply>(
|
|
'/feed.Post/DeleteComment',
|
|
($0.IdentRequest value) => value.writeToBuffer(),
|
|
$0.StatusReply.fromBuffer);
|
|
static final _$action =
|
|
$grpc.ClientMethod<$1.PostActionRequest, $0.StatusReply>(
|
|
'/feed.Post/Action',
|
|
($1.PostActionRequest value) => value.writeToBuffer(),
|
|
$0.StatusReply.fromBuffer);
|
|
}
|
|
|
|
@$pb.GrpcServiceName('feed.Post')
|
|
abstract class PostServiceBase extends $grpc.Service {
|
|
$core.String get $name => 'feed.Post';
|
|
|
|
PostServiceBase() {
|
|
$addMethod($grpc.ServiceMethod<$0.FetchRequest, $0.PostListReply>(
|
|
'Fetch',
|
|
fetch_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.FetchRequest.fromBuffer(value),
|
|
($0.PostListReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$0.PostItem, $0.StatusReply>(
|
|
'Create',
|
|
create_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.PostItem.fromBuffer(value),
|
|
($0.StatusReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$0.PostItem, $0.StatusReply>(
|
|
'Change',
|
|
change_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.PostItem.fromBuffer(value),
|
|
($0.StatusReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$0.IdentRequest, $0.StatusReply>(
|
|
'Remove',
|
|
remove_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.IdentRequest.fromBuffer(value),
|
|
($0.StatusReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$0.FetchRequest, $1.CommentListReply>(
|
|
'CommentList',
|
|
commentList_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.FetchRequest.fromBuffer(value),
|
|
($1.CommentListReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$1.CommentItem, $0.StatusReply>(
|
|
'AddComment',
|
|
addComment_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $1.CommentItem.fromBuffer(value),
|
|
($0.StatusReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$0.IdentRequest, $0.StatusReply>(
|
|
'DeleteComment',
|
|
deleteComment_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $0.IdentRequest.fromBuffer(value),
|
|
($0.StatusReply value) => value.writeToBuffer()));
|
|
$addMethod($grpc.ServiceMethod<$1.PostActionRequest, $0.StatusReply>(
|
|
'Action',
|
|
action_Pre,
|
|
false,
|
|
false,
|
|
($core.List<$core.int> value) => $1.PostActionRequest.fromBuffer(value),
|
|
($0.StatusReply value) => value.writeToBuffer()));
|
|
}
|
|
|
|
$async.Future<$0.PostListReply> fetch_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.FetchRequest> $request) async {
|
|
return fetch($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.PostListReply> fetch(
|
|
$grpc.ServiceCall call, $0.FetchRequest request);
|
|
|
|
$async.Future<$0.StatusReply> create_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.PostItem> $request) async {
|
|
return create($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.StatusReply> create(
|
|
$grpc.ServiceCall call, $0.PostItem request);
|
|
|
|
$async.Future<$0.StatusReply> change_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.PostItem> $request) async {
|
|
return change($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.StatusReply> change(
|
|
$grpc.ServiceCall call, $0.PostItem request);
|
|
|
|
$async.Future<$0.StatusReply> remove_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.IdentRequest> $request) async {
|
|
return remove($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.StatusReply> remove(
|
|
$grpc.ServiceCall call, $0.IdentRequest request);
|
|
|
|
$async.Future<$1.CommentListReply> commentList_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.FetchRequest> $request) async {
|
|
return commentList($call, await $request);
|
|
}
|
|
|
|
$async.Future<$1.CommentListReply> commentList(
|
|
$grpc.ServiceCall call, $0.FetchRequest request);
|
|
|
|
$async.Future<$0.StatusReply> addComment_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$1.CommentItem> $request) async {
|
|
return addComment($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.StatusReply> addComment(
|
|
$grpc.ServiceCall call, $1.CommentItem request);
|
|
|
|
$async.Future<$0.StatusReply> deleteComment_Pre(
|
|
$grpc.ServiceCall $call, $async.Future<$0.IdentRequest> $request) async {
|
|
return deleteComment($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.StatusReply> deleteComment(
|
|
$grpc.ServiceCall call, $0.IdentRequest request);
|
|
|
|
$async.Future<$0.StatusReply> action_Pre($grpc.ServiceCall $call,
|
|
$async.Future<$1.PostActionRequest> $request) async {
|
|
return action($call, await $request);
|
|
}
|
|
|
|
$async.Future<$0.StatusReply> action(
|
|
$grpc.ServiceCall call, $1.PostActionRequest request);
|
|
}
|