config

package
v0.0.0-...-7646934 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Username string `env-required:"true" yaml:"username" env:"USERNAME"`
	Password string `env-required:"true" yaml:"password" env:"PASSWORD"`
}

type App

type App struct {
	Name    string `env-required:"true" yaml:"name"    env:"APP_NAME"`
	Version string `env-required:"true" yaml:"version" env:"APP_VERSION"`
	ApiKey  string `env-required:"true" yaml:"api_key" env:"APP_API_KEY"`
}

App -.

type Config

type Config struct {
	App                    `yaml:"app"`
	HTTP                   `yaml:"http"`
	Log                    `yaml:"logger"`
	Admin                  `yaml:"admin"`
	Schedule               `yaml:"schedule"`
	TheHillAdminProject    `yaml:"the_hill_admin"`
	TheHillCustomerProject `yaml:"the_hill_customer"`
	TheHillStoreProject    `yaml:"the_hill_store"`
}

Config -.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns app config.

type HTTP

type HTTP struct {
	Port string `env-required:"true" yaml:"port" env:"HTTP_PORT"`
}

HTTP -.

type Log

type Log struct {
	Level string `env-required:"true" yaml:"log_level" env:"LOG_LEVEL"`
}

Log -.

type Schedule

type Schedule struct {
	Period int `env-required:"true" env:"SCHEDULE_PERIOD"`
}

type TheHillAdminProject

type TheHillAdminProject struct {
	Name string `env-required:"true" yaml:"name" env:"THE_HILL_ADMIN_NAME"`
}

type TheHillCustomerProject

type TheHillCustomerProject struct {
	Name string `env-required:"true" yaml:"name" env:"THE_HILL_CUSTOMER_NAME"`
}

type TheHillStoreProject

type TheHillStoreProject struct {
	Name string `env-required:"true" yaml:"name" env:"THE_HILL_STORE_NAME"`
}

Jump to

Keyboard shortcuts

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