config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Code generated by baton-sdk. DO NOT EDIT!!!

Index

Constants

This section is empty.

Variables

View Source
var (
	Site = field.StringField(
		"site",
		field.WithDescription("Part of your Datadog website URL, e.g. datadoghq.com in https://app.datadoghq.com."),
		field.WithRequired(true),
		field.WithDisplayName("Site"),
	)
	ApiKey = field.StringField(
		"api-key",
		field.WithDescription("API key used to authenticate to Datadog API."),
		field.WithRequired(true),
		field.WithIsSecret(true),
		field.WithDisplayName("API key"),
	)
	AppKey = field.StringField(
		"app-key",
		field.WithDescription("APP key used with API key to assign scopes for API access."),
		field.WithRequired(true),
		field.WithIsSecret(true),
		field.WithDisplayName("Application key"),
	)
	SyncSecrets = field.BoolField(
		"sync-secrets",
		field.WithDescription("Whether to sync secrets or not"),
		field.WithDisplayName("Sync secrets"),
	)
	SyncSchedules = field.BoolField(
		"sync-schedules",
		field.WithDescription("Whether to sync on-call schedules or not"),
		field.WithDefaultValue(false),
		field.WithDisplayName("Sync schedules"),
	)

	// FieldRelationships defines relationships between the fields listed in
	// Config 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(cfg *Datadog) 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

type Datadog

type Datadog struct {
	Site          string `mapstructure:"site"`
	ApiKey        string `mapstructure:"api-key"`
	AppKey        string `mapstructure:"app-key"`
	SyncSecrets   bool   `mapstructure:"sync-secrets"`
	SyncSchedules bool   `mapstructure:"sync-schedules"`
}

func (*Datadog) GetBool

func (c *Datadog) GetBool(fieldName string) bool

func (*Datadog) GetInt

func (c *Datadog) GetInt(fieldName string) int

func (*Datadog) GetString

func (c *Datadog) GetString(fieldName string) string

func (*Datadog) GetStringMap

func (c *Datadog) GetStringMap(fieldName string) map[string]any

func (*Datadog) GetStringSlice

func (c *Datadog) GetStringSlice(fieldName string) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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