Documentation
¶
Index ¶
- func AppendGitMetadata(repoPath string, annotations map[string]string)
- func BuildArtifact(dstFile, contentPath string, ignorePaths []string) error
- func ListArtifactTags(ociURL string, withDigest bool, opts []crane.Option) ([]apiv1.ArtifactReference, error)
- func ListModuleVersions(ociURL string, withDigest bool, opts []crane.Option) ([]apiv1.ModuleReference, error)
- func Options(ctx context.Context, credentials string) []crane.Option
- func ParseAnnotations(args []string) (map[string]string, error)
- func ParseArtifactURL(ociURL string) (string, error)
- func ParseDigest(ociURL string) (name.Digest, error)
- func ParseRepositoryURL(ociURL string) (string, error)
- func PullArtifact(ociURL, dstPath, contentType string, opts []crane.Option) error
- func PullModule(ociURL, dstPath, cacheDir string, opts []crane.Option) (*apiv1.ModuleReference, error)
- func PushArtifact(ociURL, contentPath string, ignorePaths []string, contentType string, ...) (string, error)
- func PushModule(ociURL, contentPath string, ignorePaths []string, ...) (string, error)
- func SignArtifact(log logr.Logger, provider string, ociURL string, keyRef string) error
- func SignCosign(log logr.Logger, imageRef string, keyRef string) error
- func TagArtifact(ociURL, tag string, opts []crane.Option) error
- func VerifyArtifact(log logr.Logger, provider string, ociURL string, keyRef string, ...) error
- func VerifyCosign(log logr.Logger, imageRef string, keyRef string, certIdentity string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendGitMetadata ¶
AppendGitMetadata sets the OpenContainers source, revision and created annotations from the Git metadata. If the git binary or the .git dir are missing, the created date is set to the current UTC date, and the source and revision are not appended.
func BuildArtifact ¶
BuildArtifact creates the destination file and packages the given content (excluding symlinks) using tar+gzip compression.
func ListArtifactTags ¶
func ListArtifactTags(ociURL string, withDigest bool, opts []crane.Option) ([]apiv1.ArtifactReference, error)
ListArtifactTags performs the following operations: - fetches the digest of the latest tag (if it exists) - lists all the tags from the artifact repository - fetches the digest of each tag (if configured to do so) - returns an array of ArtifactReference objects
func ListModuleVersions ¶
func ListModuleVersions(ociURL string, withDigest bool, opts []crane.Option) ([]apiv1.ModuleReference, error)
ListModuleVersions performs the following operations: - lists all the tags from to this module repository - filters and orders the tags based on semver - fetches the digest of the latest version - fetches the digest of each version (if configured to do so) - returns an array of ModuleReference objects
func ParseAnnotations ¶
ParseAnnotations parses the command args in the format key=value and returns the OpenContainers annotations.
func ParseArtifactURL ¶
ParseArtifactURL validates the OpenContainers URL and returns the address of the artifact.
func ParseDigest ¶
ParseDigest extracts the digest from the OpenContainers URL.
func ParseRepositoryURL ¶
ParseRepositoryURL validates the OpenContainers URL and returns the address of the artifact repository.
func PullArtifact ¶
PullArtifact performs the following operations: - fetches the manifest of the remote artifact - verifies that artifact config matches Timoni's media type - download all the compressed layer matching Timoni's media type - extracts the layers contents to the destination directory
func PullModule ¶
func PullModule(ociURL, dstPath, cacheDir string, opts []crane.Option) (*apiv1.ModuleReference, error)
PullModule performs the following operations: - determines the artifact digest corresponding to the module version - fetches the manifest of the remote artifact - verifies that artifact config matches Timoni's media type - downloads all the compressed layer matching Timoni's media type (if not cached) - stores the compressed layers in the local cache (if caching is enabled) - extracts the module contents to the destination directory
func PushArtifact ¶
func PushArtifact(ociURL, contentPath string, ignorePaths []string, contentType string, annotations map[string]string, opts []crane.Option) (string, error)
PushArtifact performs the following operations: - packages the content in a tar+gzip layer - annotates the layer with the given content type - adds the layer to an OpenContainers artifact - annotates the artifact with the given annotations - uploads the artifact in the container registry - returns the digest URL of the upstream artifact
func PushModule ¶
func PushModule(ociURL, contentPath string, ignorePaths []string, annotations map[string]string, opts []crane.Option) (string, error)
PushModule performs the following operations: - packages the Timoni module's vendored schemas in a dedicated tar+gzip layer - packages the Timoni module's templates, values, etc in a 2nd tar+gzip layer - adds both layers to an OpenContainers artifact - annotates the artifact with the given annotations - uploads the module's artifact in the container registry - returns the digest URL of the upstream artifact
func SignArtifact ¶
SignArtifact signs an OpenContainers artifact using the specified provider.
func SignCosign ¶
SignCosign signs an image (`imageRef`) using a cosign private key (`keyRef`)
func TagArtifact ¶
TagArtifact adds the tag to the remote OpenContainers artifact.
func VerifyArtifact ¶
func VerifyArtifact(log logr.Logger, provider string, ociURL string, keyRef string, certIdentity string, certIdentityRegexp string, certOidcIssuer string, certOidcIssuerRegexp string) error
VerifyArtifact verifies an OpenContainers artifact using the specified provider.
func VerifyCosign ¶
func VerifyCosign(log logr.Logger, imageRef string, keyRef string, certIdentity string, certIdentityRegexp string, certOidcIssuer string, certOidcIssuerRegexp string) error
VerifyCosign verifies an image (`rawRef`) with a cosign public key (`keyRef`) Either --cosign-certificate-identity or --cosign-certificate-identity-regexp and either --cosign-certificate-oidc-issuer or --cosign-certificate-oidc-issuer-regexp must be set for keyless flows.
Types ¶
This section is empty.