config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 8 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 {
	AllowedOrigins []string `env:"ALLOWED_ORIGINS,default=*"`
	ListenAddress  string   `env:"LISTEN,default=:8081"`

	MongoURL string `env:"MONGO_URL,required"`
	Database string `env:"DATABASE,default=cis"`
}

func LoadConfig

func LoadConfig(ctx context.Context) (*Config, error)

func (*Config) ConfigureProviders

func (cfg *Config) ConfigureProviders(ctx context.Context, catalog discovery.Discoverer) (*Providers, error)

type Providers

type Providers struct {
	*Config

	Repo     *repo.Repo
	Resolver *resolver.Resolver
	Watcher  *watcher.Watcher

	Catalog discovery.Discoverer
}

Jump to

Keyboard shortcuts

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