client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://appledevicepolicy.tools/api"
)

API Base URL

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents the core HTTP client for Microsoft Mac Apps API

func NewTransport

func NewTransport(config Config) (*Client, error)

NewTransport creates a new HTTP transport for Microsoft Mac Apps API

func (*Client) Close

func (c *Client) Close() error

Close closes the HTTP client and cleans up resources

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string, queryParams map[string]string, headers map[string]string, result any) error

Get executes a GET request

func (*Client) GetHTTPClient

func (c *Client) GetHTTPClient() any

GetHTTPClient returns the underlying HTTP client for testing purposes

type Config

type Config struct {
	BaseURL    string
	Timeout    time.Duration
	RetryCount int
	RetryWait  time.Duration
	UserAgent  string
	Debug      bool
}

Config holds configuration for the client

Jump to

Keyboard shortcuts

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