config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(data []byte, cfg *Config) error

func LoadFile

func LoadFile(filename string, cfg *Config) error

Types

type Config

type Config struct {
	GitLab    GitLab     `default:"{}" yaml:"gitlab"`
	Endpoints []Endpoint `default:"[]" yaml:"endpoints"`
	Projects  []Project  `default:"[]" yaml:"projects"`
	Server    Server     `default:"{}" yaml:"server"`
	Log       Log        `default:"{}" yaml:"log"`
}

func Default

func Default() Config

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(v *yaml.Node) error

Config implements the Unmarshaler interface

type Endpoint

type Endpoint struct {
	Address string `default:"" yaml:"address"`
}

type GitLab

type GitLab struct {
	Api struct {
		URL   string `default:"https://gitlab.com/api/v4" yaml:"url"`
		Token string `default:"" yaml:"token"`
	} `yaml:"api"`

	Client struct {
		Rate struct {
			Limit float64 `default:"0.0" yaml:"limit"`
		} `yaml:"rate"`
	} `yaml:"client"`
}

type Log added in v0.6.0

type Log struct {
	Level  string `default:"info" yaml:"level"`
	Format string `default:"text" yaml:"format"`
}

type Project

type Project struct {
	ProjectSettings `default:"{}" yaml:",inline"`

	Id int64 `yaml:"id"`
}

type ProjectCatchUp

type ProjectCatchUp struct {
	Enabled       bool   `default:"false" yaml:"enabled"`
	Forced        bool   `default:"false" yaml:"forced"`
	UpdatedAfter  string `default:"" yaml:"updated_after"`
	UpdatedBefore string `default:"" yaml:"updated_before"`
}

type ProjectExport

type ProjectExport struct {
	Sections    ProjectExportSections    `default:"{}" yaml:"sections"`
	TestReports ProjectExportTestReports `default:"{}" yaml:"testreports"`
	Traces      ProjectExportTraces      `default:"{}" yaml:"traces"`
	Metrics     ProjectExportMetrics     `default:"{}" yaml:"metrics"`
}

type ProjectExportMetrics added in v0.6.0

type ProjectExportMetrics struct {
	Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectExportSections

type ProjectExportSections struct {
	Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectExportTestReports

type ProjectExportTestReports struct {
	Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectExportTraces

type ProjectExportTraces struct {
	Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectSettings

type ProjectSettings struct {
	Export  ProjectExport  `default:"{}" yaml:"export"`
	CatchUp ProjectCatchUp `default:"{}" yaml:"catch_up"`
}

func DefaultProjectSettings

func DefaultProjectSettings() ProjectSettings

type Server

type Server struct {
	Host string `default:"127.0.0.1" yaml:"host"`
	Port string `default:"8080" yaml:"port"`
}

Jump to

Keyboard shortcuts

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