config

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = "skale-indexer"
	Version   string
	GitSHA    string
	Timestamp string
)

Functions

func FromEnv

func FromEnv(config *Config) error

FromEnv reads the config from environment variables

func FromFile

func FromFile(path string, config *Config) error

FromFile reads the config from a file

func IdentityString

func IdentityString() string

IdentityString returns the full app version string

Types

type Config

type Config struct {
	DatabaseURL string `json:"database_url" envconfig:"DATABASE_URL" required:"true"`
	AppEnv      string `json:"app_env" envconfig:"APP_ENV" default:"development"`
}

Jump to

Keyboard shortcuts

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