config

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() error

func Register

func Register(cfgs ...Configurable)

Types

type Certificate

type Certificate struct {
	CertFile string `envconfig:"SERVER_CERTIFICATE_CERT_FILE"`
	KeyFile  string `envconfig:"SERVER_CERTIFICATE_KEY_FILE"`
	CAFile   string `envconfig:"SERVER_CERTIFICATE_CA_FILE"`
}

type Configurable

type Configurable interface {
	Load() error
}

type Server

type Server struct {
	Mode   string `envconfig:"SERVER_MODE" default:"http"`
	Domain string `envconfig:"SERVER_DOMAIN" default:"example.com"`
	Port   uint   `envconfig:"SERVER_PORT" default:"8080"`
	*Certificate
}

func (*Server) Load

func (c *Server) Load() error

Jump to

Keyboard shortcuts

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