Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher interface {
Fetch() (*apiv1.ModuleReference, error)
GetModuleRoot() string
}
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func NewLocal ¶
NewLocal creates a local Fetcher for the given module source directory. The source is resolved to an absolute path at construction time, so a later working directory change does not alter which module is fetched.
func (*Local) Fetch ¶
func (f *Local) Fetch() (*apiv1.ModuleReference, error)
Fetch validates the module source directory and returns the module reference. The module is not copied; instance values are injected at build time as in-memory overlays, leaving the directory untouched.
func (*Local) GetModuleRoot ¶
GetModuleRoot returns the absolute path of the module source directory. Local modules build in place: the CUE loader reads the imported files lazily from the source directory and build errors carry the positions of the files the user is editing.
type OCI ¶
type OCI struct {
// contains filtered or unexported fields
}
func (*OCI) Fetch ¶
func (f *OCI) Fetch() (*apiv1.ModuleReference, error)
Fetch copies the module contents to the destination directory. The artifact is pulled from the registry and its contents extracted to the destination dir. An empty cache directory disables persistent caching.
func (*OCI) GetModuleRoot ¶
type Options ¶
type Options struct {
// Source is the location of the module to fetch.
Source string
// Version is the version of the module to fetch.
Version string
// Destination is the location to store the fetched module.
Destination string
// CacheDir is the location to store the fetched module.
CacheDir string
// Creds is the credentials to use when fetching the module.
Creds string
// Insecure is a flag that indicates if the fetcher should allow use of insecure connections.
Insecure bool
// DefaultLocal is a flag that indicates if the fetcher should default to a Local fetcher if no other can be applied.
DefaultLocal bool
}