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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = New()

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.

func (*Config) DSN

func (c *Config) DSN() string

DSN for PostgreSQL.

type DB

type DB struct {
	Addr     string `envconfig:"TYPHOON_DB_ADDR" default:"host.docker.internal"`
	Username string `envconfig:"TYPHOON_DB_USERNAME" default:"root"`
	Password string `envconfig:"TYPHOON_DB_PASSWORD" default:""`
	Database string `envconfig:"TYPHOON_DB_DATABASE" default:"defaultdb"`
	Port     int    `envconfig:"TYPHOON_DB_PORT" default:"26257"`
	SslMode  string `envconfig:"TYPHOON_DB_SSL_MODE" default:"disable"`
}

DB ...

type Flags

type Flags struct {
	Addr string `envconfig:"TYPHOON_ADDR" default:":8084"`
	DB   *DB
}

Flags contains the command line flags.

func NewFlags

func NewFlags() *Flags

NewFlags ...

Jump to

Keyboard shortcuts

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