config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config provides configuration structures for the web server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	BaseURL       string `json:"base_url" default:"http://localhost:8080"`
	TimeoutSec    int    `json:"timeout_sec" default:"10"`
	MaxRetries    int    `json:"max_retries" default:"3"`
	RetryDelaySec int    `json:"retry_delay_sec" default:"1"`
}

ClientConfig holds the configuration for the API client

type ConfigParams

type ConfigParams struct {
	fx.In

	Logger log.Logger
}

ConfigParams contains the parameters needed for configuration

type ConfigResult

type ConfigResult struct {
	fx.Out

	ServerConfig ServerConfig
	ClientConfig ClientConfig
}

ConfigResult contains the configuration output

func NewConfig

func NewConfig(p ConfigParams) (ConfigResult, error)

NewConfig creates a new web configuration

type ServerConfig

type ServerConfig struct {
	Address string `json:"address" default:":8080"`
}

ServerConfig holds the configuration for the HTTP server

Jump to

Keyboard shortcuts

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