app

package
v0.0.0-...-ac3ec41 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package app provide up layer application

Index

Constants

View Source
const (
	DefaultConfigFilename = "/config/config.yml"
	AppConfigFileName     = "APP_CONFIG_FILENAME"
)

Variables

This section is empty.

Functions

func NewApp

func NewApp() (*app, error)

Types

type Config

type Config struct {
	Name string          `yaml:"name" env:"NAME" envDefault:"test-player"`
	Env  string          `yaml:"env" env:"ENV" envDefault:"development"`
	PG   postgres.Config `yaml:"postgres" env:"postgres"`
	HTTP struct {
		Port string `yaml:"port" env:"PORT" envDefault:"8080"`
	} `yaml:"http" env:"http"`

	Redis struct {
		Host string `yaml:"host" env:"REDIS_HOST" envDefault:"redis"`
		Port string `yaml:"port" env:"REDIS_PORT" envDefault:"6379"`
	} `yaml:"redis" env:"REDIS"`

	Nats struct {
		Host string `yaml:"host" env:"NATS_HOST" envDefault:"nats"`
		Port string `yaml:"port" env:"NATS_PORT" envDefault:"4222"`
	} `yaml:"nats" env:"nats"`

	Log logger.Config `yaml:"log" env:"LOG"`
}

func NewConfig

func NewConfig() (*Config, error)

Jump to

Keyboard shortcuts

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