config

package
v0.0.0-...-0f898fb Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIfEmpty

func DefaultIfEmpty(value, defaultValue string) string

Types

type Env

type Env struct {
	// Server Environment
	Environment string `name:"env"`
	// Server variables
	Host string `name:"host"`
	Port string `name:"port"`
	// GraphiQLEnable variables
	GraphiQLEnable bool `name:"graphiql_enable"`
	// MongoDB
	MongoDatabase string `name:"mongo_database"`
	DBHost        string `name:"db_host"`
	DBPort        string `name:"db_port"`
	DBUser        string `name:"db_user"`
	DBPass        string `name:"db_pass"`
	DBName        string `name:"db_name"`
	// MongoDB collection
	DBUserCOL string `name:"db_user_col"`
	// JWT
	AccessTokenExpiryHour  string `name:"access_token_expiry_hour"`
	RefreshTokenExpiryHour string `name:"refresh_token_expiry_hour"`
	AccessTokenSecret      string `name:"access_token_secret"`
	RefreshTokenSecret     string `name:"refresh_token_secret"`
}

Env is return results for constants

func EnvInit

func EnvInit() (Env, error)

New return all constants using in Project such as Dialogflow's ProjectID, Line's ChannelID

Jump to

Keyboard shortcuts

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