Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file expect in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
- Constants
- func NewPackageFromManifest(manifest *Manifest, opts ...ManifestOption) (pack.Package, error)
- func NewPackageFromManifestWithVersion(manifest *Manifest, version string, opts ...ManifestOption) (pack.Package, error)
- func NewPackageManager(ctx context.Context, opts ...any) (packmanager.PackageManager, error)
- func RegisterFlags()
- func RegisterPackageManager() func(u *packmanager.UmbrellaManager) error
- type DirectoryProvider
- func (dp DirectoryProvider) DeleteManifest(context.Context) error
- func (dp DirectoryProvider) Manifests() ([]*Manifest, error)
- func (dp DirectoryProvider) MarshalJSON() ([]byte, error)
- func (dp DirectoryProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, ...) error
- func (dp DirectoryProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, ...) error
- func (dp DirectoryProvider) String() string
- type GitHubProvider
- func (ghp GitHubProvider) DeleteManifest(context.Context) error
- func (ghp GitHubProvider) Manifests() ([]*Manifest, error)
- func (ghp GitHubProvider) MarshalJSON() ([]byte, error)
- func (ghp GitHubProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, ...) error
- func (ghp GitHubProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, ...) error
- func (ghp GitHubProvider) String() string
- type GitProvider
- func (gp *GitProvider) DeleteManifest(context.Context) error
- func (gp *GitProvider) Manifests() ([]*Manifest, error)
- func (gp *GitProvider) MarshalJSON() ([]byte, error)
- func (gp *GitProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, ...) error
- func (gp *GitProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, ...) error
- func (gp *GitProvider) String() string
- type Manifest
- func FindManifestsFromSource(ctx context.Context, source string, mopts ...ManifestOption) ([]*Manifest, error)
- func NewManifestFromBytes(ctx context.Context, raw []byte, opts ...ManifestOption) (*Manifest, error)
- func NewManifestFromFile(ctx context.Context, path string, mopts ...ManifestOption) (*Manifest, error)
- func NewManifestFromURL(ctx context.Context, path string, opts ...ManifestOption) (*Manifest, error)
- type ManifestChannel
- type ManifestIndex
- type ManifestIndexProvider
- func (mip *ManifestIndexProvider) DeleteManifest(context.Context) error
- func (mip *ManifestIndexProvider) Manifests() ([]*Manifest, error)
- func (mip *ManifestIndexProvider) MarshalJSON() ([]byte, error)
- func (mip *ManifestIndexProvider) PullChannel(context.Context, *Manifest, *ManifestChannel, ...pack.PullOption) error
- func (mip *ManifestIndexProvider) PullVersion(context.Context, *Manifest, *ManifestVersion, ...pack.PullOption) error
- func (mip *ManifestIndexProvider) String() string
- type ManifestManager
- func (m *ManifestManager) AddSource(ctx context.Context, source string) error
- func (m *ManifestManager) Catalog(ctx context.Context, qopts ...packmanager.QueryOption) ([]pack.Package, error)
- func (m *ManifestManager) Delete(ctx context.Context, qopts ...packmanager.QueryOption) error
- func (m *ManifestManager) Format() pack.PackageFormat
- func (m *ManifestManager) From(sub pack.PackageFormat) (packmanager.PackageManager, error)
- func (m *ManifestManager) Index(ctx context.Context) (*ManifestIndex, error)
- func (m *ManifestManager) IsCompatible(ctx context.Context, source string, qopts ...packmanager.QueryOption) (packmanager.PackageManager, bool, error)
- func (m *ManifestManager) LocalManifestIndex(ctx context.Context) string
- func (m *ManifestManager) LocalManifestsDir(ctx context.Context) string
- func (m *ManifestManager) Pack(ctx context.Context, c component.Component, opts ...packmanager.PackOption) ([]pack.Package, error)
- func (m *ManifestManager) RemoveSource(ctx context.Context, source string) error
- func (m *ManifestManager) SetSources(_ context.Context, sources ...string) error
- func (m *ManifestManager) Unpack(ctx context.Context, p pack.Package, opts ...packmanager.UnpackOption) ([]component.Component, error)
- func (m *ManifestManager) Update(ctx context.Context) error
- type ManifestManagerOption
- func WithManagerAuths(auths map[string]config.AuthConfig) ManifestManagerOption
- func WithManagerCacheDir(dir string) ManifestManagerOption
- func WithManagerDefaultChannelName(name string) ManifestManagerOption
- func WithManagerLocalManifestDir(dir string) ManifestManagerOption
- func WithManagerManifests(manifests ...string) ManifestManagerOption
- type ManifestOption
- type ManifestOptions
- type ManifestProvider
- func (mp *ManifestProvider) DeleteManifest(ctx context.Context) error
- func (mp *ManifestProvider) Manifests() ([]*Manifest, error)
- func (mp *ManifestProvider) MarshalJSON() ([]byte, error)
- func (mp *ManifestProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, ...) error
- func (mp *ManifestProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, ...) error
- func (mp *ManifestProvider) String() string
- type ManifestVersion
- type ManifestVersionType
- type Provider
- func NewDirectoryProvider(ctx context.Context, path string, opts ...ManifestOption) (Provider, error)
- func NewGitHubProvider(ctx context.Context, path string, opts ...ManifestOption) (Provider, error)
- func NewGitProvider(ctx context.Context, path string, opts ...ManifestOption) (Provider, error)
- func NewManifestIndexProvider(ctx context.Context, path string, mopts ...ManifestOption) (Provider, error)
- func NewManifestProvider(ctx context.Context, path string, mopts ...ManifestOption) (Provider, error)
- func NewProvider(ctx context.Context, path string, mopts ...ManifestOption) (Provider, error)
- func NewProviderFromString(ctx context.Context, provider, path string, entity any, ...) (Provider, error)
- func NewTarballProvider(ctx context.Context, path string, opts ...ManifestOption) (Provider, error)
- type TarballProvider
- func (provider TarballProvider) DeleteManifest(context.Context) error
- func (provider TarballProvider) Manifests() ([]*Manifest, error)
- func (provider TarballProvider) MarshalJSON() ([]byte, error)
- func (provider TarballProvider) PullChannel(ctx context.Context, manifest *Manifest, _ *ManifestChannel, ...) error
- func (provider TarballProvider) PullVersion(ctx context.Context, manifest *Manifest, _ *ManifestVersion, ...) error
- func (provider TarballProvider) String() string
Constants ¶
const DefaultChannelName = "stable"
DefaultChannelName is the default channel name to use when multiple channels are specified.
const ManifestFormat pack.PackageFormat = "manifest"
Variables ¶
This section is empty.
Functions ¶
func NewPackageFromManifest ¶
func NewPackageFromManifest(manifest *Manifest, opts ...ManifestOption) (pack.Package, error)
NewPackageFromManifest generates a manifest implementation of the pack.Package construct based on the input Manifest using its default channel
func NewPackageFromManifestWithVersion ¶ added in v0.4.0
func NewPackageFromManifestWithVersion(manifest *Manifest, version string, opts ...ManifestOption) (pack.Package, error)
NewPackageFromManifestWithVersion generates a new package based on an input manifest which in itself may contain various versions and channels. With the provided version as a positional parameter, the manifest can be reduced to represent a specific version.
func NewPackageManager ¶
func NewPackageManager(ctx context.Context, opts ...any) (packmanager.PackageManager, error)
NewPackageManager satisfies the `packmanager.NewPackageManager` interface and returns a new `packmanager.PackageManager` for the manifest manager.
func RegisterFlags ¶ added in v0.6.7
func RegisterFlags()
func RegisterPackageManager ¶ added in v0.6.7
func RegisterPackageManager() func(u *packmanager.UmbrellaManager) error
Types ¶
type DirectoryProvider ¶
type DirectoryProvider struct {
// contains filtered or unexported fields
}
func (DirectoryProvider) DeleteManifest ¶ added in v0.7.0
func (dp DirectoryProvider) DeleteManifest(context.Context) error
func (DirectoryProvider) Manifests ¶
func (dp DirectoryProvider) Manifests() ([]*Manifest, error)
func (DirectoryProvider) MarshalJSON ¶ added in v0.7.2
func (dp DirectoryProvider) MarshalJSON() ([]byte, error)
func (DirectoryProvider) PullChannel ¶
func (dp DirectoryProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, opts ...pack.PullOption) error
func (DirectoryProvider) PullVersion ¶
func (dp DirectoryProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, opts ...pack.PullOption) error
func (DirectoryProvider) String ¶
func (dp DirectoryProvider) String() string
type GitHubProvider ¶
type GitHubProvider struct {
// contains filtered or unexported fields
}
func (GitHubProvider) DeleteManifest ¶ added in v0.7.0
func (ghp GitHubProvider) DeleteManifest(context.Context) error
func (GitHubProvider) Manifests ¶
func (ghp GitHubProvider) Manifests() ([]*Manifest, error)
func (GitHubProvider) MarshalJSON ¶ added in v0.7.2
func (ghp GitHubProvider) MarshalJSON() ([]byte, error)
func (GitHubProvider) PullChannel ¶
func (ghp GitHubProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, popts ...pack.PullOption) error
func (GitHubProvider) PullVersion ¶
func (ghp GitHubProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, popts ...pack.PullOption) error
func (GitHubProvider) String ¶
func (ghp GitHubProvider) String() string
type GitProvider ¶
type GitProvider struct {
// contains filtered or unexported fields
}
func (*GitProvider) DeleteManifest ¶ added in v0.7.0
func (gp *GitProvider) DeleteManifest(context.Context) error
func (*GitProvider) Manifests ¶
func (gp *GitProvider) Manifests() ([]*Manifest, error)
func (*GitProvider) MarshalJSON ¶ added in v0.7.2
func (gp *GitProvider) MarshalJSON() ([]byte, error)
func (*GitProvider) PullChannel ¶
func (gp *GitProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, popts ...pack.PullOption) error
func (*GitProvider) PullVersion ¶
func (gp *GitProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, popts ...pack.PullOption) error
func (*GitProvider) String ¶
func (gp *GitProvider) String() string
type Manifest ¶
type Manifest struct { // Name of the entity which this manifest represents Name string `yaml:"name" json:"name"` // Type of entity which this manifest represetns Type unikraft.ComponentType `yaml:"type" json:"type"` // Manifest is used to point to remote manifest, allowing the manifest itself // to be retrieved by indirection. Manifest is XOR with Versions and should // be back-propagated. Manifest string `yaml:"manifest,omitempty" json:"manifest,omitempty"` // Description of what this manifest represents Description string `yaml:"description,omitempty" json:"description,omitempty"` // Origin represents where (and therefore how) this manifest was populated Origin string `yaml:"origin,omitempty" json:"origin,omitempty"` // Provider is the string name of the underlying implementation providing the // contents of this manifest Provider Provider `yaml:"provider,omitempty" json:"provider,omitempty"` // Channels provides multiple ways to retrieve versions. Classically this is // a separation between "staging" and "stable" Channels []ManifestChannel `yaml:"channels,omitempty" json:"channels,omitempty"` // Versions Versions []ManifestVersion `yaml:"versions,omitempty" json:"versions,omitempty"` // contains filtered or unexported fields }
func FindManifestsFromSource ¶
func FindManifestsFromSource(ctx context.Context, source string, mopts ...ManifestOption) ([]*Manifest, error)
FindManifestsFromSource is a recursive method which follows a given source and attempts to instantiate a Provider which matches the given source. If the source is recognised by a provider, it is traversed to return all the known Manifests.
func NewManifestFromBytes ¶
func NewManifestFromBytes(ctx context.Context, raw []byte, opts ...ManifestOption) (*Manifest, error)
NewManifestFromBytes parses a byte array of a YAML representing a manifest
func NewManifestFromFile ¶
func NewManifestFromFile(ctx context.Context, path string, mopts ...ManifestOption) (*Manifest, error)
NewManifestFromFile reads in a manifest file from a given path
func NewManifestFromURL ¶
func NewManifestFromURL(ctx context.Context, path string, opts ...ManifestOption) (*Manifest, error)
NewManifestFromURL retrieves a provided path as a Manifest from a remote location over HTTP
func (Manifest) DefaultChannel ¶
func (m Manifest) DefaultChannel() (*ManifestChannel, error)
DefaultChannel returns the default channel of the Manifest
type ManifestChannel ¶
type ManifestIndex ¶
type ManifestIndex struct { Name string `yaml:"name,omitempty"` LastUpdated time.Time `yaml:"last_updated"` Manifests []*Manifest `yaml:"manifests"` Origin string `yaml:"-"` }
func NewManifestIndexFromBytes ¶
func NewManifestIndexFromBytes(raw []byte, opts ...ManifestOption) (*ManifestIndex, error)
NewManifestIndexFromBytes parses a byte array of a YAML representing a manifest index
func NewManifestIndexFromFile ¶
func NewManifestIndexFromFile(path string, opts ...ManifestOption) (*ManifestIndex, error)
func NewManifestIndexFromURL ¶
func NewManifestIndexFromURL(ctx context.Context, path string, opts ...ManifestOption) (*ManifestIndex, error)
NewManifestFromURL retrieves a provided path as a ManifestIndex from a remote location over HTTP
func (*ManifestIndex) SaveTo ¶
func (mi *ManifestIndex) SaveTo(path string) error
type ManifestIndexProvider ¶
type ManifestIndexProvider struct {
// contains filtered or unexported fields
}
func (*ManifestIndexProvider) DeleteManifest ¶ added in v0.7.0
func (mip *ManifestIndexProvider) DeleteManifest(context.Context) error
func (*ManifestIndexProvider) Manifests ¶
func (mip *ManifestIndexProvider) Manifests() ([]*Manifest, error)
func (*ManifestIndexProvider) MarshalJSON ¶ added in v0.7.2
func (mip *ManifestIndexProvider) MarshalJSON() ([]byte, error)
func (*ManifestIndexProvider) PullChannel ¶
func (mip *ManifestIndexProvider) PullChannel(context.Context, *Manifest, *ManifestChannel, ...pack.PullOption) error
func (*ManifestIndexProvider) PullVersion ¶
func (mip *ManifestIndexProvider) PullVersion(context.Context, *Manifest, *ManifestVersion, ...pack.PullOption) error
func (*ManifestIndexProvider) String ¶
func (mip *ManifestIndexProvider) String() string
type ManifestManager ¶
type ManifestManager struct {
// contains filtered or unexported fields
}
func NewManifestManager ¶ added in v0.4.0
func NewManifestManager(ctx context.Context, opts ...ManifestManagerOption) (*ManifestManager, error)
NewManifestManager instantiates a new package manager which manipulates Unikraft manifests.
func (*ManifestManager) AddSource ¶
func (m *ManifestManager) AddSource(ctx context.Context, source string) error
func (*ManifestManager) Catalog ¶
func (m *ManifestManager) Catalog(ctx context.Context, qopts ...packmanager.QueryOption) ([]pack.Package, error)
func (*ManifestManager) Delete ¶
func (m *ManifestManager) Delete(ctx context.Context, qopts ...packmanager.QueryOption) error
Delete implements packmanager.PackageManager.
func (*ManifestManager) Format ¶
func (m *ManifestManager) Format() pack.PackageFormat
func (*ManifestManager) From ¶
func (m *ManifestManager) From(sub pack.PackageFormat) (packmanager.PackageManager, error)
func (*ManifestManager) Index ¶
func (m *ManifestManager) Index(ctx context.Context) (*ManifestIndex, error)
Index retrieves and returns a cache of the upstream manifest registry
func (*ManifestManager) IsCompatible ¶
func (m *ManifestManager) IsCompatible(ctx context.Context, source string, qopts ...packmanager.QueryOption) (packmanager.PackageManager, bool, error)
func (*ManifestManager) LocalManifestIndex ¶
func (m *ManifestManager) LocalManifestIndex(ctx context.Context) string
LocalManifestIndex returns the user configured path to the manifest index
func (*ManifestManager) LocalManifestsDir ¶
func (m *ManifestManager) LocalManifestsDir(ctx context.Context) string
LocalManifestDir returns the user configured path to all the manifests
func (*ManifestManager) Pack ¶
func (m *ManifestManager) Pack(ctx context.Context, c component.Component, opts ...packmanager.PackOption) ([]pack.Package, error)
func (*ManifestManager) RemoveSource ¶
func (m *ManifestManager) RemoveSource(ctx context.Context, source string) error
func (*ManifestManager) SetSources ¶
func (m *ManifestManager) SetSources(_ context.Context, sources ...string) error
func (*ManifestManager) Unpack ¶
func (m *ManifestManager) Unpack(ctx context.Context, p pack.Package, opts ...packmanager.UnpackOption) ([]component.Component, error)
type ManifestManagerOption ¶ added in v0.6.0
type ManifestManagerOption func(context.Context, *ManifestManager) error
ManifestManagerOption represents a specific configuration that can be used for the Manifest Package Manager.
func WithManagerAuths ¶
func WithManagerAuths(auths map[string]config.AuthConfig) ManifestManagerOption
Set the default set of auths to initialize the manager with.
func WithManagerCacheDir ¶
func WithManagerCacheDir(dir string) ManifestManagerOption
Set the location of component archives which are stored locally.
func WithManagerDefaultChannelName ¶
func WithManagerDefaultChannelName(name string) ManifestManagerOption
Sets the default channel name to use when multiple channels are specified.
func WithManagerLocalManifestDir ¶
func WithManagerLocalManifestDir(dir string) ManifestManagerOption
Set the local directory where the manifests are stored.
func WithManagerManifests ¶
func WithManagerManifests(manifests ...string) ManifestManagerOption
Set the default set of source manifests to initialize the manager with. Not setting anything will result in defaults.
type ManifestOption ¶
type ManifestOption func(*ManifestOptions)
func WithAuthConfig ¶
func WithAuthConfig(auths map[string]config.AuthConfig) ManifestOption
WithAuthConfig sets any required authentication necessary for accessing the manifest.
func WithCacheDir ¶ added in v0.6.0
func WithCacheDir(dir string) ManifestOption
WithCacheDir is an option which helps find cached Manifest Channel or Version resources. When set to a directory, the fixed structure of this directory should allow us to look up (and also store) resources here for later use.
func WithDefaultChannelName ¶
func WithDefaultChannelName(name string) ManifestOption
WithDefaultChannelName sets the default channel name to use when multiple channels are specified.
func WithUpdate ¶ added in v0.7.0
func WithUpdate(update bool) ManifestOption
WithUpdate is an option to indicate that remote network connections can be made when instantiating a Manifest(Index) or to allow probing remote sources to determine versions, etc.
type ManifestOptions ¶ added in v0.6.0
type ManifestOptions struct {
// contains filtered or unexported fields
}
ManifestOptions contains a set of additional configuration necessary for the underlying ManifestProvider implementation that are not attributes of the provider itself.
func NewManifestOptions ¶ added in v0.6.0
func NewManifestOptions(opts ...ManifestOption) *ManifestOptions
NewManifestOptions returns an instantiated ManifestOptions based on variable input number of ManifestOption methods.
type ManifestProvider ¶
type ManifestProvider struct {
// contains filtered or unexported fields
}
func (*ManifestProvider) DeleteManifest ¶ added in v0.7.0
func (mp *ManifestProvider) DeleteManifest(ctx context.Context) error
func (*ManifestProvider) Manifests ¶
func (mp *ManifestProvider) Manifests() ([]*Manifest, error)
func (*ManifestProvider) MarshalJSON ¶ added in v0.7.2
func (mp *ManifestProvider) MarshalJSON() ([]byte, error)
func (*ManifestProvider) PullChannel ¶
func (mp *ManifestProvider) PullChannel(ctx context.Context, manifest *Manifest, channel *ManifestChannel, opts ...pack.PullOption) error
func (*ManifestProvider) PullVersion ¶
func (mp *ManifestProvider) PullVersion(ctx context.Context, manifest *Manifest, version *ManifestVersion, opts ...pack.PullOption) error
func (*ManifestProvider) String ¶
func (mp *ManifestProvider) String() string
type ManifestVersion ¶
type ManifestVersion struct { Version string `yaml:"version"` Resource string `yaml:"resource"` Sha256 string `yaml:"sha256,omitempty"` Type ManifestVersionType `yaml:"type,omitempty"` Unikraft string `yaml:"unikraft,omitempty"` }
func (*ManifestVersion) ShortGitSha ¶
func (mv *ManifestVersion) ShortGitSha() (string, error)
type ManifestVersionType ¶
type ManifestVersionType string
const ( ManifestVersionSemver ManifestVersionType = "semver" ManifestVersionGitSha ManifestVersionType = "gitsha" )
type Provider ¶
type Provider interface { // Manifests returns a slice of Manifests which can be returned by this // Provider Manifests() ([]*Manifest, error) // PullChannel a specific channel from the provider. PullChannel(context.Context, *Manifest, *ManifestChannel, ...pack.PullOption) error // PullVersion a specific version from the provider. PullVersion(context.Context, *Manifest, *ManifestVersion, ...pack.PullOption) error // DeleteManifest deletes the artifact based on the provider's implementation. DeleteManifest(context.Context) error // String returns the name of the provider fmt.Stringer json.Marshaler }
func NewDirectoryProvider ¶
func NewDirectoryProvider(ctx context.Context, path string, opts ...ManifestOption) (Provider, error)
NewDirectoryProvider attempts to parse a provided path as a Unikraft "microlibirary" directory
func NewGitHubProvider ¶
NewGitHubProvider attempts to parse the input path as a location provided on GitHub. Additional context for authentication is necessary to use this provider if the location is held within a private repository. Otherwise we can both probe GitHub's API as well as exploit the fact that it is a Git repository to retrieve information and deliver information as a Manifest format.
func NewGitProvider ¶
NewGitProvider attempts to parse a provided path as a Git repository
func NewManifestIndexProvider ¶
func NewManifestIndexProvider(ctx context.Context, path string, mopts ...ManifestOption) (Provider, error)
NewManifestIndexProvider accepts an input path which is checked against first a local file on disk and then a remote URL. If either of these checks pass, the Provider is instantiated since the path does indeed represent a ManifestIndex.
func NewManifestProvider ¶
func NewManifestProvider(ctx context.Context, path string, mopts ...ManifestOption) (Provider, error)
NewManifestProvider accepts an input path which is checked against a local file on disk and a remote URL. If populating a Manifest struct is possible given the path, then this provider is able to return list of exactly 1 manifest.
func NewProvider ¶
NewProvider ultimately returns one of the supported manifest providers by attempting an ordered instantiation based on the input source. For the provider which does not return an error is indicator that it is supported and thus the return of NewProvider a compatible interface Provider able to gather information about the manifest.
func NewProviderFromString ¶ added in v0.2.0
func NewProviderFromString(ctx context.Context, provider, path string, entity any, mopts ...ManifestOption) (Provider, error)
NewProviderFromString returns a provider based on a giving string which identifies the provider
func NewTarballProvider ¶
type TarballProvider ¶
type TarballProvider struct {
// contains filtered or unexported fields
}
func (TarballProvider) DeleteManifest ¶
func (provider TarballProvider) DeleteManifest(context.Context) error
func (TarballProvider) Manifests ¶
func (provider TarballProvider) Manifests() ([]*Manifest, error)
func (TarballProvider) MarshalJSON ¶
func (provider TarballProvider) MarshalJSON() ([]byte, error)
func (TarballProvider) PullChannel ¶
func (provider TarballProvider) PullChannel(ctx context.Context, manifest *Manifest, _ *ManifestChannel, opts ...pack.PullOption) error
func (TarballProvider) PullVersion ¶
func (provider TarballProvider) PullVersion(ctx context.Context, manifest *Manifest, _ *ManifestVersion, opts ...pack.PullOption) error
func (TarballProvider) String ¶
func (provider TarballProvider) String() string