abm

package
v0.0.0-...-2285290 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWTClient

func CreateJWTClient(ctx context.Context, config *JWTConfig) (*http.Client, error)

CreateJWTClient creates an HTTP client configured for JWT-based authentication

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides access to Apple Business Manager API

func New

func New(ctx context.Context, config *Config) (*Client, error)

New creates a new ABM API client with the given configuration

func (*Client) GetOrganizationDevices

func (c *Client) GetOrganizationDevices(ctx context.Context) ([]Device, error)

GetOrganizationDevices retrieves devices from the ABM organization

type Config

type Config struct {
	// JWT configuration for Apple Business Manager API
	JWTConfig *JWTConfig
}

Config holds the configuration for the ABM API client

type Device

type Device struct {
	SerialNumber string `json:"serialNumber"`
	Model        string `json:"deviceModel"`
}

Device represents a device in the ABM organization

type ErrorResponse

type ErrorResponse struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

ErrorResponse represents an error response from the ABM API

type JWTConfig

type JWTConfig struct {
	// ClientID is the OAuth client identifier
	ClientID string

	// PrivateKey is the private key for signing (e.g., *ecdsa.PrivateKey, *rsa.PrivateKey)
	PrivateKey crypto.Signer

	// KeyID is the key identifier (kid) for the JWT header
	KeyID string
}

JWTConfig holds configuration for JWT-based OAuth2 authentication

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL