config

package
v0.0.0-...-a5734bc Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BetterContactConfig

type BetterContactConfig struct {
	Url         string `env:"BETTER_CONTACT_API_URL" required:"true"`
	ApiKey      string `env:"BETTER_CONTACT_API_KEY" required:"true"`
	CallbackUrl string `env:"BETTER_CONTACT_CALLBACK_URL" required:"true"`
}

type BrandfetchConfig

type BrandfetchConfig struct {
	Url     string `env:"BRANDFETCH_API_URL"`
	Limit   int    `env:"BRANDFETCH_LIMIT" envDefault:"250"`
	TtlDays int    `env:"BRANDFETCH_TTL_DAYS" envDefault:"180" required:"true"`
}

type Config

type Config struct {
	ApiPort             string `env:"PORT" envDefault:"10007" validate:"required"`
	MetricsPort         string `env:"PORT_METRICS" envDefault:"10007" validate:"required"`
	Logger              logger.Config
	PostgresConfig      config.PostgresConfig
	PostgresAsyncConfig config.PostgresAsyncConfig
	Neo4j               config.Neo4jConfig
	Jaeger              tracing.JaegerConfig
	Metrics             metrics.Config
	BetterContactConfig BetterContactConfig
	BrandfetchConfig    BrandfetchConfig
	ScrapinConfig       ScrapinConfig
	SnitcherConfig      SnitcherConfig
}

func InitConfig

func InitConfig() (*Config, error)

type ScrapinConfig

type ScrapinConfig struct {
	Url     string `env:"SCRAPIN_API_URL" envDefault:"https://api.scrapin.io" required:"true"`
	ApiKey  string `env:"SCRAPIN_API_KEY" required:"true"`
	TtlDays int    `env:"SCRAPIN_TTL_DAYS" envDefault:"90" required:"true"`
}

type SnitcherConfig

type SnitcherConfig struct {
	Url    string `env:"SNITCHER_API_URL" required:"true" envDefault:"https://app.snitcher.com/api"`
	ApiKey string `env:"SNITCHER_API_KEY" required:"true"`
}

Jump to

Keyboard shortcuts

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