config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// IsDemoField is CLI-only: demo mode is implied in the GUI by selecting the "demo" field group.
	IsDemoField = field.BoolField(
		"demo",
		field.WithDisplayName("Demo Environment"),
		field.WithDescription("Set to true for demo environment, false for production"),
		field.WithDefaultValue(false),
		field.WithExportTarget(field.ExportTargetCLIOnly),
	)

	ClientIdField = field.StringField(
		"docusign-client-id",
		field.WithDisplayName("Client ID"),
		field.WithDescription("OAuth 2.0 Client ID from your DocuSign developer app"),
		field.WithRequired(true),
	)

	ClientSecretField = field.StringField(
		"docusign-client-secret",
		field.WithDisplayName("Client Secret"),
		field.WithDescription("OAuth 2.0 Client Secret from your DocuSign developer app"),
		field.WithIsSecret(true),
		field.WithRequired(true),
	)

	RedirectURIField = field.StringField(
		"redirect-uri",
		field.WithDisplayName("Redirect URI"),
		field.WithDescription("Redirect URI registered in your DocuSign integration"),
		field.WithExportTarget(field.ExportTargetCLIOnly),
	)

	RefreshTokenField = field.StringField(
		"refresh-token",
		field.WithDisplayName("Refresh Token"),
		field.WithDescription("OAuth 2.0 Refresh Token for DocuSign"),
		field.WithIsSecret(true),
		field.WithExportTarget(field.ExportTargetCLIOnly),
	)

	ConfigureField = field.BoolField(
		"configure",
		field.WithDisplayName("Configure"),
		field.WithDescription("Get the refresh token the first time you run the connector."),
		field.WithExportTarget(field.ExportTargetCLIOnly),
	)

	AccountIdField = field.StringField(
		"account-id",
		field.WithDisplayName("DocuSign Account ID"),
		field.WithDescription("API account ID (UUID format) of the DocuSign account to be used for synchronization. "+
			"Leave blank to use your default account. "+
			"Warning: changing this ID between different synchronizations may result in data loss. "+
			"If you want to synchronize different accounts, create different connectors."),
	)

	// IncludeSigningGroupsField gates whether signingGroupBuilder.List() does any
	// work (see connector.go's ResourceSyncers) — the resource type itself is always
	// registered, so this is a runtime gate, not a registration gate.
	IncludeSigningGroupsField = field.BoolField(
		"include-signing-groups",
		field.WithDisplayName("Include Signing Groups"),
		field.WithDescription("Set to true to sync signing groups (for customers with the signing groups feature enabled on their account)."),
		field.WithDefaultValue(false),
	)

	// ClmBaseURLField is ops-only and for testing: it lets ConductorOne's own
	// deployment/support tooling point the connector at a local CLM mock (see
	// cmd/test-server) when the authenticated account has no CLM subscription of its
	// own, without changing how eSignature calls are resolved. Hidden from GUI config
	// and CLI --help — a real tenant admin has no legitimate reason to set this.
	ClmBaseURLField = field.StringField(
		"clm-base-url",
		field.WithDisplayName("CLM Base URL Override"),
		field.WithDescription("Testing only: overrides the DocuSign CLM API base URL instead of resolving it from the OAuth token's api_base_url. "+
			"Use to point CLM API calls at a local mock server (see cmd/test-server) when the connected account has no CLM subscription."),
		field.WithExportTarget(field.ExportTargetCLIOnly),
		field.WithHidden(true),
	)

	// BaseURLField is ops-only and for testing: it lets ConductorOne's own
	// deployment/support tooling run the connector entirely against a local mock (see
	// cmd/test-server), with no contact with real DocuSign at all. Setting this also
	// skips the real OAuth token refresh — refresh-token is used verbatim as a static
	// bearer token, since there's no real account to refresh against once eSignature
	// calls are redirected to a mock. Combine with clm-base-url (and
	// --sync-resource-types to skip resource types the mock doesn't serve) to fully
	// isolate a test run from DocuSign. Hidden from GUI config and CLI --help.
	BaseURLField = field.StringField(
		"base-url",
		field.WithDisplayName("Base URL Override"),
		field.WithDescription("Testing only: overrides the DocuSign eSignature API base URL and skips the real OAuth token refresh "+
			"(refresh-token is used verbatim as a static bearer token instead). Use with clm-base-url to point the whole connector at a local mock server (see cmd/test-server)."),
		field.WithExportTarget(field.ExportTargetCLIOnly),
		field.WithHidden(true),
	)

	Oauth2TokenField = field.Oauth2Field(
		"oauth2-token",
		field.WithDisplayName("OAuth Authentication"),
		field.WithDescription("OAuth 2.0 Authentication for DocuSign"),
	)

	// ConfigurationFields defines the external configuration required for the
	// connector to run. Note: these fields can be marked as optional or
	// required.
	ConfigurationFields = []field.SchemaField{
		IsDemoField,
		ClientIdField,
		ClientSecretField,
		RedirectURIField,
		RefreshTokenField,
		ConfigureField,
		AccountIdField,
		IncludeSigningGroupsField,
		ClmBaseURLField,
		BaseURLField,
		Oauth2TokenField,
	}

	// FieldRelationships defines relationships between the 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{
		field.FieldsMutuallyExclusive(RefreshTokenField, Oauth2TokenField),
	}

	// FieldGroups defines how fields are presented in the C1 UI.
	// The "oauth2" group (default) uses ConductorOne's managed DocuSign OAuth app for production.
	// The "demo" group lets customers supply their own DocuSign developer app credentials
	// against DocuSign's demo environment.
	FieldGroups = []field.SchemaFieldGroup{
		{
			Name:        "oauth2",
			DisplayName: "OAuth Authentication",
			HelpText:    "Authenticate using ConductorOne's managed DocuSign OAuth app (production environment).",
			Default:     true,
			Fields:      []field.SchemaField{Oauth2TokenField, AccountIdField, IncludeSigningGroupsField},
		},
		{
			Name:        "demo",
			DisplayName: "Custom App (Demo Environment)",
			HelpText: "Authenticate using your own DocuSign developer app against DocuSign's demo environment. " +
				"Provide your app's Client ID and Client Secret, then click the OAuth button to authorize.",
			Fields: []field.SchemaField{ClientIdField, ClientSecretField, Oauth2TokenField, AccountIdField, IncludeSigningGroupsField},
		},
	}
)
View Source
var ConfigurationSchema = field.NewConfiguration(
	ConfigurationFields,
	field.WithConstraints(FieldRelationships...),
	field.WithConnectorDisplayName("DocuSign"),
	field.WithHelpUrl("/docs/baton/docusign"),
	field.WithIconUrl("/static/app-icons/docusign.svg"),
	field.WithFieldGroups(FieldGroups),
)

Functions

This section is empty.

Types

type Docusign

type Docusign struct {
	Demo                 bool   `mapstructure:"demo"`
	DocusignClientId     string `mapstructure:"docusign-client-id"`
	DocusignClientSecret string `mapstructure:"docusign-client-secret"`
	RedirectUri          string `mapstructure:"redirect-uri"`
	RefreshToken         string `mapstructure:"refresh-token"`
	Configure            bool   `mapstructure:"configure"`
	AccountId            string `mapstructure:"account-id"`
	IncludeSigningGroups bool   `mapstructure:"include-signing-groups"`
	ClmBaseUrl           string `mapstructure:"clm-base-url"`
	BaseUrl              string `mapstructure:"base-url"`
	Oauth2Token          string `mapstructure:"oauth2-token"`
}

func (*Docusign) GetBool

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

func (*Docusign) GetInt

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

func (*Docusign) GetString

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

func (*Docusign) GetStringMap

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

func (*Docusign) GetStringSlice

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