config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env               string `env:"GO_ENV" envDefault:"production"`
	Port              int    `env:"PORT" envDefault:"80"`
	DBHost            string `env:"DB_HOST" envDefault:"db"`
	DBPort            int    `env:"DB_PORT" envDefault:"3306"`
	DBUser            string `env:"DB_USER" envDefault:"admin"`
	DBPassword        string `env:"DB_PASSWORD" envDefault:"password"`
	DBName            string `env:"DB_NAME" envDefault:"point_app"`
	RedisHost         string `env:"REDIS_HOST" envDefault:"cache"`
	RedisPort         int    `env:"REDIS_PORT" envDefault:"6379"`
	AWSEndpoint       string `env:"AWS_ENDPOINT" envDefault:""`
	AWSId             string `env:"AWS_ACCESS_KEY_ID" envDefault:"accesskey"`
	AWSSecret         string `env:"AWS_SECRET_KEY" envDefault:"secretkey"`
	AWSRegion         string `env:"AWS_REGION" envDefault:"ap-northeast-1"`
	SenderMailAddress string `env:"SENDER_MAIL_ADDRESS" envDefault:"sample@sample.com"`
	FrontEndpoint     string `env:"FRONT_ENDPOINT" envDefault:"http://localhost:3000"`
}

func New

func New() (*Config, error)

環境変数の構造体を返却

@return *Config 環境変数の構造体

@return error エラー

Jump to

Keyboard shortcuts

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