configuration

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug bool `json:"debug"`

	ConnectorId string `json:"connector_id"`

	DeviceIdPrefix string `json:"device_id_prefix"`

	MgwMqttBroker   string `json:"mgw_mqtt_broker"`
	MgwMqttClientId string `json:"mgw_mqtt_client_id"`
	MgwMqttUser     string `json:"mgw_mqtt_user" config:"secret"`
	MgwMqttPw       string `json:"mgw_mqtt_pw" config:"secret"`

	ZigbeeMqttBroker   string `json:"zigbee_mqtt_broker"`
	ZigbeeMqttClientId string `json:"zigbee_mqtt_client_id"`
	ZigbeeMqttUser     string `json:"zigbee_mqtt_user" config:"secret"`
	ZigbeeMqttPw       string `json:"zigbee_mqtt_pw" config:"secret"`

	ZigbeeQos int `json:"zigbee_qos"`

	ZigbeeMqttTopicPrefix string `json:"zigbee_mqtt_topic_prefix"`

	EventRefreshInterval string `json:"event_refresh_interval"`

	AuthEndpoint             string  `json:"auth_endpoint"`
	AuthClientId             string  `json:"auth_client_id" config:"secret"`
	AuthExpirationTimeBuffer float64 `json:"auth_expiration_time_buffer"`
	AuthUsername             string  `json:"auth_username" config:"secret"`
	AuthPassword             string  `json:"auth_password" config:"secret"`

	DeviceManagerUrl    string `json:"device_manager_url"`
	DeviceRepositoryUrl string `json:"device_repository_url"`
	FallbackFile        string `json:"fallback_file"`
	MinCacheDuration    string `json:"min_cache_duration"`
	MaxCacheDuration    string `json:"max_cache_duration"`

	CreateMissingDeviceTypes                    bool   `json:"create_missing_device_types"`
	CreateMissingDeviceTypesWithDeviceClass     string `json:"create_missing_device_types_with_device_class"`
	CreateMissingDeviceTypesWithProtocol        string `json:"create_missing_device_types_with_protocol"`
	CreateMissingDeviceTypesWithProtocolSegment string `json:"create_missing_device_types_with_protocol_segment"`
}

func Load

func Load(location string) (config Config, err error)

loads config from json in location and used environment variables (e.g ZookeeperUrl --> ZOOKEEPER_URL)

Jump to

Keyboard shortcuts

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