config

package
v0.0.0-...-dd1a141 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDomainRabbitConnection

func GetDomainRabbitConnection() string

func Load

func Load(path string)

Types

type Configurations

type Configurations struct {
	Server    Server    `mapstructure:"server" yaml:"server"`
	Ssh       Ssh       `mapstructure:"ssh" yaml:"ssh"`
	Scheduler Scheduler `mapstructure:"scheduler" yaml:"scheduler"`
	Database  Database  `mapstructure:"database" yaml:"database"`
	Rabbitmq  Rabbitmq  `mapstructure:"rabbitmq" yaml:"rabbitmq"`
	Queue     Queue     `mapstructure:"queue" yaml:"queue"`
	Grpc      Grpc      `mapstructure:"grpc" yaml:"grpc"`
}
var Config Configurations

type Database

type Database struct {
	Host     string `mapstructure:"host" yaml:"host"`
	Port     string `mapstructure:"port" yaml:"port"`
	User     string `mapstructure:"user" yaml:"user"`
	Password string `mapstructure:"password" yaml:"password"`
	Dbname   string `mapstructure:"dbname" yaml:"dbname"`
}

type Grpc

type Grpc struct {
	Server   string `mapstructure:"server" yaml:"server"`
	Client   string `mapstructure:"client" yaml:"client"`
	Protocol string `mapstructure:"protocol" yaml:"protocol"`
	Cert     string `mapstructure:"cert" yaml:"cert"`
	Key      string `mapstructure:"key" yaml:"key"`
}

type Queue

type Queue struct {
	Consumer string `mapstructure:"consumer" yaml:"consumer"`
	Producer string `mapstructure:"producer" yaml:"producer"`
}

type Rabbitmq

type Rabbitmq struct {
	Host     string `mapstructure:"host" yaml:"host"`
	Port     string `mapstructure:"port" yaml:"port"`
	User     string `mapstructure:"user" yaml:"user"`
	Password string `mapstructure:"password" yaml:"password"`
	Vhost    string `mapstructure:"vhost" yaml:"vhost"`
	Protocol string `mapstructure:"protocol" yaml:"protocol"`
}

type Scheduler

type Scheduler struct {
	Enable bool `mapstructure:"enable" yaml:"enable"`
}

type Server

type Server struct {
	Host        string `mapstructure:"host" yaml:"host"`
	Port        string `mapstructure:"port" yaml:"port"`
	Name        string `mapstructure:"name" yaml:"name"`
	Timeout     int    `mapstructure:"timeout" yaml:"timeout"`
	Logging     string `mapstructure:"logging" yaml:"logging"`
	Environment string `mapstructure:"environment" yaml:"environment"`
}

Server use mapstructure in document github.com/go-viper/mapstructure/v2

type Ssh

type Ssh struct {
	Host       string `mapstructure:"host" yaml:"host"`
	Port       string `mapstructure:"port" yaml:"port"`
	Protocol   string `mapstructure:"protocol" yaml:"protocol"`
	Username   string `mapstructure:"username" yaml:"username"`
	Password   string `mapstructure:"password" yaml:"password"`
	PrivateKey string `mapstructure:"private_key" yaml:"private_key"`
	PublicKey  string `mapstructure:"public_key" yaml:"public_key"`
	KnownHosts string `mapstructure:"known_hosts" yaml:"known_hosts"`
	SftpPath   string `mapstructure:"sftp_path" yaml:"sftp_path"`
	Enable     bool   `mapstructure:"enable" yaml:"enable"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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