config

package
v0.0.0-...-efbd42f Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package config implement a simple configuration package. It define a type Configuration that represent the aplication configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	JobID    string `env:"JOB_ID,required"`
	LogLevel string `env:"LOG_LEVEL,default=INFO"`
}

Configuration is the configuration for the job

func New

func New(ctx context.Context) (*Configuration, error)

New creates a default configuration with the values from .env file and environment variables.

type NotionalConfiguration

type NotionalConfiguration struct {
	Environment     string `env:"ENVIRONMENT,required"`
	CoingeckoURL    string `env:"COINGECKO_URL,required"`
	CacheURL        string `env:"CACHE_URL,required"`
	CachePrefix     string `env:"CACHE_PREFIX,required"`
	NotionalChannel string `env:"NOTIONAL_CHANNEL,required"`
	P2pNetwork      string `env:"P2P_NETWORK,required"`
}

func NewNotionalConfiguration

func NewNotionalConfiguration(ctx context.Context) (*NotionalConfiguration, error)

New creates a notional configuration with the values from .env file and environment variables.

type TransferReportConfiguration

type TransferReportConfiguration struct {
	MongoURI      string `env:"MONGODB_URI,required"`
	MongoDatabase string `env:"MONGODB_DATABASE,required"`
	PageSize      int64  `env:"PAGE_SIZE,default=100"`
	PricesPath    string `env:"PRICES_PATH,required"`
	OutputPath    string `env:"OUTPUT_PATH,required"`
}

func NewTransferReportConfiguration

func NewTransferReportConfiguration(ctx context.Context) (*TransferReportConfiguration, error)

New creates a transfer report configuration with the values from .env file and environment variables.

Jump to

Keyboard shortcuts

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