Documentation ¶
Index ¶
- Constants
- func GenOciManifestFromPkg(kclPkg *pkg.KclPkg) (map[string]string, error)
- func Login(hostname, username, password string, setting *settings.Settings) error
- func Logout(hostname string, setting *settings.Settings) error
- func Pull(localPath, hostName, repoName, tag string, settings *settings.Settings) error
- func Push(localPath, hostName, repoName, tag string, settings *settings.Settings) error
- func RepoIsNotExist(err error) bool
- type OciClient
- func (ociClient *OciClient) ContainsTag(tag string) (bool, *reporter.KpmEvent)
- func (ociClient *OciClient) FetchManifestIntoJsonStr(opts opt.OciFetchOptions) (string, error)
- func (ociClient *OciClient) GetReference() string
- func (ociClient *OciClient) Pull(localPath, tag string) error
- func (ociClient *OciClient) Push(localPath, tag string) *reporter.KpmEvent
- func (ociClient *OciClient) PushWithOciManifest(localPath, tag string, opts *opt.OciManifestOptions) *reporter.KpmEvent
- func (ociClient *OciClient) SetLogWriter(writer io.Writer)
- func (ociClient *OciClient) TheLatestTag() (string, error)
Constants ¶
View Source
const ( OciErrorCodeNameUnknown = "NAME_UNKNOWN" OciErrorCodeRepoNotFound = "NOT_FOUND" )
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 GenOciManifestFromPkg ¶ added in v0.3.7
GenOciManifestFromPkg will generate the oci manifest from the kcl package.
func RepoIsNotExist ¶ added in v0.8.0
RepoIsNotExist will check if the error is caused by the repo not found.
Types ¶
type OciClient ¶
type OciClient struct {
// contains filtered or unexported fields
}
OciClient is mainly responsible for interacting with OCI registry
func NewOciClient ¶
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 ¶ added in v0.3.4
ContainsTag will check if the tag exists in the repo.
func (*OciClient) FetchManifestIntoJsonStr ¶ added in v0.3.7
func (ociClient *OciClient) FetchManifestIntoJsonStr(opts opt.OciFetchOptions) (string, error)
FetchManifestByRef will fetch the manifest and return it into json string.
func (*OciClient) GetReference ¶ added in v0.3.7
func (*OciClient) PushWithOciManifest ¶ added in v0.3.7
func (ociClient *OciClient) PushWithOciManifest(localPath, tag string, opts *opt.OciManifestOptions) *reporter.KpmEvent
PushWithManifest will push the oci artifacts to oci registry from local path
func (*OciClient) SetLogWriter ¶ added in v0.3.7
func (*OciClient) TheLatestTag ¶
TheLatestTag will return the latest tag of the kcl packages.
Click to show internal directories.
Click to hide internal directories.