configuration

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 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 {
	ConnectorId                  string            `json:"connector_id"`
	DeviceIdPrefix               string            `json:"device_id_prefix"`
	ZwaveMqttBroker              string            `json:"zwave_mqtt_broker"`
	ZwaveMqttUser                string            `json:"zwave_mqtt_user" config:"secret"`
	ZwaveMqttPw                  string            `json:"zwave_mqtt_pw" config:"secret"`
	ZwaveMqttClientId            string            `json:"zwave_mqtt_client_id"`
	MgwMqttBroker                string            `json:"mgw_mqtt_broker"`
	MgwMqttUser                  string            `json:"mgw_mqtt_user" config:"secret"`
	MgwMqttPw                    string            `json:"mgw_mqtt_pw" config:"secret"`
	MgwMqttClientId              string            `json:"mgw_mqtt_client_id"`
	ZwaveController              string            `json:"zwave_controller"`
	ZwaveMqttDeviceStateTopic    string            `json:"zwave_mqtt_device_state_topic"` //used in zwavejs2mqtt
	ZvaveValueEventTopic         string            `json:"zvave_value_event_topic"`       //used in zwave2mqtt
	ZwaveMqttApiTopic            string            `json:"zwave_mqtt_api_topic"`
	ZwaveNetworkEventsTopic      string            `json:"zwave_network_events_topic"`
	UpdatePeriod                 string            `json:"update_period"`
	InitialUpdateRequestDelay    Duration          `json:"initial_update_request_delay"`
	Debug                        bool              `json:"debug"`
	DeviceTypeMapping            map[string]string `json:"device_type_mapping"`
	DeleteMissingDevices         bool              `json:"delete_missing_devices"`
	DeleteHusks                  bool              `json:"delete_husks"`
	EventsForUnregisteredDevices bool              `json:"events_for_unregistered_devices"`
	NodeDeviceTypeOverwrite      map[string]string `json:"node_device_type_overwrite"`

	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"`
	CreateMissingDeviceTypesLastUpdateFunction       string `json:"create_missing_device_types_last_update_function"`
	CreateMissingDeviceTypesLastUpdateCharacteristic string `json:"create_missing_device_types_last_update_characteristic"`
}

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)

type Duration added in v1.1.2

type Duration struct {
	// contains filtered or unexported fields
}

func (*Duration) GetDuration added in v1.1.2

func (this *Duration) GetDuration() time.Duration

func (*Duration) SetDuration added in v1.1.2

func (this *Duration) SetDuration(dur time.Duration)

func (*Duration) SetString added in v1.1.2

func (this *Duration) SetString(str string) error

func (*Duration) UnmarshalJSON added in v1.1.2

func (this *Duration) UnmarshalJSON(bytes []byte) (err error)

Jump to

Keyboard shortcuts

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