client

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

config_client.go

Index

Constants

This section is empty.

Variables

View Source
var BuildClient = jamfpro.NewClient

BuildClient is a global function variable for client creation that defaults to jamfpro.NewClient. It can be overridden in tests to use mock client creation functions.

Functions

func ConvertToLogLevel added in v0.0.7

func ConvertToLogLevel(logLevelString string) (http_client.LogLevel, error)

ConvertToLogLevel wraps the convertToJamfProLogLevel function to match the expected function signature.

Types

type APIClient

type APIClient struct {
	Conn *jamfpro.Client
}

APIClient is a HTTP API Client.

type MockAPIClient

type MockAPIClient struct {
	mock.Mock
}

MockAPIClient is a mock version of APIClient for testing.

type ProviderConfig

type ProviderConfig struct {
	InstanceName string
	ClientID     string
	ClientSecret string
	LogLevel     http_client.LogLevel
	UserAgent    string
}

func (*ProviderConfig) Client

func (c *ProviderConfig) Client() (*APIClient, diag.Diagnostics)

Client returns a new client for accessing Jamf Pro.

Jump to

Keyboard shortcuts

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