Skip to content

Commit

Permalink
Merge branch 'master' into 172-add-support-for-conda-lock-file
Browse files Browse the repository at this point in the history
  • Loading branch information
munishchouhan authored Oct 4, 2024
2 parents b7605e8 + fb59413 commit a4f9225
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typespec/models/BuildStatusResponse.tsp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import "./Status.tsp";

@doc("Response payload for build status.")
model BuildStatusResponse {
duration: string;
id: string;
startTime: string;
status: "PENDING" | "COMPLETED";
status: Status;
succeeded: boolean;
}
16 changes: 16 additions & 0 deletions typespec/models/ContainerMirrorResponse.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import "./ContainerPlatform.tsp";
import "./Status.tsp";

@doc("Response payload for container mirroring.")
model ContainerMirrorResponse {
mirrorId: string;
digest: string;
sourceImage: string;
targetImage: string;
platform: ContainerPlatform;
creationTime: string;
status: Status;
duration: string;
exitCode: int32;
logs: string;
}
21 changes: 21 additions & 0 deletions typespec/models/ContainerPlatform.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@doc("Represents os platform of a container.")
model ContainerPlatform {
os: string;
arch: string;
variant?: string;
}

enum Architecture {
ARM64,
AARCH64,
AMD64,
X86_64,
X86_64_ALT,
ARM
}

enum OS {
LINUX,
WINDOWS,
MACOS
}
4 changes: 4 additions & 0 deletions typespec/models/Status.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enum Status {
PENDING,
COMPLETED
}
1 change: 1 addition & 0 deletions typespec/models/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ import "./WaveScanRecord.tsp";
import "./WaveBuildRecord.tsp";
import "./ValidateRegistryCredsRequest.tsp";
import "./WaveContainerRecord.tsp";
import "./ContainerMirrorResponse.tsp";
10 changes: 10 additions & 0 deletions typespec/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,14 @@ namespace wave {
@route("validate-creds")
@post op validateCreds(@body request: ValidateRegistryCredsRequest): boolean;

@route("/v1alpha1/mirrors/{mirrorId}")
interface getMirrorRecord {
@post op inspectContainer(@path mirrorId: string): {
@body response: ContainerMirrorResponse;
@statusCode statusCode: 200;
}|{
@statusCode statusCode: 404;
};

}
}

0 comments on commit a4f9225

Please sign in to comment.