jx: github.com/jenkins-x/jx/pkg/dependencymatrix Index | Files

package dependencymatrix

import "github.com/jenkins-x/jx/pkg/dependencymatrix"

Index

Package Files

commits.go matrix.go updates.go verify.go

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

func GenerateMarkdownDependencyMatrix Uses

func GenerateMarkdownDependencyMatrix(path string, matrix DependencyMatrix) error

GenerateMarkdownDependencyMatrix will generate a markdown version of the dependency matrix at path

func UpdateDependencyMatrix Uses

func UpdateDependencyMatrix(dir string, update *v1.DependencyUpdate) error

UpdateDependencyMatrix updates the dependency matrix in dir/dependency-matrix using update

func VerifyDependencyMatrixHasConsistentVersions Uses

func VerifyDependencyMatrixHasConsistentVersions(dir string) error

VerifyDependencyMatrixHasConsistentVersions loads a dependency matrix from dir and verifies that there are no inconsistent versions in it

type Dependency Uses

type Dependency struct {
    DependencyDetails `json:",inline"`
    Sources           []DependencySource `json:"sources,omitempty"`
}

Dependency represents a dependency in the DependencyMatrix

type DependencyDetails Uses

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 Uses

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 Uses

func (d DependencyDetails) String() string

type DependencyMatrix Uses

type DependencyMatrix struct {
    Dependencies []*Dependency `json:"dependencies"`
}

DependencyMatrix is the dependency matrix for a git repo

func LoadDependencyMatrix Uses

func LoadDependencyMatrix(dir string) (*DependencyMatrix, error)

LoadDependencyMatrix loads the dependency matrix file from the given project directory

func (*DependencyMatrix) FindVersionForDependency Uses

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 Uses

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 Uses

func ParseDependencyMessage(msg string) (*DependencyMessage, error)

ParseDependencyMessage parses a dependency update message on a commit and returns the DependencyMessage struct

type DependencyPath Uses

type DependencyPath []*DependencyDetails

func (DependencyPath) Markdown Uses

func (d DependencyPath) Markdown() string

Markdown returns the dependency path as markdown

func (DependencyPath) PathEquals Uses

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 Uses

func (d DependencyPath) String() string

type DependencySource Uses

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 Uses

type DependencyUpdates struct {
    Updates []v1.DependencyUpdate `json:"updates"`
}

DependencyUpdates is the struct for the file containing dependency updates

Package dependencymatrix imports 13 packages (graph) and is imported by 5 packages. Updated 2019-10-04. Refresh now. Tools for package owners.