2022-03-24 07:25:14 -05:00
|
|
|
package constants
|
|
|
|
|
2023-08-29 11:38:38 -05:00
|
|
|
import "time"
|
|
|
|
|
2022-03-24 07:25:14 -05:00
|
|
|
const (
|
2022-02-24 15:31:36 -05:00
|
|
|
RoutePrefix = "/v2"
|
2022-06-02 15:54:42 -05:00
|
|
|
Blobs = "blobs"
|
|
|
|
Uploads = "uploads"
|
2022-02-24 15:31:36 -05:00
|
|
|
DistAPIVersion = "Docker-Distribution-API-Version"
|
|
|
|
DistContentDigestKey = "Docker-Content-Digest"
|
2023-05-12 11:32:01 -05:00
|
|
|
SubjectDigestKey = "OCI-Subject"
|
2022-02-24 15:31:36 -05:00
|
|
|
BlobUploadUUID = "Blob-Upload-UUID"
|
|
|
|
DefaultMediaType = "application/json"
|
|
|
|
BinaryMediaType = "application/octet-stream"
|
|
|
|
DefaultMetricsExtensionRoute = "/metrics"
|
2023-10-20 07:30:56 -05:00
|
|
|
AppNamespacePath = "/zot"
|
|
|
|
CallbackBasePath = AppNamespacePath + "/auth/callback"
|
|
|
|
LoginPath = AppNamespacePath + "/auth/login"
|
|
|
|
LogoutPath = AppNamespacePath + "/auth/logout"
|
|
|
|
APIKeyPath = AppNamespacePath + "/auth/apikey"
|
2023-07-07 11:27:10 -05:00
|
|
|
SessionClientHeaderName = "X-ZOT-API-CLIENT"
|
|
|
|
SessionClientHeaderValue = "zot-ui"
|
|
|
|
APIKeysPrefix = "zak_"
|
|
|
|
CallbackUIQueryParam = "callback_ui"
|
2023-08-29 11:38:38 -05:00
|
|
|
APIKeyTimeFormat = time.RFC3339
|
2023-09-01 13:13:53 -05:00
|
|
|
// authz permissions.
|
|
|
|
// method actions.
|
|
|
|
CreatePermission = "create"
|
|
|
|
ReadPermission = "read"
|
|
|
|
UpdatePermission = "update"
|
|
|
|
DeletePermission = "delete"
|
|
|
|
// behaviour actions.
|
|
|
|
DetectManifestCollisionPermission = "detectManifestCollision"
|
2024-05-20 11:05:21 -05:00
|
|
|
// zot scale-out hop count header.
|
|
|
|
ScaleOutHopCountHeader = "X-Zot-Cluster-Hop-Count"
|
|
|
|
// log string keys.
|
|
|
|
// these can be used together with the logger to add context to a log message.
|
|
|
|
RepositoryLogKey = "repository"
|
2022-03-24 07:25:14 -05:00
|
|
|
)
|