oci

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_OCI_ARTIFACT_TYPE = "application/vnd.oci.image.layer.v1.tar"
View Source
const OCI_SCHEME = "oci"

Variables

This section is empty.

Functions

func Login

func Login(hostname, username, password string, setting *settings.Settings) error

Login will login 'hostname' by 'username' and 'password'.

func Logout

func Logout(hostname string, setting *settings.Settings) error

Logout will logout from registry.

func Pull

func Pull(localPath, hostName, repoName, tag string) *reporter.KpmEvent

Pull will pull the oci artifacts from oci registry to local path.

func Push

func Push(localPath, hostName, repoName, tag string, settings *settings.Settings) *reporter.KpmEvent

Push will push the oci artifacts to oci registry from local path

Types

type OciClient

type OciClient struct {
	// contains filtered or unexported fields
}

OciClient is mainly responsible for interacting with OCI registry

func NewOciClient

func NewOciClient(regName, repoName string) (*OciClient, *reporter.KpmEvent)

NewOciClient will new an OciClient. regName is the registry. e.g. ghcr.io or docker.io. repoName is the repo name on registry.

func (*OciClient) ContainsTag

func (ociClient *OciClient) ContainsTag(tag string) (bool, *reporter.KpmEvent)

ContainsTag will check if the tag exists in the repo.

func (*OciClient) Pull

func (ociClient *OciClient) Pull(localPath, tag string) *reporter.KpmEvent

Pull will pull the oci artifacts from oci registry to local path.

func (*OciClient) Push

func (ociClient *OciClient) Push(localPath, tag string) *reporter.KpmEvent

Push will push the oci artifacts to oci registry from local path

func (*OciClient) TheLatestTag

func (ociClient *OciClient) TheLatestTag() (string, *reporter.KpmEvent)

TheLatestTag will return the latest tag of the kcl packages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL