config

package
v0.0.0-...-43e3506 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DevMode         bool
	ShutdownTimeout Duration
	HttpServer      *HttpServerConfig
}

func NewDefaultConfig

func NewDefaultConfig() *Config

func (*Config) LoadFromToml

func (c *Config) LoadFromToml(path string) error

func (Config) WriteToml

func (c Config) WriteToml(path string, perm fs.FileMode) error

type Duration

type Duration struct {
	// contains filtered or unexported fields
}

func MakeDuration

func MakeDuration(d time.Duration) Duration

func ParseDuration

func ParseDuration(s string) (Duration, error)

func (Duration) Duration

func (d Duration) Duration() time.Duration

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(input []byte) error

type HttpServerConfig

type HttpServerConfig struct {
	Address string
	Port    uint16
}

Jump to

Keyboard shortcuts

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