Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeychainStore keychain.Store
KeychainStore allows overriding the keychain implementation for testing. When nil, the real system keychain is used.
Functions ¶
func ConfigPath ¶
func ConfigPath() string
ConfigPath returns the path to the config file using XDG conventions.
func GetKeychainStore ¶
GetKeychainStore returns the configured keychain store, falling back to the real system keychain when no override has been set via KeychainStore.
func ResolveSecret ¶
ResolveSecret resolves a secret value that must use a recognized prefix:
- "env:VAR_NAME" — reads the value from environment variable VAR_NAME
- "file:/path" — reads the value from the file at /path
- "keychain:ref" — reads the value from the system keychain
Empty strings are returned as-is. Any other value is rejected.
Types ¶
type Config ¶
type Config struct {
DefaultProfile string `yaml:"default-profile"`
DefaultOutput string `yaml:"default-output,omitempty"`
Profiles map[string]Profile `yaml:"profiles"`
}
Config represents the CLI configuration
type Profile ¶
type Profile struct {
Product string `yaml:"product,omitempty"` // "pro" (default), "protect", or "school"
URL string `yaml:"url"`
AuthMethod string `yaml:"auth-method"` // token, oauth2, platform, apikey
Token string `yaml:"token,omitempty"`
ClientID string `yaml:"client-id,omitempty"`
ClientSecret string `yaml:"client-secret,omitempty"`
TenantID string `yaml:"tenant-id,omitempty"` // platform auth
PlatformURL string `yaml:"platform-url,omitempty"` // school: separate gateway URL for Platform API
NetworkID string `yaml:"network-id,omitempty"` // school only
APIKey string `yaml:"api-key,omitempty"` // school only
DestructiveCooldown *time.Duration `yaml:"destructive-cooldown,omitempty"`
}
Profile represents a server profile for a Jamf product.
Click to show internal directories.
Click to hide internal directories.