config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyLogLevel                 = "log-level"
	KeyDevMode                  = "dev-mode"
	KeyOTELEnabled              = "otel-enabled"
	KeyOTELCollectorHost        = "otel-collector-host"
	KeyOTELCollectorPort        = "otel-collector-port"
	KeyGitlabHookSecretKey      = "gitlab-hook-secret-key"
	KeyGithubHookSecretKey      = "github-hook-secret-key"
	KeyDefaultTFCOrganization   = "default-tfc-organization"
	KeyWorkspaceAllowList       = "workspace-allow-list"
	KeyWorkspaceDenyList        = "workspace-deny-list"
	KeyAllowAutoMerge           = "allow-auto-merge"
	KeyFailCIOnSentinelSoftFail = "fail-ci-on-sentinel-soft-fail"
	KeyDeleteOldComments        = "delete-old-comments"
	KeyNATSServiceURL           = "nats-service-url"
	KeyGitlabProjectAllowList   = "gitlab-project-allow-list"
	KeyLegacyProjectAllowList   = "project-allow-list"
	KeyGithubRepoAllowList      = "github-repo-allow-list"
	KeyGithubCloneDepth         = "github-clone-depth"
	KeyGitlabCloneDepth         = "gitlab-clone-depth"
)

Variables

This section is empty.

Functions

func Init

func Init()

func RegisterFlags

func RegisterFlags(fs *pflag.FlagSet) error

func Reload

func Reload()

Types

type Config

type Config struct {
	LogLevel                 string   `mapstructure:"log-level"`
	DevMode                  bool     `mapstructure:"dev-mode"`
	OTELEnabled              bool     `mapstructure:"otel-enabled"`
	OTELCollectorHost        string   `mapstructure:"otel-collector-host"`
	OTELCollectorPort        string   `mapstructure:"otel-collector-port"`
	GitlabHookSecretKey      string   `mapstructure:"gitlab-hook-secret-key"`
	GithubHookSecretKey      string   `mapstructure:"github-hook-secret-key"`
	DefaultTFCOrganization   string   `mapstructure:"default-tfc-organization"`
	WorkspaceAllowList       []string `mapstructure:"workspace-allow-list"`
	WorkspaceDenyList        []string `mapstructure:"workspace-deny-list"`
	AllowAutoMerge           bool     `mapstructure:"allow-auto-merge"`
	FailCIOnSentinelSoftFail bool     `mapstructure:"fail-ci-on-sentinel-soft-fail"`
	DeleteOldComments        bool     `mapstructure:"delete-old-comments"`
	NATSServiceURL           string   `mapstructure:"nats-service-url"`
	GitlabProjectAllowList   []string `mapstructure:"gitlab-project-allow-list"`
	LegacyProjectAllowList   []string `mapstructure:"project-allow-list"`
	GithubRepoAllowList      []string `mapstructure:"github-repo-allow-list"`
	GithubCloneDepth         int      `mapstructure:"github-clone-depth"`
	GitlabCloneDepth         int      `mapstructure:"gitlab-clone-depth"`
}
var C Config

func Load

func Load() (Config, error)

type DocumentationOption

type DocumentationOption struct {
	EnvVars      []string
	Flag         string
	Description  string
	DefaultValue string
}

func DocumentationOptions

func DocumentationOptions() []DocumentationOption

Jump to

Keyboard shortcuts

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