config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 8 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"`
	Insecure bool
}

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"`
	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