config

package
v1.15.10 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvGitHubAppID               = "GITHUB_APP_ID"
	EnvGitHubAppSecret           = "GITHUB_APP_SECRET"
	EnvGitHubAppPrivateKeyBase64 = "GITHUB_PRIVATE_KEY_BASE64"
	EnvMySQLURL                  = "MYSQL_URL"
	EnvPort                      = "PORT"
	EnvShoesPluginPath           = "PLUGIN"
	EnvRunnerUser                = "RUNNER_USER"
	EnvDebug                     = "DEBUG"
	EnvStrict                    = "STRICT"
	EnvModeWebhookType           = "MODE_WEBHOOK_TYPE"
	EnvMaxConnectionsToBackend   = "MAX_CONNECTIONS_TO_BACKEND"
	EnvMaxConcurrencyDeleting    = "MAX_CONCURRENCY_DELETING"
	EnvGitHubURL                 = "GITHUB_URL"
	EnvRunnerVersion             = "RUNNER_VERSION"
)

Config Environment keys

Variables

This section is empty.

Functions

func Load

func Load()

Load load config from environment

Types

type Conf added in v1.13.0

type Conf struct {
	GitHub struct {
		AppID     int64
		AppSecret []byte
		PEMByte   []byte
		PEM       *rsa.PrivateKey
	}

	MySQLDSN        string
	Port            int
	ShoesPluginPath string
	RunnerUser      string

	Debug           bool
	Strict          bool // check to registered runner before delete job
	ModeWebhookType ModeWebhookType

	MaxConnectionsToBackend int64
	MaxConcurrencyDeleting  int64

	GitHubURL     string
	RunnerVersion string
}

Conf is type of Config

var Config Conf

Config is config value

func LoadWithDefault added in v1.13.0

func LoadWithDefault() Conf

LoadWithDefault load only value that has default value

func (Conf) IsGHES added in v1.13.0

func (c Conf) IsGHES() bool

IsGHES return myshoes for GitHub Enterprise Server

type ModeWebhookType added in v1.11.0

type ModeWebhookType int

ModeWebhookType is type value for GitHub webhook

const (
	// ModeWebhookTypeUnknown is unknown
	ModeWebhookTypeUnknown ModeWebhookType = iota
	// ModeWebhookTypeCheckRun is check_run
	ModeWebhookTypeCheckRun
	// ModeWebhookTypeWorkflowJob is workflow_job
	ModeWebhookTypeWorkflowJob
)

func (ModeWebhookType) Equal added in v1.11.0

func (mwt ModeWebhookType) Equal(in string) bool

Equal check in and value

func (ModeWebhookType) String added in v1.11.0

func (mwt ModeWebhookType) String() string

String is implementation of fmt.Stringer

Jump to

Keyboard shortcuts

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