mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 11:37:56 +08:00
da426850e7
* chore: Update golangci-lint Signed-off-by: Lars Francke <git@lars-francke.de> * chore: fix all golangci-lint issues - Remove deprecated `// +build` tags - Fix godoclint, modernize, wsl_v5, govet, lll, gci, noctx issues - Update linter configuration - Modernize code to use Go 1.22+ features (for range N, slices.Contains, etc.) - Update make check lint the privileged tests Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com> --------- Signed-off-by: Lars Francke <git@lars-francke.de> Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com> Co-authored-by: Lars Francke <git@lars-francke.de>
42 lines
1.8 KiB
Go
42 lines
1.8 KiB
Go
package constants
|
|
|
|
import "time"
|
|
|
|
const (
|
|
RoutePrefix = "/v2"
|
|
Blobs = "blobs"
|
|
Uploads = "uploads"
|
|
DistAPIVersion = "Docker-Distribution-API-Version"
|
|
DistContentDigestKey = "Docker-Content-Digest"
|
|
SubjectDigestKey = "OCI-Subject"
|
|
BlobUploadUUID = "Blob-Upload-UUID"
|
|
DefaultMediaType = "application/json"
|
|
BinaryMediaType = "application/octet-stream"
|
|
DefaultMetricsExtensionRoute = "/metrics"
|
|
AppNamespacePath = "/zot"
|
|
CallbackBasePath = AppNamespacePath + "/auth/callback"
|
|
LoginPath = AppNamespacePath + "/auth/login"
|
|
LogoutPath = AppNamespacePath + "/auth/logout"
|
|
APIKeyPath = AppNamespacePath + "/auth/apikey"
|
|
SessionClientHeaderName = "X-ZOT-API-CLIENT"
|
|
SessionClientHeaderValue = "zot-ui"
|
|
APIKeysPrefix = "zak_"
|
|
CallbackUIQueryParam = "callback_ui"
|
|
APIKeyTimeFormat = time.RFC3339
|
|
// CreatePermission is an authz permission for create actions.
|
|
CreatePermission = "create"
|
|
// ReadPermission is an authz permission for read actions.
|
|
ReadPermission = "read"
|
|
// UpdatePermission is an authz permission for update actions.
|
|
UpdatePermission = "update"
|
|
// DeletePermission is an authz permission for delete actions.
|
|
DeletePermission = "delete"
|
|
// DetectManifestCollisionPermission is a behaviour action.
|
|
DetectManifestCollisionPermission = "detectManifestCollision"
|
|
// ScaleOutHopCountHeader is the zot scale-out hop count header.
|
|
ScaleOutHopCountHeader = "X-Zot-Cluster-Hop-Count"
|
|
// RepositoryLogKey is a log string key.
|
|
// These can be used together with the logger to add context to a log message.
|
|
RepositoryLogKey = "repository"
|
|
)
|