config

package
v0.0.0-...-0a842c9 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		HTTP *Server `validate:"required"`
	} `validate:"required"`
	Database *Database `validate:"required"`
}

Config struct

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig creates a new configurator

type Database

type Database struct {
	Driver   string `validate:"required"`
	Host     string `validate:"required"`
	Port     string `validate:"required"`
	Username string `validate:"required"`
	Password string `validate:"required"`
	Database string `validate:"required"`
}

Database config struct

type Server

type Server struct {
	Host string `validate:"required"`
}

Server config struct

Jump to

Keyboard shortcuts

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