config

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 1 package

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{
		accessTokenField,
		orgsField,
		EnterprisesField,
		instanceUrlField,
		appIDField,
		appPrivateKeyPath,
		appPrivateKey,
		orgField,
		syncSecrets,
		omitArchivedRepositories,
		directCollaboratorsOnly,
		syncLastActivity,
	},
	field.WithConnectorDisplayName("GitHub v2"),
	field.WithHelpUrl("/docs/baton/github-v2"),
	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{accessTokenField, orgsField, omitArchivedRepositories, directCollaboratorsOnly},
			Default:     true,
		},
		{
			Name:        GithubAppGroup,
			DisplayName: "GitHub app",
			HelpText:    "Use a github app for authentication",
			Fields:      []field.SchemaField{appIDField, appPrivateKeyPath, appPrivateKey, orgField, syncSecrets, omitArchivedRepositories, directCollaboratorsOnly},
			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."),
	)
)

TODO (mb): Make sure we don't need field.WithRequired(true) for required fields.

Functions

This section is empty.

Types

type Github

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

func (*Github) GetBool

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

func (*Github) GetInt

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

func (*Github) GetString

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

func (*Github) GetStringMap

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

func (*Github) GetStringSlice

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