Documentation
¶
Index ¶
- type File
- func (f *File) Decode(manifestPath string) error
- func (f *File) EncodeWithIntegrity(w io.Writer, manifestGeneratorHashFile, requirements io.Reader) error
- func (f *File) EncodeWithoutIntegrity(w io.Writer) error
- func (f *File) VerifyIntegrity(manifestGeneratorHashFile, requirements io.Reader) (bool, error)
- type Manifest
- type ModulesMapping
- type PipRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
Manifest *Manifest `yaml:"manifest,omitempty"`
// Integrity is the hash of the requirements.txt file and the Manifest for
// ensuring the integrity of the entire gazelle_python.yaml file. This
// controls the testing to keep the gazelle_python.yaml file up-to-date.
Integrity string `yaml:"integrity,omitempty"`
}
File represents the gazelle_python.yaml file.
type Manifest ¶
type Manifest struct {
// ModulesMapping is the mapping from importable modules to which Python
// wheel name provides these modules.
ModulesMapping ModulesMapping `yaml:"modules_mapping"`
// PipDepsRepositoryName is the name of the pip_parse repository target.
// DEPRECATED
PipDepsRepositoryName string `yaml:"pip_deps_repository_name,omitempty"`
// PipRepository contains the information for pip_parse or pip_repository
// target.
PipRepository *PipRepository `yaml:"pip_repository,omitempty"`
}
Manifest represents the structure of the Gazelle manifest file.
type ModulesMapping ¶
ModulesMapping is the type used to map from importable Python modules to the wheel names that provide these modules.
func (ModulesMapping) MarshalYAML ¶
func (m ModulesMapping) MarshalYAML() (interface{}, error)
MarshalYAML makes sure that we sort the module names before marshaling the contents of `ModulesMapping` to a YAML file. This ensures that the file is deterministically generated from the map.
type PipRepository ¶
type PipRepository struct {
// The name of the pip_parse or pip_repository target.
Name string
}
Directories
¶
| Path | Synopsis |
|---|---|
|
generate.go is a program that generates the Gazelle YAML manifest.
|
generate.go is a program that generates the Gazelle YAML manifest. |
|
test.go is a unit test that asserts the Gazelle YAML manifest is up-to-date in regards to the requirements.txt.
|
test.go is a unit test that asserts the Gazelle YAML manifest is up-to-date in regards to the requirements.txt. |
Click to show internal directories.
Click to hide internal directories.