Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("module not found")
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index represents an index registry. Its URL can have either an HTTP(S) scheme, or a file scheme (for a local directory).
type Registry ¶
type Registry interface { // URL returns the URL uniquely identifying the registry. URL() string // GetModuleBazel retrieves the MODULE.bazel file of the module with the given key. Returns an error wrapping // ErrNotFound if no such module exists in the registry. GetModuleBazel(key common.ModuleKey) ([]byte, error) // GetFetcher returns the Fetcher object which can be used to fetch the module with the given key. Returns an error // wrapping ErrNotFound if no such module exists in the registry. GetFetcher(key common.ModuleKey) (fetch.Fetcher, error) }
Registry represents a Bazel module registry.
func GetModuleBazel ¶
func GetModuleBazel(key common.ModuleKey, registries []string, regOverride string) ([]byte, Registry, error)
GetModuleBazel gets the MODULE.bazel file contents for the module with the given key, using the list of registries with an optional override `regOverride` (use an empty string for no override). Returns the file contents, and the registry that actually has that module.
Click to show internal directories.
Click to hide internal directories.