diff --git a/api/v1/cluster/service_connect.ts b/api/v1/cluster/service_connect.ts new file mode 100644 index 0000000..49a86e0 --- /dev/null +++ b/api/v1/cluster/service_connect.ts @@ -0,0 +1,30 @@ +// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts" +// @generated from file api/v1/cluster/service.proto (package api.v1.cluster, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetConfigRequest, GetConfigResponse } from "./service_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * The service to your cluster running Rig. + * + * @generated from service api.v1.cluster.Service + */ +export const Service = { + typeName: "api.v1.cluster.Service", + methods: { + /** + * GetConfig returns the config for the cluster + * + * @generated from rpc api.v1.cluster.Service.GetConfig + */ + getConfig: { + name: "GetConfig", + I: GetConfigRequest, + O: GetConfigResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/api/v1/cluster/service_pb.ts b/api/v1/cluster/service_pb.ts new file mode 100644 index 0000000..c85d088 --- /dev/null +++ b/api/v1/cluster/service_pb.ts @@ -0,0 +1,189 @@ +// @generated by protoc-gen-es v1.3.1 with parameter "target=ts" +// @generated from file api/v1/cluster/service.proto (package api.v1.cluster, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum api.v1.cluster.ClusterType + */ +export enum ClusterType { + /** + * @generated from enum value: CLUSTER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CLUSTER_TYPE_DOCKER = 1; + */ + DOCKER = 1, + + /** + * @generated from enum value: CLUSTER_TYPE_KUBERNETES = 2; + */ + KUBERNETES = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(ClusterType) +proto3.util.setEnumType(ClusterType, "api.v1.cluster.ClusterType", [ + { no: 0, name: "CLUSTER_TYPE_UNSPECIFIED" }, + { no: 1, name: "CLUSTER_TYPE_DOCKER" }, + { no: 2, name: "CLUSTER_TYPE_KUBERNETES" }, +]); + +/** + * @generated from message api.v1.cluster.GetConfigRequest + */ +export class GetConfigRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.cluster.GetConfigRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetConfigRequest { + return new GetConfigRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetConfigRequest { + return new GetConfigRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetConfigRequest { + return new GetConfigRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetConfigRequest | PlainMessage | undefined, b: GetConfigRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetConfigRequest, a, b); + } +} + +/** + * @generated from message api.v1.cluster.GetConfigResponse + */ +export class GetConfigResponse extends Message { + /** + * @generated from field: api.v1.cluster.ClusterType cluster_type = 1; + */ + clusterType = ClusterType.UNSPECIFIED; + + /** + * @generated from oneof api.v1.cluster.GetConfigResponse.dev_registry + */ + devRegistry: { + /** + * @generated from field: api.v1.cluster.DockerDaemon docker = 2; + */ + value: DockerDaemon; + case: "docker"; + } | { + /** + * @generated from field: api.v1.cluster.Registry registry = 3; + */ + value: Registry; + case: "registry"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.cluster.GetConfigResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "cluster_type", kind: "enum", T: proto3.getEnumType(ClusterType) }, + { no: 2, name: "docker", kind: "message", T: DockerDaemon, oneof: "dev_registry" }, + { no: 3, name: "registry", kind: "message", T: Registry, oneof: "dev_registry" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetConfigResponse { + return new GetConfigResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetConfigResponse { + return new GetConfigResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetConfigResponse { + return new GetConfigResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetConfigResponse | PlainMessage | undefined, b: GetConfigResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetConfigResponse, a, b); + } +} + +/** + * @generated from message api.v1.cluster.DockerDaemon + */ +export class DockerDaemon extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.cluster.DockerDaemon"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DockerDaemon { + return new DockerDaemon().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DockerDaemon { + return new DockerDaemon().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DockerDaemon { + return new DockerDaemon().fromJsonString(jsonString, options); + } + + static equals(a: DockerDaemon | PlainMessage | undefined, b: DockerDaemon | PlainMessage | undefined): boolean { + return proto3.util.equals(DockerDaemon, a, b); + } +} + +/** + * @generated from message api.v1.cluster.Registry + */ +export class Registry extends Message { + /** + * @generated from field: string host = 1; + */ + host = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.cluster.Registry"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "host", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Registry { + return new Registry().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Registry { + return new Registry().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Registry { + return new Registry().fromJsonString(jsonString, options); + } + + static equals(a: Registry | PlainMessage | undefined, b: Registry | PlainMessage | undefined): boolean { + return proto3.util.equals(Registry, a, b); + } +} +