Skip to content

Commit

Permalink
Use bytes as application_config
Browse files Browse the repository at this point in the history
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
  • Loading branch information
Warashi committed Sep 19, 2024
1 parent 1a7d2ee commit 48ab49c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 537 deletions.
118 changes: 14 additions & 104 deletions pkg/model/deployment_source.pb.go

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

137 changes: 1 addition & 136 deletions pkg/model/deployment_source.pb.validate.go

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

14 changes: 1 addition & 13 deletions pkg/model/deployment_source.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,5 @@ message DeploymentSource {
// The git commit revision of the source code.
string revision = 2;
// The configuration of the application which is specific for plugins.
PluginApplicationSpec application_config = 3;
}

message PluginApplicationSpec {
// The kind of the application spec.
string kind = 1;
// The version of the application spec.
string api_version = 2;

// The raw data of the application spec.
// We store this spec in bytes because we don't want to define the structure of the plugin-specific config.
// The serialization format is JSON.
bytes spec = 3;
bytes application_config = 3;
}
38 changes: 5 additions & 33 deletions web/model/deployment_source_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export class DeploymentSource extends jspb.Message {
getRevision(): string;
setRevision(value: string): DeploymentSource;

getApplicationConfig(): PluginApplicationSpec | undefined;
setApplicationConfig(value?: PluginApplicationSpec): DeploymentSource;
hasApplicationConfig(): boolean;
clearApplicationConfig(): DeploymentSource;
getApplicationConfig(): Uint8Array | string;
getApplicationConfig_asU8(): Uint8Array;
getApplicationConfig_asB64(): string;
setApplicationConfig(value: Uint8Array | string): DeploymentSource;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeploymentSource.AsObject;
Expand All @@ -26,35 +26,7 @@ export namespace DeploymentSource {
export type AsObject = {
applicationDirectory: string,
revision: string,
applicationConfig?: PluginApplicationSpec.AsObject,
}
}

export class PluginApplicationSpec extends jspb.Message {
getKind(): string;
setKind(value: string): PluginApplicationSpec;

getApiVersion(): string;
setApiVersion(value: string): PluginApplicationSpec;

getSpec(): Uint8Array | string;
getSpec_asU8(): Uint8Array;
getSpec_asB64(): string;
setSpec(value: Uint8Array | string): PluginApplicationSpec;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PluginApplicationSpec.AsObject;
static toObject(includeInstance: boolean, msg: PluginApplicationSpec): PluginApplicationSpec.AsObject;
static serializeBinaryToWriter(message: PluginApplicationSpec, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PluginApplicationSpec;
static deserializeBinaryFromReader(message: PluginApplicationSpec, reader: jspb.BinaryReader): PluginApplicationSpec;
}

export namespace PluginApplicationSpec {
export type AsObject = {
kind: string,
apiVersion: string,
spec: Uint8Array | string,
applicationConfig: Uint8Array | string,
}
}

Loading

0 comments on commit 48ab49c

Please sign in to comment.