Documentation ¶
Index ¶
Constants ¶
View Source
const ( //DiffWeightLow difference with low severity DiffWeightLow = DiffLevel(iota) //DiffWeightMedium difference with medium severity DiffWeightMedium //DiffWeightHigh difference with high severity DiffWeightHigh //DiffWeightCritical difference with critical severity DiffWeightCritical )
View Source
const ( //DiffTypeModuleFetchError error during module fetch DiffTypeModuleFetchError = DiffType(iota) //DiffTypeLicenseNotFound license not found DiffTypeLicenseNotFound //DiffTypeLicenseAdded license added DiffTypeLicenseAdded //DiffTypeLicenseMinorChanges minor changes in license DiffTypeLicenseMinorChanges //DiffTypeLicenseNameChanged changed license name DiffTypeLicenseNameChanged //DiffTypeLicenseLessStrictChanged changed license to less strict DiffTypeLicenseLessStrictChanged //DiffTypeLicenseMoreStrictChanged changed license to more strict DiffTypeLicenseMoreStrictChanged //DiffTypeLicenseRemoved license removed DiffTypeLicenseRemoved //DiffTypeNewSubmodule new submodule DiffTypeNewSubmodule //DiffTypeNewVulnerability new vulnerability DiffTypeNewVulnerability )
Variables ¶
This section is empty.
Functions ¶
func InitHandler ¶
InitHandler initializes Module handler
Types ¶
type Details ¶
type Details struct { Dependencies []Module DependenciesMap map[string]Module License license.License UpdateDifferences Differences Vulnerabilities vulnerability.Vulnerabilities }
Details contains additional information about module
type Difference ¶
type Difference struct { Level DiffLevel Module Module ModuleUpdate Module Type DiffType Vulnerability vulnerability.Vulnerability }
Difference contains differences between module versions
type Differences ¶
type Differences []Difference
Differences contains multiple differences
func (*Differences) AddModule ¶
func (dffs *Differences) AddModule(md Module, dfLv DiffLevel, dfTp DiffType)
AddModule adds difference of module
func (*Differences) AddModules ¶ added in v0.7.0
func (dffs *Differences) AddModules(md, mdUp Module, dfLv DiffLevel, dfTp DiffType)
AddModules adds difference details with module and available update
func (*Differences) AddVulnerability ¶ added in v0.7.0
func (dffs *Differences) AddVulnerability(md Module, vln vulnerability.Vulnerability)
AddVulnerability adds difference of vulnerability
type Error ¶ added in v0.7.0
type Error struct {
Err string
}
Error represents the error when a module cannot be loaded
type Handler ¶
type Handler interface { ListAvailable(direct, withUpdate bool) (Modules, output.Output) ListSubModules(pth string) (Modules, output.Output) }
Handler handles functions related to modules
type Module ¶
type Module struct { Main bool `json:",omitempty"` // is this the main module? Indirect bool `json:",omitempty"` // module is only indirectly needed by main module Dir string `json:",omitempty"` // directory holding local copy of files, if any GoMod string `json:",omitempty"` // path to go.mod file describing module, if any GoVersion string `json:",omitempty"` // go version used in module Path string `json:",omitempty"` // module path Version string `json:",omitempty"` // module version Versions []string `json:",omitempty"` // available module versions Error *Error `json:",omitempty"` // error loading module Replace *Module `json:",omitempty"` // replaced by this module Update *Module `json:",omitempty"` // available update Details }
Module holds information about a specific module
type Table ¶ added in v0.8.0
type Table struct {
// contains filtered or unexported fields
}
func (*Table) GenerateAnalyzeTable ¶ added in v0.8.0
GenerateAnalyzeTable generates a table for CLI with analyze of current dependencies
func (Table) GeneratePreviewTable ¶ added in v0.8.0
GeneratePreviewTable generates a table for CLI with available updates
Click to show internal directories.
Click to hide internal directories.