config

package
v0.0.0-...-36d9c54 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName        = "go-microservice-users"
	AppPort        = ":8080"
	AppContextPath = "/users"
	TokenAudience  = "https://something.com.ar"
)

App configuration

Variables

View Source
var (
	// Database
	DBDataConnection = database.DBDataConnection{
		Host:        env.GetEnvOr("DB_HOST", "localhost"),
		Port:        env.GetEnvOr("DB_PORT", "5432"),
		DBName:      env.GetEnvOr("DB_NAME", "db_dummy"),
		User:        env.GetEnvOr("DB_USER", "admin"),
		Password:    env.GetEnvOr("DB_PASSWORD", "admin"),
		ShowSQLInfo: true,
	}

	// Tracing server configuration
	TracingHost = env.GetEnvOr("TRACING_HOST", "http://localhost:4318")

	// Swagger configuration
	SwaggerEnabled = env.GetEnvOr("SWAGGER_ENABLED", true)

	// Security
	TokenDuration = env.GetEnvOr("JWT_DURATION", 300)

	TokenConfig = security.TokenConfig{
		SecretKey: env.GetEnvOr("JWT_SECRET_KEY", []byte("secret-key")),
		Issuer:    env.GetEnvOr("JWT_ISSUER", "https://users.com"),
		Enabled:   true,
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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