config

package
v0.0.0-...-4db5c07 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config содержит конфигурацию клиента.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `yaml:"name"    env:"APP_NAME"`
	Version string `yaml:"version" env:"APP_VERSION"`
}

App информация о приложении.

type Config

type Config struct {
	App     `yaml:"app"`
	Storage `yaml:"storage"`
	GRPC    `yaml:"grpc"`
}

Config основная конфигурация.

func New

func New() (*Config, error)

New создаёт объект Config.

type GRPC

type GRPC struct {
	Address string `env-required:"true" yaml:"address" env:"GRPC_ADDRESS"`
	Port    string `env-required:"true" yaml:"port"    env:"GRPC_PORT"`
}

GRPC настройки gRPC.

type Storage

type Storage struct {
	Path string `env-required:"true" yaml:"path" env:"STORAGE_PATH"`
}

Storage настройки файлового хранилища.

Jump to

Keyboard shortcuts

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