config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	AgoraAppCertificate string `yaml:"agora_app_certificate" envconfig:"AGORA_APP_CERTIFICATE"`
	RenderInternalURL   string `yaml:"render_internal_url" envconfig:"RENDER_INTERNAL_URL"`
	MnemonicPhrase      string `yaml:"mnemonic_phrase" envconfig:"MNEMONIC_PHRASE"`
}

func (*Common) Init

func (x *Common) Init()

type Config

type Config struct {
	Common     Common     `yaml:"common"`
	Settings   Local      `yaml:"settings"`
	Postgres   Postgres   `yaml:"postgres"`
	Influx     Influx     `yaml:"influx"`
	UIClient   UIClient   `yaml:"ui_client"`
	Streamchat Streamchat `yaml:"streamchat"`
}

Config : structure to hold configuration

func GetConfig

func GetConfig() *Config

GetConfig : get config file

func (*Config) Init

func (x *Config) Init()

type Influx

type Influx struct {
	URL    string `yaml:"url" envconfig:"INFLUXDB_URL"`
	ORG    string `yaml:"org" envconfig:"INFLUXDB_ORG"`
	BUCKET string `yaml:"bucket" envconfig:"INFLUXDB_BUCKET"`
	TOKEN  string `yaml:"token" envconfig:"INFLUXDB_TOKEN"`
}

func (*Influx) Init

func (x *Influx) Init()

type Local

type Local struct {
	Address          string `yaml:"bind_address" envconfig:"UBERCONTROLLER_BIND_ADDRESS"`
	Port             uint   `yaml:"bind_port" envconfig:"UBERCONTROLLER_BIND_PORT"`
	LogLevel         int    `yaml:"loglevel"  envconfig:"UBERCONTROLLER_LOGLEVEL"`
	ExtensionStorage string `yaml:"storage"  envconfig:"UBERCONTROLLER_STORAGE"`
}

func (*Local) Init

func (x *Local) Init()

type Postgres

type Postgres struct {
	DATABASE string `yaml:"database" envconfig:"DB_DATABASE"`
	HOST     string `yaml:"host" envconfig:"PGDB_HOST"`
	PORT     uint   `yaml:"port" envconfig:"DB_PORT"`
	USERNAME string `yaml:"username" envconfig:"DB_USERNAME"`
	PASSWORD string `yaml:"password" envconfig:"DB_PASSWORD"`
	MAXCONNS uint   `yaml:"max_conns" envconfig:"DB_MAX_CONNS"`
}

func (*Postgres) GenConfig

func (x *Postgres) GenConfig(log *zap.Logger) (*pgxpool.Config, error)

func (*Postgres) Init

func (x *Postgres) Init()

func (*Postgres) MinVersion

func (x *Postgres) MinVersion() *Postgres

type Streamchat

type Streamchat struct {
	APIKey    string `yaml:"key" envconfig:"STREAMCHAT_KEY"`
	APISecret string `yaml:"secret" envconfig:"STREAMCHAT_SECRET"`
}

func (*Streamchat) Init

func (s *Streamchat) Init()

type UIClient

type UIClient struct {
	AgoraAppID                    string `yaml:"agora_app_id" json:"AGORA_APP_ID" envconfig:"AGORA_APP_ID"`
	BlockchainWsServer            string `yaml:"blockchain_ws_server" json:"BLOCKCHAIN_WS_SERVER" envconfig:"BLOCKCHAIN_WS_SERVER"`
	FrontendURL                   string `yaml:"frontend_url" json:"-" envconfig:"FRONTEND_URL"`
	NFTAdminAddress               string `yaml:"nft_admin_address" json:"NFT_ADMIN_ADDRESS" envconfig:"NFT_ADMIN_ADDRESS"`
	NFTCollectionOdysseyID        string `yaml:"nft_collection_odyssey_id" json:"NFT_COLLECTION_ODYSSEY_ID" envconfig:"NFT_COLLECTION_ODYSSEY_ID"`
	StreamchatKey                 string `yaml:"streamchat_key" json:"STREAMCHAT_KEY" envconfig:"STREAMCHAT_KEY"`
	UnityClientStreamingAssetsURL string `` /* 127-byte string literal not displayed */
	UnityClientCompanyName        string `yaml:"unity_client_company_name" json:"UNITY_CLIENT_COMPANY_NAME" envconfig:"UNITY_CLIENT_COMPANY_NAME"`
	UnityClientProductName        string `yaml:"unity_client_product_name" json:"UNITY_CLIENT_PRODUCT_NAME" envconfig:"UNITY_CLIENT_PRODUCT_NAME"`
	UnityClientProductVersion     string `yaml:"unity_client_product_version" json:"UNITY_CLIENT_PRODUCT_VERSION" envconfig:"UNITY_CLIENT_PRODUCT_VERSION"`
}

func (*UIClient) Init

func (c *UIClient) Init()

Jump to

Keyboard shortcuts

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