Files
proto_go_dart_demo/frontend/lib/gen/notes/v1/notes.pbgrpc.dart
2026-02-23 13:02:22 +03:00

92 lines
3.4 KiB
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: notes/v1/notes.proto
//
// ЭТО СГЕНЕРИРОВАННЫЙ ФАЙЛ — gRPC клиентский код.
// В реальном проекте генерируется из proto.
//
// NoteServiceClient — типизированный клиент.
// Dart знает сигнатуры всех RPC методов.
// Если proto изменится и ты перегенерируешь —
// все вызовы с неверными типами дадут ошибку компиляции.
import 'package:grpc/grpc.dart' as $grpc;
import 'empty.pb.dart' as $empty;
import 'notes.pb.dart' as $0;
/// Типизированный gRPC клиент — сгенерирован из service NoteService.
/// Каждый метод соответствует rpc из proto файла.
class NoteServiceClient extends $grpc.Client {
static final _$createNote =
$grpc.ClientMethod<$0.CreateNoteRequest, $0.Note>(
'/notes.v1.NoteService/CreateNote',
($0.CreateNoteRequest value) => value.writeToBuffer(),
(List<int> value) => $0.Note()..mergeFromBuffer(value),
);
static final _$getNote = $grpc.ClientMethod<$0.GetNoteRequest, $0.Note>(
'/notes.v1.NoteService/GetNote',
($0.GetNoteRequest value) => value.writeToBuffer(),
(List<int> value) => $0.Note()..mergeFromBuffer(value),
);
static final _$updateNote =
$grpc.ClientMethod<$0.UpdateNoteRequest, $0.Note>(
'/notes.v1.NoteService/UpdateNote',
($0.UpdateNoteRequest value) => value.writeToBuffer(),
(List<int> value) => $0.Note()..mergeFromBuffer(value),
);
static final _$deleteNote =
$grpc.ClientMethod<$0.DeleteNoteRequest, $empty.Empty>(
'/notes.v1.NoteService/DeleteNote',
($0.DeleteNoteRequest value) => value.writeToBuffer(),
(List<int> value) => $empty.Empty()..mergeFromBuffer(value),
);
static final _$listNotes =
$grpc.ClientMethod<$0.ListNotesRequest, $0.ListNotesResponse>(
'/notes.v1.NoteService/ListNotes',
($0.ListNotesRequest value) => value.writeToBuffer(),
(List<int> value) => $0.ListNotesResponse()..mergeFromBuffer(value),
);
NoteServiceClient(
super.channel, {
super.options,
super.interceptors,
});
/// Создать заметку
$grpc.ResponseFuture<$0.Note> createNote($0.CreateNoteRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$createNote, request, options: options);
}
/// Получить заметку по ID
$grpc.ResponseFuture<$0.Note> getNote($0.GetNoteRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$getNote, request, options: options);
}
/// Обновить заметку
$grpc.ResponseFuture<$0.Note> updateNote($0.UpdateNoteRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$updateNote, request, options: options);
}
/// Удалить заметку
$grpc.ResponseFuture<$empty.Empty> deleteNote(
$0.DeleteNoteRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$deleteNote, request, options: options);
}
/// Получить список заметок
$grpc.ResponseFuture<$0.ListNotesResponse> listNotes(
$0.ListNotesRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$listNotes, request, options: options);
}
}