config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 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 (
	ApiKeyField = field.StringField(
		"api-key",
		field.WithDisplayName("API Key"),
		field.WithPlaceholder("your-trello-api-key"),
		field.WithDescription("The API key for your Trello account"),

		field.WithIsSecret(false),
		field.WithRequired(true),
	)
	ApiTokenField = field.StringField(
		"api-token",
		field.WithDisplayName("API Token"),
		field.WithPlaceholder("your-trello-api-token"),
		field.WithDescription("The API token for your Trello account"),
		field.WithIsSecret(true),
		field.WithRequired(true),
	)
	OrganizationsField = field.StringSliceField(
		"organizations",
		field.WithDisplayName("Organizations"),
		field.WithDescription("Limit syncing to specific organizations by providing organization slugs."),
		field.WithRequired(true),
	)
	BaseURLField = field.StringField(
		"base-url",
		field.WithDescription("Override the Trello API URL (for testing)"),
		field.WithHidden(true),
		field.WithExportTarget(field.ExportTargetCLIOnly),
	)

	// FieldRelationships defines relationships between the fields.
	FieldRelationships = []field.SchemaFieldRelationship{}
)
View Source
var Config = field.NewConfiguration(
	[]field.SchemaField{
		ApiKeyField,
		ApiTokenField,
		OrganizationsField,
		BaseURLField,
	},
	field.WithConnectorDisplayName("Trello"),
	field.WithIconUrl("/static/app-icons/trello.svg"),
	field.WithHelpUrl("/docs/baton/trello"),
)

Config is the configuration schema for the connector.

Functions

func ValidateConfig

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

type Trello struct {
	ApiKey        string   `mapstructure:"api-key"`
	ApiToken      string   `mapstructure:"api-token"`
	Organizations []string `mapstructure:"organizations"`
	BaseUrl       string   `mapstructure:"base-url"`
}

func (*Trello) GetBool

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

func (*Trello) GetInt

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

func (*Trello) GetString

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

func (*Trello) GetStringMap

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

func (*Trello) GetStringSlice

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