# Functions

GetEnv retrieves the value of an environment variable or returns a default value if the environment variable is not set.
No description provided by the author
NewField creates a new configuration field.
NewHTTPServerConfig creates a new server configuration.
NewLogConfig creates a new logger configuration.
No description provided by the author
ParseEnvVars reads the configuration from environment variables and sets the values in the configuration by calling the ParseEnvVars method of each configuration struct.
Validate validates the configuration values by calling the Validate method of each configuration struct and returns the first error encountered.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultHTTPServerAddress is the default address for the server.
DefaultHTTPServerCorsAllowCredentials is the default value for allowing credentials.
DefaultHTTPServerCorsAllowedHeaders is the default value for allowed headers.
DefaultHTTPServerCorsAllowedMethods is the default value for allowed methods.
allow all origins.
DefaultHTTPServerCorsEnabled is the default value for enabling CORS If enabled, the server will use the following values for CORS - AllowedOrigins: "*" - AllowedMethods: "GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD" - AllowedHeaders: "Accept, Content-Type, Content-Length, Accept-Encoding, Authorization, X-CSRF-Token, X-Requested-With, X-Api-Version" Remember to change the values if you need to restrict the allowed origins, methods or headers.
DefaultHTTPServerPort is the default port for the server.
DefaultHTTPServerPprofEnabled is the default value for enabling pprof.
DefaultHTTPServerShutdownTimeout is the default time to wait for the server to shutdown.
DefaultHTTPServerTLSEnabled is the default value for enabling TLS.
DefaultLogFormat is the default log format.
DefaultLogLevel is the default log level.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

DefaultHTTPServerCertificateFile is the default certificate file for the server DefaultHTTPServerCertificateFile = "tls.crt".
DefaultHTTPServerPrivateKeyFile is the default private key file for the server DefaultHTTPServerPrivateKeyFile = "tls.key".
DefaultLogOutput is the default log output destination.
ErrInvalidConnMaxIdleTime is returned when an invalid connection max idle time is provided.
ErrInvalidConnMaxLifetime is returned when an invalid connection max lifetime is provided.
ErrInvalidDatabaseKind is returned when an invalid database kind is provided.
ErrInvalidDatabaseName is returned when an invalid database name is provided.
ErrInvalidDatabasePort is returned when an invalid database port is provided.
ErrInvalidAddress is the error for invalid server address.
ErrInvalidCorsAllowedHeaders is the error for invalid CORS allowed headers.
ErrInvalidCorsAllowedMethods is the error for invalid CORS allowed methods.
ErrInvalidCorsAllowedOrigins is the error for invalid CORS allowed origins.
ErrInvalidPort is the error for invalid server port.
ErrInvalidShutdownTimeout is the error for invalid server shutdown timeout.
ErrInvalidLogFormat is the error for invalid log format.
ErrInvalidLogLevel is the error for invalid log level.
ErrInvalidMaxIdleConns is returned when an invalid max idle connections is provided.
ErrInvalidMaxOpenConns is returned when an invalid max open connections is provided.
ErrInvalidMaxPingTimeout is returned when an invalid max ping timeout is provided.
ErrInvalidMaxQueryTimeout is returned when an invalid max query timeout is provided.
ErrInvalidMetricExporter is the error for invalid exporter.
ErrInvalidMetricInterval is the error for invalid metric interval.
ErrInvalidMetricPort is the error for invalid metric port.
ErrInvalidPassword is returned when an invalid password is provided.
ErrInvalidSampling is the error for invalid sampling.
ErrInvalidSSLMode is returned when an invalid SSL mode is provided.
ErrInvalidTimeZone is returned when an invalid timezone is provided.
ErrInvalidTraceExporter is the error for invalid exporter.
ErrInvalidTracePort is the error for invalid trace port.
ErrInvalidUsername is returned when an invalid username is provided.

# Structs

No description provided by the author
Field is a generic configuration field for structs.
FileVar is a custom flag type for files This should implement the Value interface of the flag package Reference: https://pkg.go.dev/gg-scm.io/tool/internal/flag#FlagSet.Var.
HTTPServerConfig is the configuration for the server.
LogConfig is the configuration for the logger.
No description provided by the author

# Interfaces

EnvVarsParser is an interface for parsing configuration values from environment variables Implement this interface for configuration structs and add the parsing logic in the ParseEnvVars method.
Validator is an interface for validating configuration values Implement this interface for configuration structs and add the validation logic in the Validate method.