tconfig

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbConfigLocalPath string = "config/postgres_local.yml"
View Source
var DbConfigPath string = "config/postgres.yml"
View Source
var DbConfigTestPath string = "config/postgres_test.yml"
View Source
var InternalConfigLocalPath string = "config/internal_local.yml"
View Source
var InternalConfigPath string = "config/internal.yml"
View Source
var InternalConfigTestPath string = "config/internal_test.yml"
View Source
var RedisConfigLocalPath string = "config/redis_local.yml"
View Source
var RedisConfigPath string = "config/redis.yml"
View Source
var RedisConfigTestPath string = "config/redis_test.yml"

Functions

func IsDebug

func IsDebug() bool

Types

type DbConfig

type DbConfig struct {
	PostgresDb struct {
		Enabled  bool   `yaml:"enabled"`
		Host     string `yaml:"host"`
		Port     string `yaml:"port"`
		UserName string `yaml:"username"`
		Password string `yaml:"password"`
		Database string `yaml:"database"`
	} `yaml:"postgresdb"`
}
var DbConfigInstance *DbConfig

func GetDbConfigInstance

func GetDbConfigInstance() *DbConfig

func (*DbConfig) ReadConfig

func (c *DbConfig) ReadConfig()

type InternalConfig

type InternalConfig struct {
	Debug   bool `yaml:"debug"`
	Local   bool `yaml:"local"`
	Restapi struct {
		ProbeHost   string `yaml:"probe_host"`
		ProbePort   string `yaml:"probe_port"`
		GraphqlHost string `yaml:"graphql_host"`
		GraphqlPort string `yaml:"graphql_port"`
	} `yaml:"restapi"`
	Grpc struct {
		LoggerHost         string `yaml:"logger_host"`
		LoggerPort         string `yaml:"logger_port"`
		UserHost           string `yaml:"user_host"`
		UserPort           string `yaml:"user_port"`
		AuthenticationHost string `yaml:"authentication_host"`
		AuthenticationPort string `yaml:"authentication_port"`
		AuthorizationHost  string `yaml:"authorization_host"`
		AuthorizationPort  string `yaml:"authorization_port"`
	} `yaml:"grpc"`
}
var InternalConfigInstance *InternalConfig

func GetInternalConfigInstance

func GetInternalConfigInstance() *InternalConfig

func (*InternalConfig) ReadConfig

func (c *InternalConfig) ReadConfig()

type JwtConfig

type JwtConfig struct {
	Jwt struct {
		SecretKey string `yaml:"secretkey"`
	} `yaml:"jwt"`
}
var JwtConfigInstance *JwtConfig

func GetJwtConfigInstance

func GetJwtConfigInstance() *JwtConfig

func (*JwtConfig) ReadConfig

func (c *JwtConfig) ReadConfig()

type RedisConfig

type RedisConfig struct {
	Redis struct {
		Enabled  bool   `yaml:"enabled"`
		Host     string `yaml:"host"`
		Port     string `yaml:"port"`
		Password string `yaml:"password"`
		Db       int    `yaml:"db"`
	} `yaml:"redis"`
}
var RedisConfigInstance *RedisConfig

func GetRedisConfigInstance

func GetRedisConfigInstance() *RedisConfig

func (*RedisConfig) ReadConfig

func (c *RedisConfig) ReadConfig()

Jump to

Keyboard shortcuts

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