Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HTTPServerAddrEnv is an environment variable name for HTTP server address HTTPServerAddrEnv = "HTTP_SERVER_ADDR" // DefaultHTTPServerAddr is a default value for HTTP server address DefaultHTTPServerAddr = ":8000" )
View Source
const ( // LogLevelEnv is an environment variable name for LOG_LEVEL LogLevelEnv = "LOG_LEVEL" // EnableJSONLogsEnv is an environment variable name for ENABLE_JSON_LOGS EnableJSONLogsEnv = "ENABLE_JSON_LOGS" // DefaultLogLevel is a default LOG_LEVEL value DefaultLogLevel = 0 )
Variables ¶
This section is empty.
Functions ¶
func InitializeBuildInfo ¶
InitializeBuildInfo creates new build.Info
func InitializeHTTPServer ¶
func InitializeHTTPServer(cfg *HTTPServerConfig) (*http.Server, error)
InitializeHTTPServer create new http.Server instance
func InitializeRouter ¶
func InitializeRouter(container *dependencies.Container) *gin.Engine
InitializeRouter initializes new gin router
Types ¶
type HTTPServerAddr ¶
type HTTPServerAddr string
HTTPServerAddr is a type alias for HTTP server address values
type HTTPServerConfig ¶
type HTTPServerConfig struct { HTTPServerAddr HTTPServerAddr Router *gin.Engine }
HTTPServerConfig is a type to store HTTP server config
func InitializeHTTPServerConfig ¶
func InitializeHTTPServerConfig(router *gin.Engine) *HTTPServerConfig
InitializeHTTPServerConfig initializes new config for InitializeHTTPServer
Click to show internal directories.
Click to hide internal directories.