config

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Services       []Service `json:"services" yaml:"services"`
	ConfigFile     string    `env:"TESTS_COVERAGE_CONFIG_FILE" json:"-"`
	ResultsDir     string    `env:"TESTS_COVERAGE_RESULTS_DIR" envDefault:"." json:"-" yaml:"resultsDir"`
	HTMLReportDir  string    `env:"TESTS_COVERAGE_HTML_REPORT_DIR" envDefault:"." json:"-" yaml:"htmlReportDir"`
	JSONReportDir  string    `env:"TESTS_COVERAGE_JSON_REPORT_DIR" envDefault:"." json:"-" yaml:"jsonReportDir"`
	HTMLReportFile string    `env:"TESTS_COVERAGE_HTML_REPORT_FILE" envDefault:"index.html" json:"-" yaml:"htmlReportFile"`
	JSONReportFile string    `env:"TESTS_COVERAGE_JSON_REPORT_FILE" envDefault:"coverage-report.json" json:"-" yaml:"jsonReportFile"`
}

func NewConfig

func NewConfig() (Config, error)

func (*Config) GetJSONReportFile

func (c *Config) GetJSONReportFile() string

func (*Config) GetResultsDir

func (c *Config) GetResultsDir() string

func (*Config) PrintConfig

func (c *Config) PrintConfig()

type Service

type Service struct {
	Name       string      `json:"name" yaml:"name"`
	Host       ServiceHost `json:"host" yaml:"host"`
	Repository string      `json:"repository" yaml:"repository"`
}

type ServiceHost

type ServiceHost string

func (ServiceHost) String

func (h ServiceHost) String() string

type Variable

type Variable string
const (
	HTMLReportDir  Variable = "TESTS_COVERAGE_HTML_REPORT_DIR"
	JSONReportDir  Variable = "TESTS_COVERAGE_JSON_REPORT_DIR"
	JSONReportFile Variable = "TESTS_COVERAGE_JSON_REPORT_FILE"
)

func (Variable) String

func (v Variable) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL