config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	APIKeyField = field.StringField(
		"api-key",
		field.WithDescription("The API key for authenticating with Rootly"),
		field.WithRequired(true),
	)

	//go:generate go run ./gen
	Config = field.NewConfiguration([]field.SchemaField{
		APIKeyField,
	})

	// 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 *Rootly) 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 Rootly

type Rootly struct {
	ApiKey string `mapstructure:"api-key"`
}

func (*Rootly) GetBool

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

func (*Rootly) GetInt

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

func (*Rootly) GetString

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

func (*Rootly) GetStringMap

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

func (*Rootly) GetStringSlice

func (c *Rootly) 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