config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(input interface{}, output interface{}) error

Decode marshals and unmarshals the input structure into the output structure using the standard library's json package. This should be used when decoding JSON configurations (i.e., Config) in Substation interface factories (e.g., process.ByterFactory, condition.InspectorFactory).

Types

type Config

type Config struct {
	Type     string                 `json:"type"`
	Settings map[string]interface{} `json:"settings"`
}

Config is a template used by Substation interface factories to produce new instances from JSON configurations. Type refers to the type of instance and Settings contains options used in the instance. Examples of this are found in process.ByterFactory and condition.InspectorFactory.

Jump to

Keyboard shortcuts

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