config

package
v0.0.0-...-dfa89bc Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPC

type GRPC struct {
	Ip   string `yaml:"grpc_ip" env:"GRPC_IP"`
	Port int    `yaml:"grpc_port" env:"GRPC_PORT"`
}

type ServerConfig

type ServerConfig struct {
	KeysDir        string `yaml:"keys_dir" env:"KEYS_DIR"`
	GRPC           `yaml:"grpc"`
	TG             `yaml:"tg"`
	PrometheusAddr string `yaml:"prometheus_addr" env:"PROMETHEUS_ADDR"`
	AttachmentsDir string `yaml:"attachments_dir" env:"ATTACHMENTS_DIR"`
	Yandex         `yaml:"yandex"`
}

func NewServerConfig

func NewServerConfig(filePath string, useEnv bool) (*ServerConfig, error)

type TG

type TG struct {
	IsEnabled bool   `yaml:"is_enabled" env:"TG_ENABLED"`
	Token     string `yaml:"token" env:"TG_TOKEN"`
	Chat      int64  `yaml:"chat" env:"TG_CHAT"`
}

type Yandex

type Yandex struct {
	Token string `yaml:"yandex_token" env:"YANDEX_TOKEN"`
}

Jump to

Keyboard shortcuts

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