Documentation ¶
Overview ¶
package tooldata provides routines for locating and reading tool specific data.
Index ¶
- func ConfigFilePath(jirix *jiri.X) (string, error)
- func DataDirPath(jirix *jiri.X, toolName string) (string, error)
- func OncallRotationPath(jirix *jiri.X) (string, error)
- func SaveConfig(jirix *jiri.X, config *Config) error
- func ThirdPartyBinPath(jirix *jiri.X, name string) (string, error)
- type APICheckProjectsOpt
- type Config
- func (c Config) APICheckProjects() map[string]struct{}
- func (c Config) CopyrightCheckProjects() map[string]struct{}
- func (c Config) GoPath(jirix *jiri.X) string
- func (c Config) GoWorkspaces() []string
- func (c Config) GroupTests(groups []string) []string
- func (c Config) JenkinsMatrixJobs() map[string]JenkinsMatrixJobInfo
- func (c Config) ProjectTests(projects []string) []string
- func (c Config) Projects() []string
- func (c Config) TestDependencies(test string) []string
- func (c Config) TestParts(test string) []string
- func (c Config) VDLPath(jirix *jiri.X) string
- func (c Config) VDLWorkspaces() []string
- type ConfigOpt
- type CopyrightCheckProjectsOpt
- type GoWorkspacesOpt
- type JenkinsMatrixJobInfo
- type JenkinsMatrixJobsOpt
- type OncallRotation
- type OncallShift
- type ProjectTestsOpt
- type TestDependenciesOpt
- type TestGroupsOpt
- type TestPartsOpt
- type VDLWorkspacesOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFilePath ¶
ConfigFilePath returns the path to the tools configuration file.
func DataDirPath ¶
DataDirPath returns the path to the data directory of the given tool.
func OncallRotationPath ¶
OncallRotationPath returns the path to the oncall rotation file.
func SaveConfig ¶
SaveConfig writes the given configuration to the tools configuration file.
Types ¶
type APICheckProjectsOpt ¶
type APICheckProjectsOpt map[string]struct{}
APICheckProjectsOpt is the type that can be used to pass the Config factory a API check projects option.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds configuration common to jiri tools.
func LoadConfig ¶
LoadConfig returns the configuration stored in the tools configuration file.
func (Config) APICheckProjects ¶
APICheckProjects returns the set of project names for which the API check is required.
func (Config) CopyrightCheckProjects ¶
CopyrightCheckProjects returns the set of project names for which the copyright check is required.
func (Config) GoPath ¶
GoPath computes and returns the GOPATH environment variable based on the current jiri configuration.
func (Config) GoWorkspaces ¶
GoWorkspaces returns the Go workspaces included in the config.
func (Config) GroupTests ¶
GroupTests returns a list of Jenkins tests associated with the given test groups.
func (Config) JenkinsMatrixJobs ¶
func (c Config) JenkinsMatrixJobs() map[string]JenkinsMatrixJobInfo
JenkinsMatrixJobs returns the set of Jenkins matrix jobs.
func (Config) ProjectTests ¶
ProjectTests returns a list of Jenkins tests associated with the given projects by the config.
func (Config) TestDependencies ¶
TestDependencies returns a list of dependencies for the given test.
func (Config) VDLPath ¶
VDLPath computes and returns the VDLPATH environment variable based on the current jiri configuration.
func (Config) VDLWorkspaces ¶
VDLWorkspaces returns the VDL workspaces included in the config.
type ConfigOpt ¶
type ConfigOpt interface {
// contains filtered or unexported methods
}
ConfigOpt is an interface for Config factory options.
type CopyrightCheckProjectsOpt ¶
type CopyrightCheckProjectsOpt map[string]struct{}
CopyrightCheckProjectsOpt is the type that can be used to pass the Config factory a copyright check projects option.
type GoWorkspacesOpt ¶
type GoWorkspacesOpt []string
GoWorkspacesOpt is the type that can be used to pass the Config factory a Go workspace option.
type JenkinsMatrixJobInfo ¶
type JenkinsMatrixJobInfo struct { HasArch bool `xml:"arch,attr"` HasOS bool `xml:"OS,attr"` HasParts bool `xml:"parts,attr"` // ShowOS determines whether to show OS label in job summary. // It is possible that a job (e.g. jiri-go-race) has an OS axis but // the axis only has a single value in order to constrain where its // sub-builds run. In such cases, we do not want to show the OS label. ShowOS bool `xml:"showOS,attr"` Name string `xml:",chardata"` }
type JenkinsMatrixJobsOpt ¶
type JenkinsMatrixJobsOpt map[string]JenkinsMatrixJobInfo
JenkinsMatrixJobsOpt is the type that can be used to pass the Config factory a Jenkins matrix jobs option.
type OncallRotation ¶
type OncallRotation struct { Shifts []OncallShift `xml:"shift"` XMLName xml.Name `xml:"rotation"` }
func LoadOncallRotation ¶
func LoadOncallRotation(jirix *jiri.X) (*OncallRotation, error)
LoadOncallRotation parses the default oncall schedule file.
type OncallShift ¶
type ProjectTestsOpt ¶
ProjectTestsOpt is the type that can be used to pass the Config factory a project tests option.
type TestDependenciesOpt ¶
TestDependenciesOpt is the type that can be used to pass the Config factory a test dependencies option.
type TestGroupsOpt ¶
TestGroupsOpt is the type that can be used to pass the Config factory a test groups option.
type TestPartsOpt ¶
TestPartsOpt is the type that can be used to pass the Config factory a test parts option.
type VDLWorkspacesOpt ¶
type VDLWorkspacesOpt []string
VDLWorkspacesOpt is the type that can be used to pass the Config factory a VDL workspace option.