-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from infinimesh/dev-eventbus
Dev eventbus
- Loading branch information
Showing
10 changed files
with
1,199 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=js+dts" | ||
// @generated from file eventbus/eventbus.proto (package infinimesh.eventbus, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import { EmptyMessage } from "../node/node_pb.js"; | ||
import { Event } from "./eventbus_pb.js"; | ||
import { MethodKind } from "@bufbuild/protobuf"; | ||
|
||
/** | ||
* @generated from service infinimesh.eventbus.EventsService | ||
*/ | ||
export declare const EventsService: { | ||
readonly typeName: "infinimesh.eventbus.EventsService", | ||
readonly methods: { | ||
/** | ||
* @generated from rpc infinimesh.eventbus.EventsService.Subscribe | ||
*/ | ||
readonly subscribe: { | ||
readonly name: "Subscribe", | ||
readonly I: typeof EmptyMessage, | ||
readonly O: typeof Event, | ||
readonly kind: MethodKind.ServerStreaming, | ||
}, | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=js+dts" | ||
// @generated from file eventbus/eventbus.proto (package infinimesh.eventbus, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import { EmptyMessage } from "../node/node_pb.js"; | ||
import { Event } from "./eventbus_pb.js"; | ||
import { MethodKind } from "@bufbuild/protobuf"; | ||
|
||
/** | ||
* @generated from service infinimesh.eventbus.EventsService | ||
*/ | ||
export const EventsService = { | ||
typeName: "infinimesh.eventbus.EventsService", | ||
methods: { | ||
/** | ||
* @generated from rpc infinimesh.eventbus.EventsService.Subscribe | ||
*/ | ||
subscribe: { | ||
name: "Subscribe", | ||
I: EmptyMessage, | ||
O: Event, | ||
kind: MethodKind.ServerStreaming, | ||
}, | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" | ||
// @generated from file eventbus/eventbus.proto (package infinimesh.eventbus, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf"; | ||
import { Message, proto3 } from "@bufbuild/protobuf"; | ||
import type { Account } from "../node/accounts/accounts_pb.js"; | ||
import type { Namespace } from "../node/namespaces/namespaces_pb.js"; | ||
import type { Device } from "../node/devices/devices_pb.js"; | ||
|
||
/** | ||
* @generated from enum infinimesh.eventbus.EventKind | ||
*/ | ||
export declare enum EventKind { | ||
/** | ||
* @generated from enum value: NONE = 0; | ||
*/ | ||
NONE = 0, | ||
|
||
/** | ||
* @generated from enum value: ACCOUNT_CREATE = 1; | ||
*/ | ||
ACCOUNT_CREATE = 1, | ||
|
||
/** | ||
* @generated from enum value: ACCOUNT_UPDATE = 2; | ||
*/ | ||
ACCOUNT_UPDATE = 2, | ||
|
||
/** | ||
* @generated from enum value: ACCOUNT_DELETE = 3; | ||
*/ | ||
ACCOUNT_DELETE = 3, | ||
|
||
/** | ||
* @generated from enum value: NAMESPACE_CREATE = 4; | ||
*/ | ||
NAMESPACE_CREATE = 4, | ||
|
||
/** | ||
* @generated from enum value: NAMESPACE_UPDATE = 5; | ||
*/ | ||
NAMESPACE_UPDATE = 5, | ||
|
||
/** | ||
* @generated from enum value: NAMESPACE_DELETE = 6; | ||
*/ | ||
NAMESPACE_DELETE = 6, | ||
|
||
/** | ||
* @generated from enum value: DEVICE_CREATE = 7; | ||
*/ | ||
DEVICE_CREATE = 7, | ||
|
||
/** | ||
* @generated from enum value: DEVICE_UPDATE = 8; | ||
*/ | ||
DEVICE_UPDATE = 8, | ||
|
||
/** | ||
* @generated from enum value: DEVICE_DELETE = 9; | ||
*/ | ||
DEVICE_DELETE = 9, | ||
} | ||
|
||
/** | ||
* @generated from message infinimesh.eventbus.Event | ||
*/ | ||
export declare class Event extends Message<Event> { | ||
/** | ||
* @generated from field: infinimesh.eventbus.EventKind event_kind = 1; | ||
*/ | ||
eventKind: EventKind; | ||
|
||
/** | ||
* @generated from oneof infinimesh.eventbus.Event.entity | ||
*/ | ||
entity: { | ||
/** | ||
* @generated from field: infinimesh.node.accounts.Account account = 2; | ||
*/ | ||
value: Account; | ||
case: "account"; | ||
} | { | ||
/** | ||
* @generated from field: infinimesh.node.namespaces.Namespace namespace = 3; | ||
*/ | ||
value: Namespace; | ||
case: "namespace"; | ||
} | { | ||
/** | ||
* @generated from field: infinimesh.node.devices.Device device = 4; | ||
*/ | ||
value: Device; | ||
case: "device"; | ||
} | { case: undefined; value?: undefined }; | ||
|
||
/** | ||
* @generated from field: google.protobuf.Struct meta = 5; | ||
*/ | ||
meta?: Struct; | ||
|
||
constructor(data?: PartialMessage<Event>); | ||
|
||
static readonly runtime: typeof proto3; | ||
static readonly typeName = "infinimesh.eventbus.Event"; | ||
static readonly fields: FieldList; | ||
|
||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Event; | ||
|
||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Event; | ||
|
||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Event; | ||
|
||
static equals(a: Event | PlainMessage<Event> | undefined, b: Event | PlainMessage<Event> | undefined): boolean; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" | ||
// @generated from file eventbus/eventbus.proto (package infinimesh.eventbus, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import { proto3, Struct } from "@bufbuild/protobuf"; | ||
import { Account } from "../node/accounts/accounts_pb.js"; | ||
import { Namespace } from "../node/namespaces/namespaces_pb.js"; | ||
import { Device } from "../node/devices/devices_pb.js"; | ||
|
||
/** | ||
* @generated from enum infinimesh.eventbus.EventKind | ||
*/ | ||
export const EventKind = proto3.makeEnum( | ||
"infinimesh.eventbus.EventKind", | ||
[ | ||
{no: 0, name: "NONE"}, | ||
{no: 1, name: "ACCOUNT_CREATE"}, | ||
{no: 2, name: "ACCOUNT_UPDATE"}, | ||
{no: 3, name: "ACCOUNT_DELETE"}, | ||
{no: 4, name: "NAMESPACE_CREATE"}, | ||
{no: 5, name: "NAMESPACE_UPDATE"}, | ||
{no: 6, name: "NAMESPACE_DELETE"}, | ||
{no: 7, name: "DEVICE_CREATE"}, | ||
{no: 8, name: "DEVICE_UPDATE"}, | ||
{no: 9, name: "DEVICE_DELETE"}, | ||
], | ||
); | ||
|
||
/** | ||
* @generated from message infinimesh.eventbus.Event | ||
*/ | ||
export const Event = proto3.makeMessageType( | ||
"infinimesh.eventbus.Event", | ||
() => [ | ||
{ no: 1, name: "event_kind", kind: "enum", T: proto3.getEnumType(EventKind) }, | ||
{ no: 2, name: "account", kind: "message", T: Account, oneof: "entity" }, | ||
{ no: 3, name: "namespace", kind: "message", T: Namespace, oneof: "entity" }, | ||
{ no: 4, name: "device", kind: "message", T: Device, oneof: "entity" }, | ||
{ no: 5, name: "meta", kind: "message", T: Struct }, | ||
], | ||
); | ||
|
Oops, something went wrong.