config

package
v0.0.0-...-0af54a0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName service.Name = "config"

Variables

This section is empty.

Functions

func Dump

func Dump(config *Config, w io.Writer) error

func ServiceProvider

func ServiceProvider(config *Config) service.Provider

Types

type Config

type Config struct {
	Debug bool
	HTTP  HTTPConfig
	Gitea GiteaConfig
	Data  DataConfig
}

func From

func From(container *service.Container) (*Config, error)

From retrieves the config service in the given container

func Must

func Must(container *service.Container) *Config

Must retrieves the config service in the given container or panic otherwise

func NewDefault

func NewDefault() *Config

func NewFromFile

func NewFromFile(filepath string) (*Config, error)

NewFromFile retrieves the configuration from the given file

type DataConfig

type DataConfig struct {
	DBPath string
}

type GiteaConfig

type GiteaConfig struct {
	ClientID     string
	ClientSecret string
	RedirectURL  string
	LogoutURL    string
	AuthURL      string
	TokenURL     string
	Scopes       []string
	APIBaseURL   string
}

type HTTPConfig

type HTTPConfig struct {
	Address   string
	PublicDir string
}

Jump to

Keyboard shortcuts

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