Documentation
¶
Overview ¶
Package cfg is used for defining configuration properties. It contains the options to use in Connector.DefineConfig
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string Description string DefaultValue string Validation string Secret bool Value string }
Config is a property used to configure a microservice. Although technically public, it is used internally and should not be constructed by microservices directly.
type Option ¶
Option is used to construct a request in Connector.Publish
func DefaultValue ¶
DefaultValue sets the value to be used as default of the config property when no value is explicitly set. If validation is set, the default value must pass validation.
func Description ¶
Description sets the description of the config property. The description is intended for humans and should explain the purpose of the config property and how it will impact the microservice.
func Secret ¶
func Secret() Option
Secret indicates that the config property's value should be considered a secret.
func Validation ¶
Validation sets the validation rule of the config property.
Valid rules are:
str ^[a-zA-Z0-9]+$ bool int [0,60] float [0.0,1.0) dur (0s,24h] set Red|Green|Blue url email json
Whereas the following types are synonymous:
str, string, text, (empty) bool, boolean int, integer, long float, double, decimal, number dur, duration