config

package
v0.0.0-...-074af59 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectClient

func ConnectClient(nameService string) interface{}

func ConnectEtcd

func ConnectEtcd()

func LoadConfig

func LoadConfig(key string)

func PutMultipleValuesWithDB

func PutMultipleValuesWithDB(ctx context.Context, kv clientv3.KV, prefixService string)

func PutMultipleValuesWithRedis

func PutMultipleValuesWithRedis(ctx context.Context, kv clientv3.KV, prefixService string)

put config redis

func PutMultipleValuesWithServer

func PutMultipleValuesWithServer(ctx context.Context, kv clientv3.KV, prefixService string)

put config server

Types

type ConfigEtcd

type ConfigEtcd struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func GetMultipleValuesWithPrefixService

func GetMultipleValuesWithPrefixService(ctx context.Context, kv clientv3.KV, prefixService string) []ConfigEtcd

type Configurations

type Configurations struct {
	Port   string
	Sql    []DatabaseDetails
	Crdb   []DatabaseDetails
	Redis  []RedisClients
	Server []ServerDetails
}
var (
	Config *Configurations
)

type DatabaseDetails

type DatabaseDetails struct {
	Name     string
	Host     string
	Port     string
	Username string
	Password string
	Database string
}

type RedisClients

type RedisClients struct {
	Name      string
	Host      string
	Port      string
	Password  string
	RedisDb   string
	KeyPrefix string
}

type ServerDetails

type ServerDetails struct {
	Host string
	Port string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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