config

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObfuscateSecret

func ObfuscateSecret(plaintext []byte) (string, error)

ObfuscateSecret returns a portable configuration value that does not expose plaintext on casual inspection. The key is embedded in runnerd, so this is intentionally obfuscation rather than a security boundary.

Types

type Config

type Config struct {
	HTTPAddr                  string
	HTTPReadTimeout           time.Duration
	HTTPWriteTimeout          time.Duration
	HTTPIdleTimeout           time.Duration
	StateDir                  string
	StateBackend              string
	StateDatabaseDSN          Secret
	GitHubAppID               int64
	GitHubAppInstallationID   int64
	GitHubAppSlug             string
	GitHubAppPrivateKeyFile   string
	GitHubToken               Secret
	GitHubBasicAuthUsername   string
	GitHubBasicAuthPassword   Secret
	GitHubWebhookSecret       Secret
	GitHubAllowedRepositories []string
	AuthSessionSecret         Secret
	AuthEncryptionKey         Secret
	AuthSessionTTL            time.Duration
	GitHubOAuthClientID       string
	GitHubOAuthClientSecret   Secret
	GitHubOAuthRedirectURL    string
	SandboxTimeout            time.Duration
	SandboxCreateTimeout      time.Duration
	SandboxStopTimeout        time.Duration
	RecoveryTimeout           time.Duration
	WorkerLeaseTTL            time.Duration
	RunnerIdleTimeout         time.Duration
	RetryBaseDelay            time.Duration
	RetryMaxDelay             time.Duration
	RetryMaxAttempts          int
	MaxConcurrentRunners      int
	GitHubAPIBaseURL          string
	ConfigPath                string
}

func Load

func Load(path string) (Config, error)

func LoadFile

func LoadFile(path string) (Config, error)

func (Config) GitHubAuthMode

func (c Config) GitHubAuthMode() string

func (Config) GitHubOAuthEnabled

func (c Config) GitHubOAuthEnabled() bool

func (Config) RepositoryAllowed

func (c Config) RepositoryAllowed(repository string) bool

type Secret

type Secret string

Secret is a sensitive configuration value. Its default text, JSON, YAML, and structured-log representations are masked; Value must be called explicitly when the application needs the plaintext.

func (Secret) Format

func (Secret) Format(state fmt.State, verb rune)

func (Secret) LogValue

func (Secret) LogValue() slog.Value

func (Secret) MarshalJSON

func (Secret) MarshalJSON() ([]byte, error)

func (Secret) MarshalYAML

func (Secret) MarshalYAML() (any, error)

func (Secret) String

func (Secret) String() string

func (*Secret) UnmarshalJSON

func (s *Secret) UnmarshalJSON(data []byte) error

func (*Secret) UnmarshalYAML

func (s *Secret) UnmarshalYAML(node *yaml.Node) error

func (Secret) Value

func (s Secret) Value() string

Jump to

Keyboard shortcuts

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