config

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DNS1123LabelMaxLength int = 63
)

TODO(marcos) move this code to baton-sdk.

Variables

View Source
var (
	ClientIdField = field.StringField(
		"coupa-client-id",
		field.WithRequired(true),
		field.WithDescription("Your Coupa Client ID"),
	)
	ClientSecretField = field.StringField(
		"coupa-client-secret",
		field.WithRequired(true),
		field.WithDescription("Your Coupa Client Secret"),
	)
	CoupaDomain = field.StringField(
		"coupa-domain",
		field.WithRequired(true),
		field.WithDescription("Your Coupa Domain, ex: acme.coupacloud.com"),
	)
	// ConfigurationFields defines the external configuration required for the
	// connector to run. Note: these fields can be marked as optional or
	// required.
	ConfigurationFields = []field.SchemaField{
		ClientIdField,
		ClientSecretField,
		CoupaDomain,
	}

	ConfigurationSchema = field.Configuration{
		Fields: ConfigurationFields,
	}
)

Functions

func IsDNS1123Label

func IsDNS1123Label(value string) error

IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).

func NormalizeCoupaURL

func NormalizeCoupaURL(domain string) (string, error)

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