config

package
v0.0.0-...-f97ce34 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductionKey = "production"
	DevKey        = "dev"
	StageKey      = "stage"
	Type          = "yaml"
	Path          = "./config"

	CheckEnvKey = "ENV"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Dev      bool
	FrontEnd string
}

type Config

type Config struct {
	App    App
	DB     DB
	Server Server
	Redis  Redis
	SMSC   SMSC
	Email  Email
	Oauth2
}

func NewConfig

func NewConfig() (*Config, error)

type DB

type DB struct {
	Net      string
	Driver   string
	DBName   string
	Username string `json:"-"`
	Password string `json:"-"`
	Host     string
	Port     string
	Timeout  int
}

type Email

type Email struct {
	ServerAddress string
	Port          string
	Login         string `json:"-"`
	Password      string `json:"-"`
	From          string
}

type Oauth2

type Oauth2 struct {
	Google   oauth2.Config
	Facebook oauth2.Config
}

type Redis

type Redis struct {
	Host string
	Port int
}

type SMSC

type SMSC struct {
	Pwd   string `json:"-"`
	Login string `json:"-"`
	Cost  string
	Fmt   string
	Dev   bool
}

type Server

type Server struct {
	Port int
}

Jump to

Keyboard shortcuts

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