config

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Address string `ignored:"true"`
}

type Config

type Config struct {
	Debug    bool `envconfig:"GITEA_DEBUG"`
	Trace    bool `envconfig:"GITEA_TRACE"`
	Client   Client
	Runner   Runner
	Platform Platform
}

Config provides the system configuration.

func FromEnviron

func FromEnviron() (Config, error)

FromEnviron returns the settings from the environment.

type Platform

type Platform struct {
	OS   string `envconfig:"GITEA_PLATFORM_OS"`
	Arch string `envconfig:"GITEA_PLATFORM_ARCH"`
}

type Runner

type Runner struct {
	UUID         string            `ignored:"true"`
	Name         string            `envconfig:"GITEA_RUNNER_NAME"`
	Token        string            `ignored:"true"`
	RunnerWorker []string          `envconfig:"GITEA_RUNNER_WORKER"`
	Capacity     int               `envconfig:"GITEA_RUNNER_CAPACITY" default:"1"`
	File         string            `envconfig:"GITEA_RUNNER_FILE" default:".runner"`
	Environ      map[string]string `envconfig:"GITEA_RUNNER_ENVIRON"`
	EnvFile      string            `envconfig:"GITEA_RUNNER_ENV_FILE"`
	Labels       []string          `envconfig:"GITEA_RUNNER_LABELS"`
}

Jump to

Keyboard shortcuts

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