config

package
v0.0.0-...-16d7efa Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Values = Config{}

Values holds the application configuration.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server  ServerConfig
	Library LibraryConfig
	NATS    NATSConfig
	Redis   redisConf
}

Config represents the application configuration structure.

type LibraryConfig

type LibraryConfig struct {
	// Internal URL of the library
	InternalURL string `env:"LIBRARY_URL,required"`
}

LibraryConfig holds the library related configuration.

type NATSConfig

type NATSConfig struct {
	// NATS cluster ID
	ClusterID string `env:"NATS_CLUSTER_ID,required"`
	// NATS client ID
	ClientID string `env:"NATS_CLIENT_ID,required"`
	// NATS URL
	URL string `env:"NATS_URL,required"`
}

NATSConfig holds the NATS related configuration.

type ServerConfig

type ServerConfig struct {
	// Server port
	Port string `env:"SERVER_PORT,required"`
	// Server read timeout
	TimeoutRead time.Duration `env:"SERVER_TIMEOUT_READ,required"`
	// Server write timeout
	TimeoutWrite time.Duration `env:"SERVER_TIMEOUT_WRITE,required"`
	// Server idle timeout
	TimeoutIdle time.Duration `env:"SERVER_TIMEOUT_IDLE,required"`
}

ServerConfig holds the server related configuration.

Jump to

Keyboard shortcuts

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