conf

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApiKeyField = field.StringField(
		"workato-api-key",
		field.WithRequired(true),
		field.WithDescription("Your workato API key"),
	)

	WorkatoDataCenterFiekd = field.StringField(
		"workato-data-center",
		field.WithDescription("Your workato data center (us, eu, jp, sg, au) default is 'us' see more on https://docs.workato.com/workato-api.html#base-url"),
		field.WithDefaultValue("us"),
	)

	WorkatoEnv = field.StringField(
		"workato-env",
		field.WithDescription("Your workato environment (dev, test, prod) default is 'dev'"),
		field.WithDefaultValue("dev"),
	)

	// ConfigurationFields defines the external configuration required for the
	// connector to run. Note: these fields can be marked as optional or
	// required.
	ConfigurationFields = []field.SchemaField{
		ApiKeyField,
		WorkatoDataCenterFiekd,
		WorkatoEnv,
	}

	// FieldRelationships defines relationships between the fields listed in
	// ConfigurationFields that can be automatically validated. For example, a
	// username and password can be required together, or an access token can be
	// marked as mutually exclusive from the username password pair.
	FieldRelationships = []field.SchemaFieldRelationship{}
)

Functions

func ValidateConfig

func ValidateConfig(v *viper.Viper) error

ValidateConfig is run after the configuration is loaded, and should return an error if it isn't valid. Implementing this function is optional, it only needs to perform extra validations that cannot be encoded with configuration parameters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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