config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: BSD-3-Clause Imports: 3 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 {
	Server    HTTPConfig       `mapstructure:"server"`
	Queue     QueueConfig      `mapstructure:"queue"`
	Github    GithubConfig     `mapstructure:"github"`
	Pipelines []PipelineConfig `mapstructure:"pipelines"`
}

func ReadConfig

func ReadConfig(filename string, paths ...string) (*Config, error)

type GithubConfig

type GithubConfig struct {
	IntegrationID int64  `mapstructure:"integration_id"`
	WebhookSecret string `mapstructure:"webhook_secret"`
	PrivateKey    string `mapstructure:"private_key"`
}

type HTTPConfig

type HTTPConfig struct {
	BaseURL string `mapstructure:"base_url"`
	Address string `mapstructure:"address"`
	Port    int    `mapstructure:"port"`
}

type PipelineCondition

type PipelineCondition struct {
	Repository string   `mapstructure:"repository"`
	Webhook    []string `mapstructure:"webhook"`
	Workflow   string   `mapstructure:"workflow"`
	Type       string   `mapstructure:"type"`
	Fork       bool     `mapstructure:"fork"`
	Status     string   `mapstructure:"status"`
	Conclusion string   `mapstructure:"conclusion"`
	Name       string   `mapstructure:"name"`
}

type PipelineConfig

type PipelineConfig struct {
	Organization string              `mapstructure:"organization"`
	Repository   string              `mapstructure:"repository"`
	Workflow     string              `mapstructure:"workflow"`
	Conditions   []PipelineCondition `mapstructure:"conditions"`
}

type QueueConfig

type QueueConfig struct {
	Limit   int `mapstructure:"limit"`
	Workers int `mapstructure:"workers"`
}

Jump to

Keyboard shortcuts

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