161 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Dart
		
	
	
	
			
		
		
	
	
			161 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Dart
		
	
	
	
| // This is a generated file - do not edit.
 | |
| //
 | |
| // Generated from category.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 'category.pb.dart' as $1;
 | |
| 
 | |
| export 'category.pb.dart';
 | |
| 
 | |
| /// CMS - 分类
 | |
| @$pb.GrpcServiceName('cms.Category')
 | |
| class CategoryClient 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 = [
 | |
|     '',
 | |
|   ];
 | |
| 
 | |
|   CategoryClient(super.channel, {super.options, super.interceptors});
 | |
| 
 | |
|   /// 分类列表
 | |
|   $grpc.ResponseFuture<$1.CategoryListReply> fetch(
 | |
|     $0.IdentRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$fetch, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 添加分类
 | |
|   $grpc.ResponseFuture<$0.StatusReply> create(
 | |
|     $0.CategoryItem request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$create, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 修改分类
 | |
|   $grpc.ResponseFuture<$0.StatusReply> modify(
 | |
|     $1.ModifyCategoryRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$modify, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 删除分类
 | |
|   $grpc.ResponseFuture<$0.StatusReply> delete(
 | |
|     $1.DeleteCategoryRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$delete, request, options: options);
 | |
|   }
 | |
| 
 | |
|   // method descriptors
 | |
| 
 | |
|   static final _$fetch =
 | |
|       $grpc.ClientMethod<$0.IdentRequest, $1.CategoryListReply>(
 | |
|           '/cms.Category/Fetch',
 | |
|           ($0.IdentRequest value) => value.writeToBuffer(),
 | |
|           $1.CategoryListReply.fromBuffer);
 | |
|   static final _$create = $grpc.ClientMethod<$0.CategoryItem, $0.StatusReply>(
 | |
|       '/cms.Category/Create',
 | |
|       ($0.CategoryItem value) => value.writeToBuffer(),
 | |
|       $0.StatusReply.fromBuffer);
 | |
|   static final _$modify =
 | |
|       $grpc.ClientMethod<$1.ModifyCategoryRequest, $0.StatusReply>(
 | |
|           '/cms.Category/Modify',
 | |
|           ($1.ModifyCategoryRequest value) => value.writeToBuffer(),
 | |
|           $0.StatusReply.fromBuffer);
 | |
|   static final _$delete =
 | |
|       $grpc.ClientMethod<$1.DeleteCategoryRequest, $0.StatusReply>(
 | |
|           '/cms.Category/Delete',
 | |
|           ($1.DeleteCategoryRequest value) => value.writeToBuffer(),
 | |
|           $0.StatusReply.fromBuffer);
 | |
| }
 | |
| 
 | |
| @$pb.GrpcServiceName('cms.Category')
 | |
| abstract class CategoryServiceBase extends $grpc.Service {
 | |
|   $core.String get $name => 'cms.Category';
 | |
| 
 | |
|   CategoryServiceBase() {
 | |
|     $addMethod($grpc.ServiceMethod<$0.IdentRequest, $1.CategoryListReply>(
 | |
|         'Fetch',
 | |
|         fetch_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $0.IdentRequest.fromBuffer(value),
 | |
|         ($1.CategoryListReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$0.CategoryItem, $0.StatusReply>(
 | |
|         'Create',
 | |
|         create_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $0.CategoryItem.fromBuffer(value),
 | |
|         ($0.StatusReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$1.ModifyCategoryRequest, $0.StatusReply>(
 | |
|         'Modify',
 | |
|         modify_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) =>
 | |
|             $1.ModifyCategoryRequest.fromBuffer(value),
 | |
|         ($0.StatusReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$1.DeleteCategoryRequest, $0.StatusReply>(
 | |
|         'Delete',
 | |
|         delete_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) =>
 | |
|             $1.DeleteCategoryRequest.fromBuffer(value),
 | |
|         ($0.StatusReply value) => value.writeToBuffer()));
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.CategoryListReply> fetch_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$0.IdentRequest> $request) async {
 | |
|     return fetch($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.CategoryListReply> fetch(
 | |
|       $grpc.ServiceCall call, $0.IdentRequest request);
 | |
| 
 | |
|   $async.Future<$0.StatusReply> create_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$0.CategoryItem> $request) async {
 | |
|     return create($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.StatusReply> create(
 | |
|       $grpc.ServiceCall call, $0.CategoryItem request);
 | |
| 
 | |
|   $async.Future<$0.StatusReply> modify_Pre($grpc.ServiceCall $call,
 | |
|       $async.Future<$1.ModifyCategoryRequest> $request) async {
 | |
|     return modify($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.StatusReply> modify(
 | |
|       $grpc.ServiceCall call, $1.ModifyCategoryRequest request);
 | |
| 
 | |
|   $async.Future<$0.StatusReply> delete_Pre($grpc.ServiceCall $call,
 | |
|       $async.Future<$1.DeleteCategoryRequest> $request) async {
 | |
|     return delete($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.StatusReply> delete(
 | |
|       $grpc.ServiceCall call, $1.DeleteCategoryRequest request);
 | |
| }
 |