config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(configPath string, config interface{}) error

Types

type App

type App struct {
	Port int32
}

type Config

type Config struct {
	App      App      `yaml:"app" validate:"required"`
	Logger   Logger   `yaml:"logger" validate:"required"`
	Database Database `yaml:"database" validate:"required"`
}

func NewConfig

func NewConfig() Config

type Database

type Database struct {
	File string `yaml:"file"`
}

type Logger

type Logger struct {
	IsDevMode bool   `yaml:"isDevMode"`
	Level     string `yaml:"level"`
}

Jump to

Keyboard shortcuts

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