cfg

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: AGPL-3.0 Imports: 2 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 {
	HTTPListenAddr            string             `toml:"http_server_listen_addr"`
	HTTPSListenAddr           string             `toml:"https_server_listen_addr"`
	HTTPSCertFile             string             `toml:"https_ssl_cert_file"`
	HTTPSKeyFile              string             `toml:"https_ssl_key_file"`
	HTTPGithubWebhookEndpoint string             `toml:"github_webhook_endpoint"`
	GithubWebHookSecret       string             `toml:"github_webhook_secret"`
	GithubAPIToken            string             `toml:"github_api_token"`
	PrometheusMetricsEndpoint string             `toml:"prometheus_metrics_endpoint"`
	LogFormat                 string             `toml:"log_format"`
	LogTimeKey                string             `toml:"log_time_key"`
	LogLevel                  string             `toml:"log_level"`
	Autoupdater               PullRequestUpdater `toml:"autoupdater"`
	Rules                     []*Rules           `toml:"rule"`
}

func Load

func Load(reader io.Reader) (*Config, error)

func (*Config) Marshal

func (r *Config) Marshal(writer io.Writer) error

type GithubRepository added in v0.8.0

type GithubRepository struct {
	Owner          string `toml:"owner"`
	RepositoryName string `toml:"repository"`
}

type PullRequestUpdater added in v0.8.0

type PullRequestUpdater struct {
	TriggerOnAutoMerge bool               `toml:"trigger_on_auto_merge"`
	Labels             []string           `toml:"trigger_labels"`
	HeadLabel          string             `toml:"queue_pr_head_label"`
	Repositories       []GithubRepository `toml:"repository"`
	Endpoint           string             `toml:"http_endpoint"`
}

type Rules

type Rules struct {
	Name string `toml:"name"`
	Trigger
	Actions []map[string]any `toml:"action"`
}

type Trigger added in v0.8.0

type Trigger struct {
	EventSource string `toml:"event_source" default:"github"`
	FilterQuery string `toml:"filter_query"`
}

Jump to

Keyboard shortcuts

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