Skip to content

Commit

Permalink
Update build script for protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAstafyev committed Oct 7, 2024
1 parent 31c10bd commit a1f5604
Show file tree
Hide file tree
Showing 27 changed files with 426 additions and 408 deletions.
4 changes: 3 additions & 1 deletion application/apps/protocol/binding/proto/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions application/apps/protocol/binding/proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fn main() {
})
.collect();
let binding = prost_build::Config::new();

let mut cfg = binding;
cfg.type_attribute(".", r#"#[derive(serde::Serialize, serde::Deserialize)]"#);
for proto in protos.iter() {
Expand Down
6 changes: 3 additions & 3 deletions application/apps/protocol/binding/proto/output/attachment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export interface AttachmentInfoList {
elements: AttachmentInfo[];
}
export interface AttachmentInfo {
uuid: string;
filepath: string;
Expand All @@ -10,3 +7,6 @@ export interface AttachmentInfo {
mime: string;
messages: number[];
}
export interface AttachmentInfoList {
elements: AttachmentInfo[];
}
24 changes: 12 additions & 12 deletions application/apps/protocol/binding/proto/output/commands.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
export interface Finished {
result: Output | null;
}
export interface StringVec {
values: string[];
}
export interface Cancelled {
}
export interface CommandOutcome {
outcome_oneof: OutcomeOneof | null;
}
export interface OutcomeOneof {
Finished?: Finished;
Cancelled?: Cancelled;
export interface Empty {
}
export interface Output {
output_oneof: OutputOneof | null;
}
export interface OutputOneof {
StringValue?: string;
Expand All @@ -16,13 +22,7 @@ export interface OutputOneof {
Int64Value?: number;
EmptyValue?: Empty;
}
export interface Output {
output_oneof: OutputOneof | null;
}
export interface Cancelled {
}
export interface Finished {
result: Output | null;
}
export interface Empty {
export interface OutcomeOneof {
Finished?: Finished;
Cancelled?: Cancelled;
}
10 changes: 5 additions & 5 deletions application/apps/protocol/binding/proto/output/common.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export interface RangeInclusive {
start: number;
end: number;
export interface RangeInclusiveList {
elements: RangeInclusive[];
}
export interface Range {
start: number;
end: number;
}
export interface RangeInclusiveList {
elements: RangeInclusive[];
export interface RangeInclusive {
start: number;
end: number;
}
136 changes: 68 additions & 68 deletions application/apps/protocol/binding/proto/output/error.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
export interface Unsupported {
message: string;
}
export interface NativeError {
severity: number;
kind: number;
message: string;
}
export interface InvalidArgs {
message: string;
}
export interface Protocol {
export interface Aborted {
message: string;
}
export interface SessionUnavailable {
}
export interface InvalidData {
export interface SessionCreatingFail {
}
export interface Sde {
export interface Unsupported {
message: string;
}
export interface SearchError {
search_error_oneof: SearchErrorOneof | null;
}
export interface SearchIoOperation {
message: string;
}
export interface CompCommunication {
message: string;
}
export interface CompErrorOneof {
DestinationPath?: DestinationPath;
SessionCreatingFail?: SessionCreatingFail;
Expand All @@ -45,64 +26,73 @@ export interface CompErrorOneof {
Grabbing?: Grabbing;
Sde?: Sde;
}
export interface Interrupted {
}
export interface InvalidArgs {
message: string;
}
import { RangeInclusive } from "./common";
export interface InvalidRange {
range: RangeInclusive | null;
context: string;
}
export interface NotInitialize {
}
export interface SessionUnavailable {
}
export interface Process {
message: string;
}
export interface NativeError {
severity: number;
kind: number;
message: string;
}
export interface Input {
message: string;
}
export interface CompCommunication {
message: string;
}
export interface SearchCommunication {
message: string;
}
export enum NativeErrorKind {
FileNotFound,
UnsupportedFileType,
ComputationFailed,
Configuration,
Interrupted,
OperationSearch,
NotYetImplemented,
ChannelError,
Io,
Grabber,
export interface Sde {
message: string;
}
export enum Severity {
Warning,
Error,
}
export interface Input {
message: string;
export interface DestinationPath {
}
export interface Interrupted {
export interface ComputationError {
comp_error_oneof: CompErrorOneof | null;
}
export interface CompIoOperation {
export interface SearchConfig {
message: string;
}
export interface SearchErrorOneof {
SearchConfig?: SearchConfig;
SearchCommunication?: SearchCommunication;
SearchIoOperation?: SearchIoOperation;
Regex?: Regex;
Input?: Input;
Grab?: Grab;
Aborted?: Aborted;
export interface SearchIoOperation {
message: string;
}
export interface ComputationError {
comp_error_oneof: CompErrorOneof | null;
export interface InvalidData {
}
export interface GrabCommunication {
export interface GrabConfig {
message: string;
}
export interface MultipleInitCall {
export interface Grab {
error: GrabError | null;
}
export interface GrabIoOperation {
export interface CompIoOperation {
message: string;
}
export interface SearchConfig {
export interface GrabIoOperation {
message: string;
}
export interface SessionCreatingFail {
export interface MultipleInitCall {
}
export interface DestinationPath {
export interface GrabCommunication {
message: string;
}
export interface GrabErrorOneof {
GrabConfig?: GrabConfig;
Expand All @@ -113,29 +103,39 @@ export interface GrabErrorOneof {
NotInitialize?: NotInitialize;
Unsupported?: Unsupported;
}
export interface OperationNotSupported {
message: string;
}
export interface NotInitialize {
}
export interface Grabbing {
error: GrabError | null;
}
export interface GrabError {
grab_error_oneof: GrabErrorOneof | null;
}
export interface Grab {
error: GrabError | null;
export interface SearchErrorOneof {
SearchConfig?: SearchConfig;
SearchCommunication?: SearchCommunication;
SearchIoOperation?: SearchIoOperation;
Regex?: Regex;
Input?: Input;
Grab?: Grab;
Aborted?: Aborted;
}
export interface Aborted {
export interface Regex {
message: string;
}
export interface Process {
export interface Protocol {
message: string;
}
export interface GrabConfig {
export interface OperationNotSupported {
message: string;
}
export interface Regex {
message: string;
export interface Grabbing {
error: GrabError | null;
}
export enum NativeErrorKind {
FileNotFound,
UnsupportedFileType,
ComputationFailed,
Configuration,
Interrupted,
OperationSearch,
NotYetImplemented,
ChannelError,
Io,
Grabber,
}
46 changes: 23 additions & 23 deletions application/apps/protocol/binding/proto/output/event.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
export interface ValueRange {
min: number;
max: number;
import { Ticks } from "./progress";
export interface DetailOneof {
Ticks?: Ticks;
Notification?: Notification;
Stopped?: boolean;
}
export interface OperationDone {
uuid: string;
result: string;
export interface SearchMapUpdated {
update: string;
}
import { NativeError } from "./error";
export interface EventOneof {
Expand All @@ -23,31 +24,23 @@ export interface EventOneof {
OperationDone?: OperationDone;
SessionDestroyed?: boolean;
}
import { Ticks } from "./progress";
export interface DetailOneof {
Ticks?: Ticks;
Notification?: Notification;
Stopped?: boolean;
}
export interface SearchMapUpdated {
update: string;
export interface IndexedMapUpdated {
len: number;
}
export interface CallbackEvent {
event_oneof: EventOneof | null;
}
export interface SearchValuesUpdated {
values: Map<number, ValueRange>;
}
export interface ProgressDetail {
detail_oneof: DetailOneof | null;
}
export interface OperationDone {
uuid: string;
result: string;
}
export interface OperationError {
uuid: string;
error: NativeError | null;
}
export interface IndexedMapUpdated {
len: number;
}
export interface Notification {
severity: number;
content: string;
Expand All @@ -57,12 +50,19 @@ export interface SearchUpdated {
found: number;
stat: Map<string, number>;
}
export interface Progress {
uuid: string;
detail: ProgressDetail | null;
export interface SearchValuesUpdated {
values: Map<number, ValueRange>;
}
export interface ValueRange {
min: number;
max: number;
}
import { AttachmentInfo } from "./attachment";
export interface AttachmentsUpdated {
len: number;
attachment: AttachmentInfo | null;
}
export interface Progress {
uuid: string;
detail: ProgressDetail | null;
}
6 changes: 3 additions & 3 deletions application/apps/protocol/binding/proto/output/grabbing.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export interface GrabbedElementList {
elements: GrabbedElement[];
}
export interface GrabbedElement {
source_id: number;
content: string;
pos: number;
nature: number;
}
export interface GrabbedElementList {
elements: GrabbedElement[];
}
2 changes: 1 addition & 1 deletion application/apps/protocol/binding/proto/output/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { Range } from "./common";
export { RangeInclusive } from "./common";
export { Range } from "./common";
export { RangeInclusiveList } from "./common";
export { AttachmentInfo } from "./attachment";
export { AttachmentInfoList } from "./attachment";
Expand Down
Loading

0 comments on commit a1f5604

Please sign in to comment.