192 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			Dart
		
	
	
	
			
		
		
	
	
			192 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			Dart
		
	
	
	
| // This is a generated file - do not edit.
 | |
| //
 | |
| // Generated from share.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 'share.pb.dart' as $0;
 | |
| 
 | |
| export 'share.pb.dart';
 | |
| 
 | |
| /// 分享服务
 | |
| @$pb.GrpcServiceName('cloud.Share')
 | |
| class ShareClient 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 = [
 | |
|     '',
 | |
|   ];
 | |
| 
 | |
|   ShareClient(super.channel, {super.options, super.interceptors});
 | |
| 
 | |
|   /// 创建分享
 | |
|   $grpc.ResponseFuture<$1.StatusReply> createShare(
 | |
|     $0.CreateShareRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$createShare, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 获取分享详情
 | |
|   $grpc.ResponseFuture<$0.CloudShareItem> getShare(
 | |
|     $1.IdentRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$getShare, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 删除分享
 | |
|   $grpc.ResponseFuture<$1.StatusReply> deleteShare(
 | |
|     $1.IdentRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$deleteShare, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 获取分享列表
 | |
|   $grpc.ResponseFuture<$0.ListSharesResponse> listShares(
 | |
|     $1.FetchRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$listShares, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 验证分享密码
 | |
|   $grpc.ResponseFuture<$1.StatusReply> validateSharePassword(
 | |
|     $0.ValidateSharePasswordRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$validateSharePassword, request, options: options);
 | |
|   }
 | |
| 
 | |
|   // method descriptors
 | |
| 
 | |
|   static final _$createShare =
 | |
|       $grpc.ClientMethod<$0.CreateShareRequest, $1.StatusReply>(
 | |
|           '/cloud.Share/CreateShare',
 | |
|           ($0.CreateShareRequest value) => value.writeToBuffer(),
 | |
|           $1.StatusReply.fromBuffer);
 | |
|   static final _$getShare =
 | |
|       $grpc.ClientMethod<$1.IdentRequest, $0.CloudShareItem>(
 | |
|           '/cloud.Share/GetShare',
 | |
|           ($1.IdentRequest value) => value.writeToBuffer(),
 | |
|           $0.CloudShareItem.fromBuffer);
 | |
|   static final _$deleteShare =
 | |
|       $grpc.ClientMethod<$1.IdentRequest, $1.StatusReply>(
 | |
|           '/cloud.Share/DeleteShare',
 | |
|           ($1.IdentRequest value) => value.writeToBuffer(),
 | |
|           $1.StatusReply.fromBuffer);
 | |
|   static final _$listShares =
 | |
|       $grpc.ClientMethod<$1.FetchRequest, $0.ListSharesResponse>(
 | |
|           '/cloud.Share/ListShares',
 | |
|           ($1.FetchRequest value) => value.writeToBuffer(),
 | |
|           $0.ListSharesResponse.fromBuffer);
 | |
|   static final _$validateSharePassword =
 | |
|       $grpc.ClientMethod<$0.ValidateSharePasswordRequest, $1.StatusReply>(
 | |
|           '/cloud.Share/ValidateSharePassword',
 | |
|           ($0.ValidateSharePasswordRequest value) => value.writeToBuffer(),
 | |
|           $1.StatusReply.fromBuffer);
 | |
| }
 | |
| 
 | |
| @$pb.GrpcServiceName('cloud.Share')
 | |
| abstract class ShareServiceBase extends $grpc.Service {
 | |
|   $core.String get $name => 'cloud.Share';
 | |
| 
 | |
|   ShareServiceBase() {
 | |
|     $addMethod($grpc.ServiceMethod<$0.CreateShareRequest, $1.StatusReply>(
 | |
|         'CreateShare',
 | |
|         createShare_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) =>
 | |
|             $0.CreateShareRequest.fromBuffer(value),
 | |
|         ($1.StatusReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$1.IdentRequest, $0.CloudShareItem>(
 | |
|         'GetShare',
 | |
|         getShare_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value),
 | |
|         ($0.CloudShareItem value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$1.IdentRequest, $1.StatusReply>(
 | |
|         'DeleteShare',
 | |
|         deleteShare_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value),
 | |
|         ($1.StatusReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$1.FetchRequest, $0.ListSharesResponse>(
 | |
|         'ListShares',
 | |
|         listShares_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $1.FetchRequest.fromBuffer(value),
 | |
|         ($0.ListSharesResponse value) => value.writeToBuffer()));
 | |
|     $addMethod(
 | |
|         $grpc.ServiceMethod<$0.ValidateSharePasswordRequest, $1.StatusReply>(
 | |
|             'ValidateSharePassword',
 | |
|             validateSharePassword_Pre,
 | |
|             false,
 | |
|             false,
 | |
|             ($core.List<$core.int> value) =>
 | |
|                 $0.ValidateSharePasswordRequest.fromBuffer(value),
 | |
|             ($1.StatusReply value) => value.writeToBuffer()));
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.StatusReply> createShare_Pre($grpc.ServiceCall $call,
 | |
|       $async.Future<$0.CreateShareRequest> $request) async {
 | |
|     return createShare($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.StatusReply> createShare(
 | |
|       $grpc.ServiceCall call, $0.CreateShareRequest request);
 | |
| 
 | |
|   $async.Future<$0.CloudShareItem> getShare_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async {
 | |
|     return getShare($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.CloudShareItem> getShare(
 | |
|       $grpc.ServiceCall call, $1.IdentRequest request);
 | |
| 
 | |
|   $async.Future<$1.StatusReply> deleteShare_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async {
 | |
|     return deleteShare($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.StatusReply> deleteShare(
 | |
|       $grpc.ServiceCall call, $1.IdentRequest request);
 | |
| 
 | |
|   $async.Future<$0.ListSharesResponse> listShares_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$1.FetchRequest> $request) async {
 | |
|     return listShares($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.ListSharesResponse> listShares(
 | |
|       $grpc.ServiceCall call, $1.FetchRequest request);
 | |
| 
 | |
|   $async.Future<$1.StatusReply> validateSharePassword_Pre(
 | |
|       $grpc.ServiceCall $call,
 | |
|       $async.Future<$0.ValidateSharePasswordRequest> $request) async {
 | |
|     return validateSharePassword($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.StatusReply> validateSharePassword(
 | |
|       $grpc.ServiceCall call, $0.ValidateSharePasswordRequest request);
 | |
| }
 |