config

package
v0.0.0-...-91ee7f2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 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
	Temporal                    Temporal
	AppliedAuthBasic            string `env:"APPLIED_AUTH_BASIC"`
	WalletServiceHost           string `env:"WALLET_SERVICE_HOST,required"`
	ServiceName                 string `env:"SERVICE_NAME,default=user-server"`
	AppEnv                      string `env:"APP_ENV,default=development"`
	Port                        string `env:"PORT,default=8001"`
	PrometheusPort              string `env:"PROMETHEUS_PORT,default=7001"`
	AuthServiceHost             string `env:"AUTH_SERVICE_HOST,required"`
	Username                    string `env:"USERNAME,default=user-user"`
	WalletServiceUsername       string `env:"WALLET_SERVICE_USERNAME"`
	Password                    string `env:"PASSWORD,default=user-password"`
	Redis                       Redis
	AppliedAuthBearer           string `env:"APPLIED_AUTH_BEARER"`
	SecretKey                   string `env:"TOKEN_SECRET_KEY,required"`
	WalletServicePassword       string `env:"WALLET_SERVICE_PASSWORD"`
	AuthServiceUsername         string `env:"AUTH_SERVICE_USERNAME"`
	AuthServicePassword         string `env:"AUTH_SERVICE_PASSWORD"`
	Postgres                    sdkpg.Config
	RelayerSleepTimeMillisecond int `env:"RELAYER_SLEEP_TIME_MILLISECONDS,default=1000"`
}

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.

type Temporal

type Temporal struct {
	Address string `env:"TEMPORAL_ADDRESS,default=localhost:7233"`
}

Temporal holds configuration for Temporal.

Jump to

Keyboard shortcuts

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