0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

Merge pull request #20 from rchincha/d1

docs: fix Makefile
This commit is contained in:
Serge Hallyn 2019-08-30 23:12:25 -05:00 committed by GitHub
commit 276d4be5db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 1931 deletions

View file

@ -24,14 +24,16 @@ check:
golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1 golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
golangci-lint run --enable-all ./cmd/... ./pkg/... golangci-lint run --enable-all ./cmd/... ./pkg/...
.PHONY: doc docs/docs.go:
doc:
swag -v || go get -u github.com/swaggo/swag/cmd/swag swag -v || go get -u github.com/swaggo/swag/cmd/swag
swag init -g pkg/api/routes.go swag init -g pkg/api/routes.go
.PHONY: doc
doc: docs/docs.go
.PHONY: clean .PHONY: clean
clean: clean:
rm -f bin/zot* rm -f bin/zot* docs/*
.PHONY: run .PHONY: run
run: binary test run: binary test

View file

@ -28,6 +28,9 @@ fmt-bazel:
.PHONY: update-bazel .PHONY: update-bazel
update-bazel: update-bazel:
${BAZEL} run //:gazelle ${BAZEL} run //:gazelle
.PHONY: update-mod
update-mod:
${BAZEL} run //:gazelle -- update-repos -from_file=go.mod ${BAZEL} run //:gazelle -- update-repos -from_file=go.mod
.PHONY: init .PHONY: init

View file

@ -1,749 +0,0 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-07-21 12:44:36.256745172 -0700 PDT m=+0.084868637
package docs
import (
"bytes"
"github.com/alecthomas/template"
"github.com/swaggo/swag"
)
var doc = `{
"swagger": "2.0",
"info": {
"description": "APIs for Open Container Initiative Distribution Specification",
"title": "Open Container Initiative Distribution Specification",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "v0.1.0-dev"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/v2/": {
"get": {
"description": "Check if this API version is supported",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check API support",
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/_catalog": {
"get": {
"description": "List all image repositories",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "List image repositories",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.RepositoryList"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/uploads": {
"post": {
"description": "Create a new image blob/layer upload",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Create image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
},
"headers": {
"Location": {
"type": "string",
"description": "/v2/{name}/blobs/uploads/{uuid}"
},
"Range": {
"type": "string",
"description": "bytes=0-0"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/uploads/{uuid}": {
"get": {
"description": "Get an image's blob/layer upload given a uuid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "no content",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update and finish an image's blob/layer upload given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Update image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "query",
"required": true
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"patch": {
"description": "Resume an image's blob/layer upload given an uuid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Resume image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
},
"headers": {
"Location": {
"type": "string",
"description": "/v2/{name}/blobs/uploads/{uuid}"
},
"Range": {
"type": "string",
"description": "bytes=0-128"
}
}
},
"400": {
"description": "bad request",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"416": {
"description": "range not satisfiable",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/{digest}": {
"get": {
"description": "Get an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/vnd.oci.image.layer.v1.tar+gzip"
],
"summary": "Get image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
}
}
}
},
"delete": {
"description": "Delete an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
}
}
}
},
"head": {
"description": "Check an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
}
}
}
},
"/v2/{name}/manifests/{reference}": {
"get": {
"description": "Get an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/vnd.oci.image.manifest.v1+json"
],
"summary": "Get image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Update image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"type": "string"
}
},
"400": {
"description": "bad request",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
}
}
},
"head": {
"description": "Check an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/tags/list": {
"get": {
"description": "List all image tags in a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "List image tags",
"parameters": [
{
"type": "string",
"description": "test",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageTags"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"api.ImageManifest": {
"type": "object"
},
"api.ImageTags": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"api.RepositoryList": {
"type": "object",
"properties": {
"repositories": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}`
type swaggerInfo struct {
Version string
Host string
BasePath string
Title string
Description string
}
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo swaggerInfo
type s struct{}
func (s *s) ReadDoc() string {
t, err := template.New("swagger_info").Parse(doc)
if err != nil {
return doc
}
var tpl bytes.Buffer
if err := t.Execute(&tpl, SwaggerInfo); err != nil {
return doc
}
return tpl.String()
}
func init() {
swag.Register(swag.Name, &s{})
}

View file

@ -1,705 +0,0 @@
{
"swagger": "2.0",
"info": {
"description": "APIs for Open Container Initiative Distribution Specification",
"title": "Open Container Initiative Distribution Specification",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "v0.1.0-dev"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/v2/": {
"get": {
"description": "Check if this API version is supported",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check API support",
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/_catalog": {
"get": {
"description": "List all image repositories",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "List image repositories",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.RepositoryList"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/uploads": {
"post": {
"description": "Create a new image blob/layer upload",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Create image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
},
"headers": {
"Location": {
"type": "string",
"description": "/v2/{name}/blobs/uploads/{uuid}"
},
"Range": {
"type": "string",
"description": "bytes=0-0"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/uploads/{uuid}": {
"get": {
"description": "Get an image's blob/layer upload given a uuid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "no content",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update and finish an image's blob/layer upload given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Update image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "query",
"required": true
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"patch": {
"description": "Resume an image's blob/layer upload given an uuid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Resume image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
},
"headers": {
"Location": {
"type": "string",
"description": "/v2/{name}/blobs/uploads/{uuid}"
},
"Range": {
"type": "string",
"description": "bytes=0-128"
}
}
},
"400": {
"description": "bad request",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"416": {
"description": "range not satisfiable",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/{digest}": {
"get": {
"description": "Get an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/vnd.oci.image.layer.v1.tar+gzip"
],
"summary": "Get image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
}
}
}
},
"delete": {
"description": "Delete an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
}
}
}
},
"head": {
"description": "Check an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
}
}
}
},
"/v2/{name}/manifests/{reference}": {
"get": {
"description": "Get an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/vnd.oci.image.manifest.v1+json"
],
"summary": "Get image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Update image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"type": "string"
}
},
"400": {
"description": "bad request",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
}
}
},
"head": {
"description": "Check an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/tags/list": {
"get": {
"description": "List all image tags in a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "List image tags",
"parameters": [
{
"type": "string",
"description": "test",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageTags"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"api.ImageManifest": {
"type": "object"
},
"api.ImageTags": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"api.RepositoryList": {
"type": "object",
"properties": {
"repositories": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}

View file

@ -1,474 +0,0 @@
basePath: '{{.BasePath}}'
definitions:
api.ImageManifest:
type: object
api.ImageTags:
properties:
name:
type: string
tags:
items:
type: string
type: array
type: object
api.RepositoryList:
properties:
repositories:
items:
type: string
type: array
type: object
host: '{{.Host}}'
info:
contact:
email: support@swagger.io
name: API Support
url: http://www.swagger.io/support
description: APIs for Open Container Initiative Distribution Specification
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: Open Container Initiative Distribution Specification
version: v0.1.0-dev
paths:
/v2/:
get:
consumes:
- application/json
description: Check if this API version is supported
produces:
- application/json
responses:
"200":
description: ok
schema:
type: string
summary: Check API support
/v2/_catalog:
get:
consumes:
- application/json
description: List all image repositories
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.RepositoryList'
type: object
"500":
description: internal server error
schema:
type: string
summary: List image repositories
/v2/{name}/blobs/{digest}:
delete:
consumes:
- application/json
description: Delete an image's blob/layer given a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: blob/layer digest
in: path
name: digest
required: true
type: string
produces:
- application/json
responses:
"202":
description: accepted
schema:
type: string
summary: Delete image blob/layer
get:
consumes:
- application/json
description: Get an image's blob/layer given a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: blob/layer digest
in: path
name: digest
required: true
type: string
produces:
- application/vnd.oci.image.layer.v1.tar+gzip
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.ImageManifest'
type: object
summary: Get image blob/layer
head:
consumes:
- application/json
description: Check an image's blob/layer given a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: blob/layer digest
in: path
name: digest
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
headers:
api.DistContentDigestKey:
description: OK
type: object
schema:
$ref: '#/definitions/api.ImageManifest'
type: object
summary: Check image blob/layer
/v2/{name}/blobs/uploads:
post:
consumes:
- application/json
description: Create a new image blob/layer upload
parameters:
- description: repository name
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
"202":
description: accepted
headers:
Location:
description: /v2/{name}/blobs/uploads/{uuid}
type: string
Range:
description: bytes=0-0
type: string
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Create image blob/layer upload
/v2/{name}/blobs/uploads/{uuid}:
delete:
consumes:
- application/json
description: Delete an image's blob/layer given a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: upload uuid
in: path
name: uuid
required: true
type: string
produces:
- application/json
responses:
"200":
description: ok
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Delete image blob/layer
get:
consumes:
- application/json
description: Get an image's blob/layer upload given a uuid
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: upload uuid
in: path
name: uuid
required: true
type: string
produces:
- application/json
responses:
"204":
description: no content
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Get image blob/layer upload
patch:
consumes:
- application/json
description: Resume an image's blob/layer upload given an uuid
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: upload uuid
in: path
name: uuid
required: true
type: string
produces:
- application/json
responses:
"202":
description: accepted
headers:
Location:
description: /v2/{name}/blobs/uploads/{uuid}
type: string
Range:
description: bytes=0-128
type: string
schema:
type: string
"400":
description: bad request
schema:
type: string
"404":
description: not found
schema:
type: string
"416":
description: range not satisfiable
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Resume image blob/layer upload
put:
consumes:
- application/json
description: Update and finish an image's blob/layer upload given a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: upload uuid
in: path
name: uuid
required: true
type: string
- description: blob/layer digest
in: query
name: digest
required: true
type: string
produces:
- application/json
responses:
"201":
description: created
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Update image blob/layer upload
/v2/{name}/manifests/{reference}:
delete:
consumes:
- application/json
description: Delete an image's manifest given a reference or a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: image reference or digest
in: path
name: reference
required: true
type: string
produces:
- application/json
responses:
"200":
description: ok
schema:
type: string
summary: Delete image manifest
get:
consumes:
- application/json
description: Get an image's manifest given a reference or a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: image reference or digest
in: path
name: reference
required: true
type: string
produces:
- application/vnd.oci.image.manifest.v1+json
responses:
"200":
description: OK
headers:
api.DistContentDigestKey:
description: OK
type: object
schema:
$ref: '#/definitions/api.ImageManifest'
type: object
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Get image manifest
head:
consumes:
- application/json
description: Check an image's manifest given a reference or a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: image reference or digest
in: path
name: reference
required: true
type: string
produces:
- application/json
responses:
"200":
description: ok
headers:
api.DistContentDigestKey:
description: OK
type: object
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Check image manifest
put:
consumes:
- application/json
description: Update an image's manifest given a reference or a digest
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: image reference or digest
in: path
name: reference
required: true
type: string
produces:
- application/json
responses:
"201":
description: created
schema:
type: string
"400":
description: bad request
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Update image manifest
/v2/{name}/tags/list:
get:
consumes:
- application/json
description: List all image tags in a repository
parameters:
- description: test
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.ImageTags'
type: object
"404":
description: not found
schema:
type: string
summary: List image tags
swagger: "2.0"