|
|
|
|
@ -43,51 +43,4 @@ public class DockerRegistryController {
|
|
|
|
|
return dockerRegistryService.listTags(repo)
|
|
|
|
|
.map(ResponseEntity::ok);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/repositories/{repo}/tags-with-digest")
|
|
|
|
|
@Operation(summary = "태그 목록 + digest 조회")
|
|
|
|
|
public Mono<ResponseEntity<List<TagWithDigest>>> listTagsWithDigest(
|
|
|
|
|
@PathVariable String repo) {
|
|
|
|
|
|
|
|
|
|
return dockerRegistryService.listTagsWithDigest(repo)
|
|
|
|
|
.map(ResponseEntity::ok);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/repositories/{repo}/upload", consumes = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
|
|
|
|
@Operation(summary = "이미지 업로드")
|
|
|
|
|
public Mono<ResponseEntity<String>> uploadImage(@PathVariable String repo,
|
|
|
|
|
@RequestParam String tag,
|
|
|
|
|
@RequestBody byte[] content) {
|
|
|
|
|
return dockerRegistryService.uploadImage(repo, tag, content)
|
|
|
|
|
.map(ResponseEntity::ok);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/repositories/{repo}/download/{digest}")
|
|
|
|
|
@Operation(summary = "이미지 다운로드")
|
|
|
|
|
public Mono<ResponseEntity<byte[]>> downloadImage(@PathVariable String repo,
|
|
|
|
|
@PathVariable String digest) {
|
|
|
|
|
return dockerRegistryService.downloadImage(repo, digest)
|
|
|
|
|
.map(bytes -> ResponseEntity.ok()
|
|
|
|
|
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
.body(bytes));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/repositories/{repo}/manifest/{tag}")
|
|
|
|
|
@Operation(summary = "태그로 manifest 조회")
|
|
|
|
|
public Mono<ResponseEntity<JsonNode>> getManifest(
|
|
|
|
|
@PathVariable String repo,
|
|
|
|
|
@PathVariable String tag) {
|
|
|
|
|
return dockerRegistryService.getManifestByTag(repo, tag)
|
|
|
|
|
.map(ResponseEntity::ok);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/repositories/{repo}/digest/{tag}")
|
|
|
|
|
@Operation(summary = "태그로 digest 조회")
|
|
|
|
|
public Mono<ResponseEntity<String>> getDigest(
|
|
|
|
|
@PathVariable String repo,
|
|
|
|
|
@PathVariable String tag) {
|
|
|
|
|
return dockerRegistryService.getDigestByTag(repo, tag)
|
|
|
|
|
.map(ResponseEntity::ok);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|