package
2.2.1+incompatible
Repository: https://github.com/goharbor/harbor.git
Documentation: pkg.go.dev
# Functions
BoolValue returns the value of the bool pointer or false if the pointer is nil.
GetAPIVersion gets the API version from the context.
GetArtifactInfo gets the ArtifactInfo from the context.
GetAuthMode gets the auth mode from the context.
GetCarrySession gets the "carry session" from the context indicates whether the request carries session or not.
Int64Value returns the value of the int64 pointer or 0 if the pointer is nil.
JSONCopy copy from src to dst with json marshal and unmarshal.
MatchBlobUploadURLPattern checks whether the provided path matches the blob upload URL pattern, if does, returns the repository as well.
MatchBlobURLPattern checks whether the provided path matches the blob URL pattern, if does, returns the repository and reference as well.
MatchManifestURLPattern checks whether the provided path matches the manifest URL pattern, if does, returns the repository and reference as well.
NewResponseBuffer creates a ResponseBuffer object.
NewResponseRecorder creates a response recorder.
NewWorkerPool creates a new worker pool with specified size.
NopCloseRequest ...
ParseLinks parses the link header into Links e.g.
RetryCallback set callback.
RetryInitialInterval set initial interval.
RetryMaxInterval set max interval.
RetryTimeout set timeout interval.
RetryUntil retry until f run successfully or timeout
NOTE: This function will use exponential backoff and jitter for retrying, see https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ for more information.
StringValue returns the value of the string pointer or "" if the pointer is nil.
ToBool convert interface to bool.
WithAPIVersion returns a context with APIVersion set.
WithArtifactInfo returns a context with ArtifactInfo set.
WithAuthMode returns a context with auth mode set.
WithCarrySession returns a context with "carry session" set that indicates whether the request carries session or not.
# Constants
DigestSubexp is the name for sub regex that maps to digest in the url.
ReferenceSubexp is the name for sub regex that maps to reference (tag or digest) url.
RepositorySubexp is the name for sub regex that maps to repository name in the url.
# Variables
ErrRetryTimeout timeout error for retrying.
V2BlobUploadURLRe is the regular expression for matching the request to v2 handler to upload a blob, the upload uuid currently is not put into a group.
V2BlobURLRe is the regular expression for matching request to v2 handler to retrieve head/delete a blob.
V2CatalogURLRe is the regular expression for mathing the request to v2 handler to list catalog.
V2ManifestURLRe is the regular expression for matching request v2 handler to view/delete manifest.
V2TagListURLRe is the regular expression for matching request to v2 handler to list tags.
# Structs
ArtifactInfo wraps the artifact info extracted from the request to "/v2/".
Link defines the model that describes the HTTP link header.
ResponseBuffer is a wrapper for the http.ResponseWriter to buffer the response data.
ResponseRecorder is a wrapper for the http.ResponseWriter to record the response status code.
RetryOptions options for the retry functions.
WorkerPool controls the concurrency limit of task/process.
# Type aliases
Authorizer authorizes the request.
Links is a link object array.
RetryOption ...