configure

package
v0.0.0-...-870ec01 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = ServerCfg{}
View Source
var Config = viper.New()
View Source
var NodeName string = os.Getenv("NODE_NAME")

Capture environment variables

View Source
var PodIP string = os.Getenv("POD_IP")
View Source
var PodName string = os.Getenv("POD_NAME")

Functions

func BindEnvs

func BindEnvs(config *viper.Viper, iface interface{}, parts ...string)

Types

type ServerCfg

type ServerCfg struct {
	Level      string `mapstructure:"level" json:"level"`
	ConfigFile string `mapstructure:"config_file" json:"config_file"`

	RedisURI string `mapstructure:"redis_uri" json:"redis_uri"`
	MongoURI string `mapstructure:"mongo_uri" json:"mongo_uri"`
	MongoDB  string `mapstructure:"mongo_db" json:"mongo_db"`

	ConnURI  string `mapstructure:"conn_uri" json:"conn_uri"`
	ConnType string `mapstructure:"conn_type" json:"conn_type"`

	WebsiteURL   string `mapstructure:"website_url" json:"website_url"`
	CookieDomain string `mapstructure:"cookie_domain" json:"cookie_domain"`
	CookieSecure string `mapstructure:"cookie_secure" json:"cookie_secure"`

	TwitchClientID     string `mapstructure:"twitch_client_id" json:"twitch_client_id"`
	TwitchRedirectURI  string `mapstructure:"twitch_redirect_uri" json:"twitch_redirect_uri"`
	TwitchClientSecret string `mapstructure:"twitch_client_secret" json:"twitch_client_secret"`

	TempFileStore string `mapstructure:"temp_file_store" json:"temp_file_store"`

	JWTSecret string `mapstructure:"jwt_secret" json:"jwt_secret"`

	AwsAKID      string `mapstructure:"aws_akid" json:"aws_akid"`
	AwsToken     string `mapstructure:"aws_session_token" json:"aws_session_token"`
	AwsSecretKey string `mapstructure:"aws_secret_key" json:"aws_secret_key"`
	AwsCDNBucket string `mapstructure:"aws_cdn_bucket" json:"aws_cdn_bucket"`
	AwsRegion    string `mapstructure:"aws_region" json:"aws_region"`
	AwsEndpoint  string `mapstructure:"aws_endpoint" json:"aws_endpoint"`

	NodeID string `mapstructure:"node_id" json:"node_id"`

	DisableRedisCache bool `mapstructure:"disable_redis_cache" json:"disable_redis_cache"`

	GqlSniffer string `mapstructure:"gql_sniffer" json:"gql_sniffer"`

	ExitCode int `mapstructure:"exit_code" json:"exit_code"`
}

Jump to

Keyboard shortcuts

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