Documentation ¶
Overview ¶
config-utils.go - provide utility methods for handling and manipulating data provided in the AppConfig struct instance
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { AuthTokenKey string `json:"authTokenKey"` Owner string `json:"owner"` // can be user or organization ExtractDir string `json:"extractDir"` TokenResultsConfig WriterConfig `json:"tokenResultsWriterConfig"` RepoResultsConfig WriterConfig `json:"repoResultsWriterConfig"` SecretKeys `json:"secretKeys"` DependencyScanConfig ScanConfig CloudConfig CurrentDep string }
func (*AppConfig) GetLanguage ¶
Returns the Language object associated with the provided string
func (*AppConfig) GetLanguageExts ¶
Gets a list of file extensions associated with each defined language in the config
Example Language Definition:
Language { Name: "HTML", Extension: ".html" }
func (*AppConfig) GetShortDepName ¶
Gets the short relative value of a dependency
npm deps are generally split by a backslash. I.E. @angular/material
func (*AppConfig) ShouldIgnoreRepo ¶
Determines whether the repo value is in the ignore repos slice
func (*AppConfig) ToListOptions ¶
func (config *AppConfig) ToListOptions() *github.ListOptions
Converts the PerPage ScanConfig value to a githubListOptions pointer
type CloudConfig ¶
type DependencyScanConfig ¶
type DependencyScanConfig struct { PackageFile string `json:"packageFile"` Languages []Language `json:"languages"` Dependencies []string `json:"dependencies"` ReposToIgnore []string `json:"reposToIgnore"` TeamsToIgnore `json:"teamsToIgnore"` }
type DestinationType ¶
type DestinationType string
Custom type for defining destinations
const ( DefaultDestination DestinationType = "none" FileDestination DestinationType = "file" TableDesitnation DestinationType = "table" )
Destination type enumeration
Where the results will be written to.
type ScanConfig ¶
type ScanConfig struct {
PerPage int `json:"perPage"`
}
type TeamsToIgnore ¶
type TeamsToIgnore []string
func (TeamsToIgnore) ShouldIgnoreTeam ¶
func (teamsToIgnore TeamsToIgnore) ShouldIgnoreTeam(teamName string) bool
Determines whether the team value is in the ignore repos slice
type WriterConfig ¶
type WriterConfig struct { // Out Directory, table name, etc... DestinationType DestinationType `json:"destinationType"` Destination string `json:"destination"` UseBatchProcessing bool `json:"useBatch"` }
Configuration that is used to define a results writer