Documentation ¶
Index ¶
Constants ¶
const OCI_SEPARATOR = ":"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOptions ¶
type AddOptions struct { LocalPath string RegistryOpts RegistryOptions }
func (*AddOptions) Validate ¶
func (opts *AddOptions) Validate() error
type GitOptions ¶
func (*GitOptions) Validate ¶
func (opts *GitOptions) Validate() error
type InitOptions ¶
Input options of 'kpm init'.
func (*InitOptions) Validate ¶
func (opts *InitOptions) Validate() error
type OciOptions ¶
OciOptions for download oci packages. kpm will download packages from oci registry by '{Reg}/{Repo}/{PkgName}:{Tag}'.
func ParseOciOptionFromOciUrl ¶
func ParseOciOptionFromOciUrl(url, tag string) (*OciOptions, *reporter.KpmEvent)
ParseOciOptionFromOciUrl will parse oci url into an 'OciOptions'. If the 'tag' is empty, ParseOciOptionFromOciUrl will take 'latest' as the default tag.
func ParseOciOptionFromString ¶
func ParseOciOptionFromString(oci string, tag string) (*OciOptions, error)
ParseOciOptionFromString will parser '<repo_name>:<repo_tag>' into an 'OciOptions' with an OCI registry. the default OCI registry is 'docker.io'. if the 'ociUrl' is only '<repo_name>', ParseOciOptionFromString will take 'latest' as the default tag.
func ParseOciRef ¶
func ParseOciRef(ociRef string) (*OciOptions, error)
ParseOciRef will parse 'repoName:repoTag' into OciOptions, with default registry host 'docker.io'.
func ParseOciUrl ¶
func ParseOciUrl(ociUrl string) (*OciOptions, *reporter.KpmEvent)
ParseOciUrl will parse 'oci://hostName/repoName:repoTag' into OciOptions without tag.
func (*OciOptions) AddStoragePathSuffix ¶
func (oci *OciOptions) AddStoragePathSuffix(pathPrefix string) string
AddStoragePathSuffix will take 'Registry/Repo/Tag' as a path suffix. e.g. Take '/usr/test' as input, and oci options is
OciOptions { Reg: 'docker.io', Repo: 'test/testRepo', Tag: 'v0.0.1' }
You will get a path '/usr/test/docker.io/test/testRepo/v0.0.1'.
func (*OciOptions) Validate ¶
func (opts *OciOptions) Validate() error
type RegistryOptions ¶
type RegistryOptions struct { Git *GitOptions Oci *OciOptions }