Documentation ¶
Index ¶
- Constants
- type ManifestListV2
- type ManifestV1
- type ManifestV2
- type PackageMetadata
- type Service
- func (s *Service) CheckBlobExistenceHandler(c *gin.Context)
- func (s *Service) CheckMetadataHandler(c *gin.Context)
- func (s *Service) ChunkUploadHandler(c *gin.Context)
- func (s *Service) DownloadHandler(c *gin.Context)
- func (s *Service) GetAssetsByManifest(metadata *PackageMetadata) (assets []models.Asset, err error)
- func (s *Service) GetUploadProgressHandler(c *gin.Context)
- func (s *Service) ManifestUploadHandler(c *gin.Context)
- func (s *Service) MetadataHandler(c *gin.Context)
- func (s *Service) PkgInfoFromRequest(c *gin.Context) (pkgName string, filename string)
- func (s *Service) SetAuthHeaderAndAbort(c *gin.Context)
- func (s *Service) StartLayerUploadHandler(c *gin.Context)
- func (s *Service) UploadHandler(c *gin.Context)
Constants ¶
View Source
const ( ManifestV1ContentType = "application/vnd.docker.distribution.manifest.v1+json" ManifestV2ContentType = "application/vnd.docker.distribution.manifest.v2+json" ManifestListV2ContentType = "application/vnd.docker.distribution.manifest.list.v2+json" ManifestOCIV1ContentType = "application/vnd.oci.image.manifest.v1+json" ManifestOCIIndexV1ContentType = "application/vnd.oci.image.index.v1+json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManifestListV2 ¶
type ManifestListV2 struct { SchemaVersion int `json:"schemaVersion"` MediaType string `json:"mediaType"` // application/vnd.docker.distribution.manifest.list.v2+json ArtifactType string `json:"artifactType,omitempty"` Manifests []struct { MediaType string `json:"mediaType"` // application/vnd.docker.distribution.manifest.v2+json Size int `json:"size"` Digest string `json:"digest"` Platform struct { Architecture string `json:"architecture,omitempty"` Os string `json:"os,omitempty"` OsVersion string `json:"os.version,omitempty"` OsFeatures []string `json:"os.features,omitempty"` Variant string `json:"variant,omitempty"` Features []string `json:"features,omitempty"` } `json:"platform,omitempty"` } `json:"manifests,omitempty"` Subject struct { MediaType string `json:"mediaType,omitempty"` Size int `json:"size,omitempty"` Digest string `json:"digest,omitempty"` Urls []string `json:"urls,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Data string `json:"data,omitempty"` ArtifactType string `json:"artifactType,omitempty"` } `json:"subject,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
type ManifestV1 ¶
type ManifestV1 struct { Name string `json:"name,omitempty"` Tag string `json:"tag,omitempty"` FsLayers []struct { BlobSum string `json:"blobSum,omitempty"` } `json:"fsLayers,omitempty"` History []struct { V1Compatibility string `json:"v1Compatibility,omitempty"` } `json:"history,omitempty"` SchemaVersion int `json:"schemaVersion,omitempty"` Signatures []struct { Header struct { Jwk struct { Crv string `json:"crv,omitempty"` Kid string `json:"kid,omitempty"` Kty string `json:"kty,omitempty"` X string `json:"x,omitempty"` Y string `json:"y,omitempty"` } `json:"jwk"` Alg string `json:"alg,omitempty"` } `json:"header,omitempty"` Signature string `json:"signature,omitempty"` Protected string `json:"protected,omitempty"` } `json:"signatures,omitempty"` }
type ManifestV2 ¶
type ManifestV2 struct { SchemaVersion int `json:"schemaVersion,omitempty"` MediaType string `json:"mediaType,omitempty"` Config struct { MediaType string `json:"mediaType,omitempty"` Size int `json:"size,omitempty"` Digest string `json:"digest,omitempty"` } `json:"config"` Layers []struct { MediaType string `json:"mediaType,omitempty"` Size int `json:"size,omitempty"` Digest string `json:"digest,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` } `json:"layers"` }
type PackageMetadata ¶
type Service ¶
type Service struct {
services.BasePackageService
}
func NewService ¶
func NewService(storage storage.BaseStorageBackend) *Service
func (*Service) CheckBlobExistenceHandler ¶
func (*Service) CheckMetadataHandler ¶
func (*Service) ChunkUploadHandler ¶
func (*Service) DownloadHandler ¶
func (*Service) GetAssetsByManifest ¶
func (s *Service) GetAssetsByManifest(metadata *PackageMetadata) (assets []models.Asset, err error)
func (*Service) GetUploadProgressHandler ¶
func (*Service) ManifestUploadHandler ¶
func (*Service) MetadataHandler ¶
func (*Service) PkgInfoFromRequest ¶
func (*Service) SetAuthHeaderAndAbort ¶
func (*Service) StartLayerUploadHandler ¶
StartLayerUploadHandler POST /v2/<name>/blobs/uploads/
func (*Service) UploadHandler ¶
Click to show internal directories.
Click to hide internal directories.