config

package
v0.0.0-...-0011e7b Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package config provides connection with environment configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tracer            trace.Config
	ServiceName       string `env:"SERVICE_NAME,default=wallet-server"`
	AppEnv            string `env:"APP_ENV,default=development"`
	Port              string `env:"PORT,default=8004"`
	PrometheusPort    string `env:"PROMETHEUS_PORT,default=7004"`
	Username          string `env:"USERNAME,default=wallet-user"`
	Password          string `env:"PASSWORD,default=wallet-password"`
	AppliedAuthBearer string `env:"APPLIED_AUTH_BEARER"`
	AppliedAuthBasic  string `env:"APPLIED_AUTH_BASIC"`
	SecretKey         string `env:"TOKEN_SECRET_KEY,required"`
	Redis             Redis
	Postgres          sdkpg.Config
}

Config holds configuration for the project.

func NewConfig

func NewConfig(env string) (*Config, error)

NewConfig creates an instance of Config. It needs the path of the env file to be used.

type Redis

type Redis struct {
	Address string `env:"REDIS_ADDRESS,default=localhost:6379"`
}

Redis holds configuration for Redis.

Jump to

Keyboard shortcuts

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