config

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultReportPrefix = "reports"

Variables

View Source
var DefaultConfigFilePaths = []string{".octocov.yml", "octocov.yml"}

Functions

func CheckIf added in v0.9.0

func CheckIf(cond string) (bool, error)

Types

type Config

type Config struct {
	Repository        string                   `yaml:"repository"`
	Coverage          *ConfigCoverage          `yaml:"coverage"`
	CodeToTestRatio   *ConfigCodeToTestRatio   `yaml:"codeToTestRatio,omitempty"`
	TestExecutionTime *ConfigTestExecutionTime `yaml:"testExecutionTime,omitempty"`
	Report            *ConfigReport            `yaml:"report,omitempty"`
	Datastore         interface{}              `yaml:"datastore,omitempty"`
	Central           *ConfigCentral           `yaml:"central,omitempty"`
	Push              *ConfigPush              `yaml:"push,omitempty"`
	Comment           *ConfigComment           `yaml:"comment,omitempty"`
	GitRoot           string                   `yaml:"-"`
	// contains filtered or unexported fields
}

func New

func New() *Config

func (*Config) Acceptable added in v0.8.0

func (c *Config) Acceptable(r *report.Report) error

func (*Config) Build

func (c *Config) Build()

func (*Config) BuildCentralConfig added in v0.2.0

func (c *Config) BuildCentralConfig() error

func (*Config) BuildPushConfig added in v0.9.0

func (c *Config) BuildPushConfig() error

func (*Config) BuildReportConfig added in v0.14.0

func (c *Config) BuildReportConfig() error

func (*Config) CentralConfigReady added in v0.2.0

func (c *Config) CentralConfigReady() bool

func (*Config) CentralPushConfigReady added in v0.9.0

func (c *Config) CentralPushConfigReady() bool

func (*Config) CodeToTestRatioBadgeConfigReady added in v0.6.0

func (c *Config) CodeToTestRatioBadgeConfigReady() bool

func (*Config) CodeToTestRatioColor added in v0.6.0

func (c *Config) CodeToTestRatioColor(ratio float64) string

func (*Config) CodeToTestRatioConfigReady added in v0.12.0

func (c *Config) CodeToTestRatioConfigReady() bool

func (*Config) CommentConfigReady added in v0.11.0

func (c *Config) CommentConfigReady() bool

func (*Config) CoverageBadgeConfigReady added in v0.6.0

func (c *Config) CoverageBadgeConfigReady() bool

func (*Config) CoverageColor added in v0.2.0

func (c *Config) CoverageColor(cover float64) string

func (*Config) CoverageConfigReady added in v0.12.0

func (c *Config) CoverageConfigReady() bool

func (*Config) DatastoreConfigReady

func (c *Config) DatastoreConfigReady() bool

func (*Config) Getwd added in v0.5.0

func (c *Config) Getwd() string

func (*Config) Load

func (c *Config) Load(path string) error

func (*Config) Loaded added in v0.2.0

func (c *Config) Loaded() bool

func (*Config) PushConfigReady added in v0.9.0

func (c *Config) PushConfigReady() bool

func (*Config) ReportConfigDatastoresReady added in v0.15.1

func (c *Config) ReportConfigDatastoresReady() bool

func (*Config) ReportConfigReady added in v0.14.0

func (c *Config) ReportConfigReady() bool

func (*Config) Root added in v0.2.0

func (c *Config) Root() string

func (*Config) Setwd added in v0.5.0

func (c *Config) Setwd(path string)

func (*Config) TestExecutionTimeBadgeConfigReady added in v0.7.0

func (c *Config) TestExecutionTimeBadgeConfigReady() bool

func (*Config) TestExecutionTimeColor added in v0.7.0

func (c *Config) TestExecutionTimeColor(d time.Duration) string

func (*Config) TestExecutionTimeConfigReady added in v0.12.0

func (c *Config) TestExecutionTimeConfigReady() bool

type ConfigCentral added in v0.2.0

type ConfigCentral struct {
	Enable  bool                 `yaml:"enable"`
	Root    string               `yaml:"root"`
	Reports ConfigCentralReports `yaml:"reports"`
	Badges  string               `yaml:"badges"`
	Push    ConfigPush           `yaml:"push"`
}

type ConfigCentralReports added in v0.14.0

type ConfigCentralReports struct {
	Datastores []string `yaml:"datastores"`
}

type ConfigCodeToTestRatio added in v0.6.0

type ConfigCodeToTestRatio struct {
	Code       []string                   `yaml:"code"`
	Test       []string                   `yaml:"test"`
	Badge      ConfigCodeToTestRatioBadge `yaml:"badge,omitempty"`
	Acceptable string                     `yaml:"acceptable,omitempty"`
}

type ConfigCodeToTestRatioBadge added in v0.6.0

type ConfigCodeToTestRatioBadge struct {
	Path string `yaml:"path,omitempty"`
}

type ConfigComment added in v0.11.0

type ConfigComment struct {
	Enable         bool `yaml:"enable"`
	HideFooterLink bool `yaml:"hideFooterLink"`
}

type ConfigCoverage

type ConfigCoverage struct {
	Path       string              `yaml:"path,omitempty"`
	Badge      ConfigCoverageBadge `yaml:"badge,omitempty"`
	Acceptable string              `yaml:"acceptable,omitempty"`
}

type ConfigCoverageBadge added in v0.3.0

type ConfigCoverageBadge struct {
	Path string `yaml:"path,omitempty"`
}

type ConfigPush added in v0.9.0

type ConfigPush struct {
	Enable bool   `yaml:"enable"`
	If     string `yaml:"if,omitempty"`
}

type ConfigReport added in v0.14.0

type ConfigReport struct {
	If         string   `yaml:"if,omitempty"`
	Datastores []string `yaml:"datastores,omitempty"`
}

type ConfigTestExecutionTime added in v0.7.0

type ConfigTestExecutionTime struct {
	Badge      ConfigTestExecutionTimeBadge `yaml:"badge,omitempty"`
	Acceptable string                       `yaml:"acceptable,omitempty"`
	Steps      []string                     `yaml:"steps,omitempty"`
}

type ConfigTestExecutionTimeBadge added in v0.7.0

type ConfigTestExecutionTimeBadge struct {
	Path string `yaml:"path,omitempty"`
}

Jump to

Keyboard shortcuts

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