config

package
v0.0.0-...-b144089 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 3 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 {
	Host               string `envconfig:"HOST" default:"0.0.0.0"`
	Port               int    `envconfig:"PORT" default:"8080"`
	CORSAllowedOrigins string `envconfig:"CORS_ALLOWED_ORIGINS"`
	GraphiQLEnabled    bool   `envconfig:"GRAPHIQL_ENABLED" default:"false"`
	SchemaRoot         string `envconfig:"SCHEMA_ROOT" default:"../../"`
}

func Load

func Load() (Config, error)

Load attempts to read all config vars and return the struct or an error.

func MustLoad

func MustLoad() Config

MustLoad will Load all config vars or cause a fatal exit.

Jump to

Keyboard shortcuts

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