cfg

package
v0.0.0-...-c14c6da Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 4 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 {
	ExternalURL string `env:"EXTERNAL_URL"`

	TLSCertPath string `env:"TLS_CERT_PATH"`
	TLSKeyPath  string `env:"TLS_KEY_PATH"`

	// for Let's Encrypt autocert
	TLSDomain string `env:"TLS_DOMAIN"`

	SSH RunnelConfig `env:"SSH"`

	SQLitePath  string `env:"SQLITE_PATH"`
	BlobsBucket string `env:"BLOBS_BUCKET"`

	GitHubApp GithubAppConfig `env:"GITHUB_APP"`

	Prof struct {
		Port     int    `env:"PORT"`
		FilePath string `env:"FILE_PATH"`
	} `env:"CPU_PROF"`
}

func New

func New() (*Config, error)

type GithubAppConfig

type GithubAppConfig struct {
	ID                int64  `env:"ID"`
	PrivateKeyPath    string `env:"PRIVATE_KEY_PATH"`
	PrivateKeyContent string `env:"PRIVATE_KEY"`
	WebhookSecret     string `env:"WEBHOOK_SECRET"`
}

func (GithubAppConfig) PrivateKey

func (config GithubAppConfig) PrivateKey() ([]byte, error)

type RunnelConfig

type RunnelConfig struct {
	Addr           string `env:"ADDR"`
	HostKeyPath    string `env:"HOST_KEY_PATH"`
	HostKeyContent string `env:"HOST_KEY"`
}

Jump to

Keyboard shortcuts

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