config

package
v0.0.0-...-b7f1bc2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEV     = "dev"
	STAGING = "staging"
	PROD    = "prod"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	General      GeneralConfig
	SentryConfig SentryConfig
}

Config is a service that is designed to provide various configuration to the rest of the application.

type GeneralConfig

type GeneralConfig struct {
	AppEnv string // the environment that the application is running in (dev, prod, etc)
}

GeneralConfig contains general information that the service needs to run.

type New

type New struct{}

New ...

func (*New) Get

func (n *New) Get() Config

Get will return the default config

func (*New) Load

func (n *New) Load()

Load will load the config

type SentryConfig

type SentryConfig struct {
	DSN string
}

SentryConfig contains information that allows us to interact with the Sentry API

type Service

type Service interface {
	// Load will do any config setup (like load env vars)
	Load()
	// Get will get the config
	Get() Config
}

Service is an interface that defines the functions needed to implement a Config Service.

Jump to

Keyboard shortcuts

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