config

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 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 (
	AccessToken = field.StringField(
		"access-token",
		field.WithDisplayName("Personal access token"),
		field.WithDescription("The access token to authenticate with the GitLab API"),
		field.WithRequired(true),
		field.WithIsSecret(true),
	)
	BaseURL = field.StringField(
		"base-url",
		field.WithDisplayName("URL"),
		field.WithDescription("The base URL of the GitLab instance"),
		field.WithDefaultValue("https://gitlab.com/"),
		field.WithRequired(false),
	)
	AccountCreationGroup = field.StringField(
		"account-creation-group",
		field.WithDisplayName("Group"),
		field.WithDescription("The group indicated will be used as a default group for the new users. Required for account creation capability in the Cloud Version."),
		field.WithRequired(false),
	)
	SyncDirectMembersOnly = field.BoolField(
		"sync-direct-members-only",
		field.WithDisplayName("Sync direct members only"),
		field.WithDescription("When enabled, only sync direct members of groups and projects. Inherited members from parent groups will be excluded from membership grants."),
	)

	// ConfigurationFields defines the external configuration required for the
	// connector to run. Note: these fields can be marked as optional or
	// required.
	ConfigurationFields = []field.SchemaField{
		AccessToken,
		BaseURL,
		AccountCreationGroup,
		SyncDirectMembersOnly,
	}

	// FieldRelationships defines relationships between the fields listed in
	// 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{}
)
View Source
var Config = field.NewConfiguration(
	ConfigurationFields,
	field.WithConstraints(FieldRelationships...),
	field.WithConnectorDisplayName("GitLab"),
	field.WithHelpUrl("/docs/baton/gitlab-v2"),
	field.WithIconUrl("/static/app-icons/gitlab.svg"),
)

Functions

This section is empty.

Types

type Gitlab

type Gitlab struct {
	AccessToken           string `mapstructure:"access-token"`
	BaseUrl               string `mapstructure:"base-url"`
	AccountCreationGroup  string `mapstructure:"account-creation-group"`
	SyncDirectMembersOnly bool   `mapstructure:"sync-direct-members-only"`
}

func (*Gitlab) GetBool

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

func (*Gitlab) GetInt

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

func (*Gitlab) GetString

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

func (*Gitlab) GetStringMap

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

func (*Gitlab) GetStringSlice

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