config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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

View Source
const (
	GithubAppGroup                 = "github-app-group"
	GithubPersonalAccessTokenGroup = "personal-access-token-group"
)

Variables

View Source
var Config = field.NewConfiguration(
	[]field.SchemaField{
		instanceUrlField,
		accessTokenField,
		orgsField,
		appIDField,
		appPrivateKeyPath,
		orgField,
		EnterprisesField,
		syncSecrets,
		omitArchivedRepositories,
		directCollaboratorsOnly,
		syncLastActivity,
	},
	field.WithConnectorDisplayName("GitHub Enterprise"),
	field.WithHelpUrl("/docs/baton/github-enterprise"),
	field.WithIconUrl("/static/app-icons/github.svg"),
	field.WithFieldGroups([]field.SchemaFieldGroup{
		{
			Name:        GithubPersonalAccessTokenGroup,
			DisplayName: "Personal access token",
			HelpText:    "Use a personal access token for authentication.",
			Fields:      []field.SchemaField{instanceUrlField, accessTokenField, orgsField, EnterprisesField, omitArchivedRepositories, directCollaboratorsOnly, syncLastActivity},
			Default:     true,
		},
		{
			Name:        GithubAppGroup,
			DisplayName: "GitHub app",
			HelpText:    "Use a github app for authentication",
			Fields: []field.SchemaField{
				instanceUrlField, appIDField, appPrivateKeyPath, orgField, EnterprisesField,
				syncSecrets, omitArchivedRepositories, directCollaboratorsOnly, syncLastActivity,
			},
			Default: false,
		},
	}),
)
View Source
var (
	EnterprisesField = field.StringSliceField(
		"enterprises",
		field.WithDisplayName("Enterprises"),
		field.WithDescription("Sync enterprise roles, must be an admin of the enterprise. "+
			"A personal access token syncs every role. A GitHub App syncs and provisions the built-in Owner "+
			"role instead, and needs to be installed on the enterprise account as well as on the organization, "+
			"with the \"Enterprise people: read and write\" permission."),
	)
)

Functions

This section is empty.

Types

type Githubenterprise

type Githubenterprise struct {
	InstanceUrl              string   `mapstructure:"instance-url"`
	Token                    string   `mapstructure:"token"`
	Orgs                     []string `mapstructure:"orgs"`
	AppId                    string   `mapstructure:"app-id"`
	AppPrivatekeyPath        []byte   `mapstructure:"app-privatekey-path"`
	Org                      string   `mapstructure:"org"`
	Enterprises              []string `mapstructure:"enterprises"`
	SyncSecrets              bool     `mapstructure:"sync-secrets"`
	OmitArchivedRepositories bool     `mapstructure:"omit-archived-repositories"`
	DirectCollaboratorsOnly  bool     `mapstructure:"direct-collaborators-only"`
	SyncLastActivity         bool     `mapstructure:"sync-last-activity"`
}

func (*Githubenterprise) GetBool

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

func (*Githubenterprise) GetInt

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

func (*Githubenterprise) GetString

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

func (*Githubenterprise) GetStringMap

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

func (*Githubenterprise) GetStringSlice

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