configs

package
v0.0.0-...-f6ab580 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Devices

type Devices struct {
	// DeviceID Идентификатор устройства, с помощью него осуществляется привязка команды из сообщения к конкретному устройству
	DeviceID string `mapstructure:"device_id"`
	// TagAddress Адрес регистра в контроллере с указанием типа данных
	TagAddress string `mapstructure:"tag_address"`
	// Values значение передаваемое в контроллер
	Values map[string]string `mapstructure:"values"`
}

Devices перечень устройств, подключенных к контроллеру

type Notifications

type Notifications struct {
	// TagAddress адрес регистра, который генерирует события
	TagAddress string `mapstructure:"tag_address"`
	// Text текст события
	Text map[string]string `mapstructure:"text"`
}

Notifications описывает события, генерируемы е контроллером

type RClientConfig

type RClientConfig struct {
	Name           string          `mapstructure:"name"`
	ServerAddr     string          `mapstructure:"server_addr"`
	CACert         string          `mapstructure:"ca_cert" validate:"required"`
	ClientCert     string          `mapstructure:"client_cert" validate:"required"`
	TGUsername     string          `validate:"required"`
	CertID         string          `validate:"required"`
	PLCUri         string          `mapstructure:"plc_uri" validate:"required"`
	Devices        []Devices       `mapstructure:"devices" validate:"required"`
	Notifications  []Notifications `mapstructure:"notifications" validate:"required"`
	configs.Logger `mapstructure:"logger"`
}

RClientConfig настройки клиентского приложения

func NewRClientConfig

func NewRClientConfig(filename string, configPath []string, logger zerolog.Logger, validator validators.Validator) (*RClientConfig, error)

Jump to

Keyboard shortcuts

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