cli

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Config

type Config struct {
	// Env must be local, development, test or production
	Env      string   `env:"ENV" envDefault:"production"`
	Timezone string   `env:"TIMEZONE" envDefault:"Europe/Brussels"`
	Host     string   `env:"HOST"`
	Port     int      `env:"PORT" envDefault:"3000"`
	Admins   []string `env:"ADMINS,notEmpty"`
	Storage  struct {
		Backend string `env:"BACKEND" envDefault:"s3"`
		Conn    string `env:"CONN,notEmpty"`
	} `envPrefix:"STORAGE_"`
	Repo struct {
		Conn string `env:"CONN,notEmpty"`
	} `envPrefix:"REPO_"`
	OIDC struct {
		URL           string `env:"URL,notEmpty"`
		ID            string `env:"ID,notEmpty"`
		Secret        string `env:"SECRET,notEmpty"`
		RedirectURL   string `env:"REDIRECT_URL,notEmpty"`
		UsernameClaim string `env:"USERNAME_CLAIM" envDefault:"preferred_username"`
		NameClaim     string `env:"NAME_CLAIM" envDefault:"name"`
		EmailClaim    string `env:"EMAIL_CLAIM" envDefault:"email"`
	} `envPrefix:"OIDC_"`
	Cookie struct {
		Secret string `env:"SECRET,notEmpty"`
	} `envPrefix:"COOKIE_"`
	MaxFileSize int64 `env:"MAX_FILE_SIZE" envDefault:"2000000000"`
}

func (Config) Addr

func (c Config) Addr() string

type Version added in v1.1.1

type Version struct {
	Branch string `json:"branch" env:"SOURCE_BRANCH"`
	Commit string `json:"commit" env:"SOURCE_COMMIT"`
	Image  string `json:"image" env:"IMAGE_NAME"`
}

Version info

Jump to

Keyboard shortcuts

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