Documentation ¶
Index ¶
- Constants
- func GenerateMarkdownDependencyMatrix(path string, matrix DependencyMatrix) error
- func UpdateDependencyMatrix(dir string, update *v1.DependencyUpdate) error
- func VerifyDependencyMatrixHasConsistentVersions(dir string) error
- type Dependency
- type DependencyDetails
- type DependencyMatrix
- type DependencyMessage
- type DependencyPath
- type DependencySource
- type DependencyUpdates
Constants ¶
const ( // DependencyMatrixDirName is the name of the directory in which the dependency matrix is stored in git DependencyMatrixDirName = "dependency-matrix" // DependencyMatrixYamlFileName is the name of file in which the dependency matrix will be stored DependencyMatrixYamlFileName = "matrix.yaml" // DependencyMatrixAssetName is the name of the asset when the dependency matrix is added to the release on the git provider DependencyMatrixAssetName = "dependency-matrix.yaml" )
const DependencyUpdatesAssetName = "dependency-updates.yaml"
DependencyUpdatesAssetName is the name of the asset used for the dependency updates file when uploading to the git provider
Variables ¶
This section is empty.
Functions ¶
func GenerateMarkdownDependencyMatrix ¶
func GenerateMarkdownDependencyMatrix(path string, matrix DependencyMatrix) error
GenerateMarkdownDependencyMatrix will generate a markdown version of the dependency matrix at path
func UpdateDependencyMatrix ¶
func UpdateDependencyMatrix(dir string, update *v1.DependencyUpdate) error
UpdateDependencyMatrix updates the dependency matrix in dir/dependency-matrix using update
func VerifyDependencyMatrixHasConsistentVersions ¶
VerifyDependencyMatrixHasConsistentVersions loads a dependency matrix from dir and verifies that there are no inconsistent versions in it
Types ¶
type Dependency ¶
type Dependency struct { DependencyDetails `json:",inline"` Sources []DependencySource `json:"sources,omitempty"` }
Dependency represents a dependency in the DependencyMatrix
type DependencyDetails ¶
type DependencyDetails struct { Host string `json:"host"'` Owner string `json:"owner"` Repo string `json:"repo"` Component string `json:"component,omitempty"` URL string `json:"url"` Version string `json:"version"` VersionURL string `json:"versionURL"` }
DependencyDetails are the details of a dependency
func (*DependencyDetails) KeyEquals ¶
func (d *DependencyDetails) KeyEquals(o v1.DependencyUpdateDetails) bool
KeyEquals validates that the key (Host, Owner, Repo and Component) are all the same
func (DependencyDetails) String ¶
func (d DependencyDetails) String() string
type DependencyMatrix ¶
type DependencyMatrix struct {
Dependencies []*Dependency `json:"dependencies"`
}
DependencyMatrix is the dependency matrix for a git repo
func LoadDependencyMatrix ¶
func LoadDependencyMatrix(dir string) (*DependencyMatrix, error)
LoadDependencyMatrix loads the dependency matrix file from the given project directory
func (*DependencyMatrix) FindVersionForDependency ¶
func (d *DependencyMatrix) FindVersionForDependency(host, owner, repo string) (string, error)
FindVersionForDependency searches the matrix for a dependency matching the given host, owner, and repo, and if found, returns its version
type DependencyMessage ¶
type DependencyMessage struct { URL string Owner string Host string Repo string FromVersion string ToVersion string Component string Scheme string }
DependencyMessage is the parsed representation of a dependency update message on a commit
func ParseDependencyMessage ¶
func ParseDependencyMessage(msg string) (*DependencyMessage, error)
ParseDependencyMessage parses a dependency update message on a commit and returns the DependencyMessage struct
type DependencyPath ¶
type DependencyPath []*DependencyDetails
func (DependencyPath) Markdown ¶
func (d DependencyPath) Markdown() string
Markdown returns the dependency path as markdown
func (DependencyPath) PathEquals ¶
func (d DependencyPath) PathEquals(o v1.DependencyUpdatePath) bool
PathEquals returns true if a dependency path is equal to a dependency update path
func (DependencyPath) String ¶
func (d DependencyPath) String() string
type DependencySource ¶
type DependencySource struct { Path DependencyPath `json:"path"` Version string `json:"version"` VersionURL string `json:"versionURL"` }
DependencySource is describes the source of a dependency, including the Path to it and the Version of the dependency
type DependencyUpdates ¶
type DependencyUpdates struct {
Updates []v1.DependencyUpdate `json:"updates"`
}
DependencyUpdates is the struct for the file containing dependency updates