config

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 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 (
	UsernamePasswordGroup = "username-password"
	APIClientGroup        = "api-client"
)

Variables

View Source
var (
	UsernameField = field.StringField(
		"username",
		field.WithDisplayName("Username"),
		field.WithDescription("Username for your Jamf Pro instance"),
		field.WithRequired(true),
	)
	PasswordField = field.StringField(
		"password",
		field.WithDisplayName("Password"),
		field.WithDescription("Password for your Jamf Pro instance"),
		field.WithIsSecret(true),
		field.WithRequired(true),
	)
	InstanceUrlField = field.StringField(
		"instance-url",
		field.WithDisplayName("Instance URL"),
		field.WithDescription("Base URL of your Jamf Pro instance, including https:// (for example https://yourcompany.jamfcloud.com)"),
		field.WithRequired(true),
	)

	// The SDK already owns client-id and client-secret for ConductorOne credentials.
	ClientIDField = field.StringField(
		"jamf-client-id",
		field.WithDisplayName("API Client ID"),
		field.WithDescription("Client ID of a Jamf Pro API client"),
		field.WithRequired(true),
	)
	ClientSecretField = field.StringField(
		"jamf-client-secret",
		field.WithDisplayName("API Client Secret"),
		field.WithDescription("Client secret of a Jamf Pro API client"),
		field.WithIsSecret(true),
		field.WithRequired(true),
	)

	// CreateAccountResourceTypeField picks which of the two Jamf account types
	// C1 is allowed to create/delete accounts for. Jamf has two distinct
	// account types (directory "user" resources and Jamf Pro console admin
	// "userAccount" resources) and the platform only supports configuring one
	// creatable type per connector instance. Both types still sync for
	// visibility regardless of this setting, and deletion isn't limited by
	// it — only creation is gated.
	CreateAccountResourceTypeField = field.SelectField(
		"create-account-resource-type",
		[]string{"user", "userAccount"},
		field.WithDisplayName("Account Provisioning Target"),
		field.WithDescription(
			"Which Jamf account type C1 should create when provisioning accounts. "+
				"'user' (default) creates directory users; 'userAccount' creates Jamf Pro console admin accounts. "+
				"Only one type can be created at a time per connector instance.",
		),
		field.WithDefaultValue("user"),
	).ExportAs(field.ExportTargetGUI)

	// ConfigurationFields defines the external configuration required for the
	// connector to run.
	ConfigurationFields = []field.SchemaField{
		UsernameField,
		PasswordField,
		InstanceUrlField,
		CreateAccountResourceTypeField,
		ClientIDField,
		ClientSecretField,
	}

	// FieldRelationships defines relationships between the fields listed in
	// ConfigurationFields that can be automatically validated.
	FieldRelationships = []field.SchemaFieldRelationship{}
)
View Source
var Config = field.NewConfiguration(
	ConfigurationFields,
	field.WithConstraints(FieldRelationships...),
	field.WithConnectorDisplayName("Jamf"),
	field.WithHelpUrl("/docs/baton/jamf"),
	field.WithIconUrl("/static/app-icons/jamf.svg"),
	field.WithFieldGroups([]field.SchemaFieldGroup{
		{
			Name:        UsernamePasswordGroup,
			DisplayName: "Username and password",
			HelpText:    "Authenticate as a local Jamf Pro account.",
			Fields:      []field.SchemaField{UsernameField, PasswordField, InstanceUrlField, CreateAccountResourceTypeField},
			Default:     true,
		},
		{
			Name:        APIClientGroup,
			DisplayName: "API client",
			HelpText:    "Authenticate with a Jamf Pro API client and the API roles assigned to it.",
			Fields:      []field.SchemaField{ClientIDField, ClientSecretField, InstanceUrlField, CreateAccountResourceTypeField},
		},
	}),
)

Functions

This section is empty.

Types

type Jamf added in v0.0.10

type Jamf struct {
	Username                  string `mapstructure:"username"`
	Password                  string `mapstructure:"password"`
	InstanceUrl               string `mapstructure:"instance-url"`
	CreateAccountResourceType string `mapstructure:"create-account-resource-type"`
	JamfClientId              string `mapstructure:"jamf-client-id"`
	JamfClientSecret          string `mapstructure:"jamf-client-secret"`
}

func (*Jamf) GetBool added in v0.0.10

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

func (*Jamf) GetInt added in v0.0.10

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

func (*Jamf) GetString added in v0.0.10

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

func (*Jamf) GetStringMap added in v0.0.10

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

func (*Jamf) GetStringSlice added in v0.0.10

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