config

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 1 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 {
	Flags *Flags
}

Config ...

func New

func New() *Config

New ...

func (*Config) Cwd

func (c *Config) Cwd() (string, error)

Cwd returns the current working directory.

type DB

type DB struct {
	Addr     string `envconfig:"TYPHOON_DB_ADDR" default:"host.docker.internal"`
	Username string `envconfig:"TYPHOON_DB_USERNAME" default:"example"`
	Password string `envconfig:"TYPHOON_DB_PASSWORD" default:"example"`
	Port     int    `envconfig:"TYPHOON_DB_PORT" default:"5432"`
	Database string `envconfig:"TYPHOON_DB_DATABASE" default:"example"`
}

DB ...

type Flags

type Flags struct {
	Addr string
	Nats *Nats
	DB   *DB
}

Flags contains the command line flags.

func NewFlags

func NewFlags() *Flags

NewFlags ...

type Nats added in v0.1.24

type Nats struct {
	Credentials string `envconfig:"TYPHOON_NATS_CREDENTIALS" default:"sys.creds"`
	Url         string `envconfig:"TYPHOON_NATS_URL" default:"nats://localhost:4222"`
}

Nats ...

Jump to

Keyboard shortcuts

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