conf

package
v0.0.0-...-618fe63 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLogging

func ConfigureLogging(config *LoggingConfig)

ConfigureLogging func

func FileExists

func FileExists(filename string) bool

FileExists check file exists or not

Types

type GlobalConfiguration

type GlobalConfiguration struct {
	Environment string `yaml:"environment"`
	GRPC        struct {
		Host     string `yaml:"grpc.host"`
		Port     string `yaml:"grpc.port"`
		Endpoint string `yaml:"grpc.endpoint"`
	}
	HTTP struct {
		Host     string `yaml:"http.host"`
		Port     string `yaml:"http.port"`
		Endpoint string `yaml:"http.endpoint"`
	}
	DEBUG struct {
		Host     string `yaml:"debug.host"`
		Port     string `yaml:"debug.port"`
		Endpoint string `yaml:"debug.endpoint"`
	}
	Redis             RedisConfiguration
	Vault             VaultConfiguration
	MultiInstanceMode bool `yaml:"multiInstanceMode"`
	Log               LoggingConfig
	Service           Service
	Jaeger            Jaeger
	Kafka             Kafka
	Notif             Notif
}

GlobalConfiguration holds all the global configuration for gocommerce

var GlobalConfigs GlobalConfiguration

GlobalConfigs var

type Jaeger

type Jaeger struct {
	HostPort string `yaml:"jaeger.hostPort"`
	LogSpans bool   `yaml:"jaeger.logSpans"`
}

Jaeger tracer

type Kafka

type Kafka struct {
	Username string   `yaml:"kafka.username"`
	Password string   `yaml:"kafka.password"`
	Brokers  []string `yaml:"kafka.brokers"`
	Version  string   `yaml:"kafka.version"`
	Group    string   `yaml:"kafka.group"`
	Assignor string   `yaml:"kafka.assignor"`
	Oldest   bool     `yaml:"kafka.oldest"`
	Verbose  bool     `yaml:"kafka.verbose"`
	Topics   Topic    `yaml:"kafka.topics"`
	Auth     bool     `yaml:"kafka.auth"`
	Consumer bool     `yaml:"kafka.consumer"`
	Producer bool     `yaml:"kafka.producer"`
}

Kafka struct

type LoggingConfig

type LoggingConfig struct {
	DisableColors    bool `json:"disable_colors" yaml:"log.disableColors"`
	QuoteEmptyFields bool `json:"quote_empty_fields" yaml:"log.quoteEmptyFields"`
}

LoggingConfig struct

type Notif

type Notif struct {
	SMS   sms
	Email email
}

Notif struct

type RedisConfiguration

type RedisConfiguration struct {
	Username string `yaml:"redis.username"`
	Password string `yaml:"redis.password"`
	DB       int    `yaml:"redis.db"`
	Host     string `yaml:"redis.host"`
	Logger   bool   `yaml:"redis.logger"`
}

RedisConfiguration struct

type Service

type Service struct {
	Name string `yaml:"service.name"`

	// min code lenght
	MinCL int `yaml:"service.mincl"`
	MaxCl int `yaml:"service.maxcl"`

	Redis struct {
		SMSDuration         time.Duration `yaml:"service.redis.smsDuration"`
		SMSCodeVerification time.Duration `yaml:"service.redis.smsCodeVerification"`
		UserDuration        time.Duration `yaml:"service.redis.userDuration"`
	}
}

Service details

type Topic

type Topic struct {
	Notif string `yaml:"kafka.topics.notif"`
}

Topic struct

type VaultConfiguration

type VaultConfiguration struct {
	Address string `yaml:"vault.address"`
	Token   string `yaml:"vault.token"`
}

VaultConfiguration struct

Jump to

Keyboard shortcuts

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