config

package
v0.0.0-...-c3afde3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: BSD-3-Clause Imports: 4 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 {
	ServiceName    string `env:"SERVICE_NAME,default=auth-server"`
	AppEnv         string `env:"APP_ENV,default=development"`
	Port           string `env:"PORT,default=8002"`
	PrometheusPort string `env:"PROMETHEUS_PORT,default=7002"`
	Keycloak       Keycloak
	Tracer         trace.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 Keycloak

type Keycloak struct {
	Address string `env:"KEYCLOAK_ADDRESS,default=http://localhost:8080/"`
	Realm   string `env:"KEYCLOAK_REALM,required"`
	Timeout int    `env:"KEYCLOAK_TIMEOUT_SECONDS,default=5"`
}

Keycloak holds configuration for Keycloak.

Jump to

Keyboard shortcuts

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