Documentation
¶
Index ¶
- func ParseArtifactURL(ociURL string) (string, error)
- func ParseRepositoryURL(ociURL string) (string, error)
- type Client
- func (c *Client) Build(artifactPath, sourceDir string, ignorePaths []string) (err error)
- func (c *Client) Delete(ctx context.Context, url string) error
- func (c *Client) List(ctx context.Context, url string, opts ListOptions) ([]Metadata, error)
- func (c *Client) Pull(ctx context.Context, url, outDir string) (*Metadata, error)
- func (c *Client) Push(ctx context.Context, url, sourceDir string, meta Metadata, ...) (string, error)
- func (c *Client) Tag(ctx context.Context, url, tag string) (string, error)
- type ListOptions
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseArtifactURL ¶
ParseArtifactURL validates the OCI URL and returns the address of the artifact.
func ParseRepositoryURL ¶
ParseRepositoryURL validates the OCI URL and returns the address of the artifact repository.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds the options for accessing remote OCI registries.
func NewLocalClient ¶
func NewLocalClient() *Client
NewLocalClient returns an OCI client configured with the Docker keychain helpers.
func (*Client) Build ¶
Build archives the given directory as a tarball to the given local path. While archiving, any environment specific data (for example, the user and group name) is stripped from file headers.
func (*Client) Delete ¶ added in v0.6.0
Delete deletes a particular image from an OCI repository If the url has no tag, the latest image is deleted
func (*Client) Pull ¶
Pull downloads an artifact from an OCI repository and extracts the content to the given directory.
type ListOptions ¶ added in v0.5.0
type ListOptions struct {
// SemverFilter contains semver for filtering tags.
SemverFilter string
// RegexFilter contains a regex that tags will be filtered by.
RegexFilter string
}
ListOptions contains options for listing tags from an OCI repository.
type Metadata ¶
type Metadata struct {
Created string `json:"created"`
Source string `json:"source_url"`
Revision string `json:"source_revision"`
Digest string `json:"digest"`
URL string `json:"url"`
}
Metadata holds the upstream information about on artifact's source. https://github.com/opencontainers/image-spec/blob/main/annotations.md
func MetadataFromAnnotations ¶
MetadataFromAnnotations parses the OpenContainers annotations and returns a Metadata object.
func (*Metadata) ToAnnotations ¶
ToAnnotations returns the OpenContainers annotations map.