Documentation
¶
Overview ¶
http_logging.go
Index ¶
- type AccountDataSubsetGroup
- type AccountDataSubsetLdapServer
- type AccountDataSubsetPrivileges
- type AccountDataSubsetSite
- type AccountDataSubsetUser
- type AccountDetail
- type AccountUser
- type Client
- func (c *Client) CreateAccountByID(accountDetail *AccountDetail) (*ResponseAccount, error)
- func (c *Client) DeleteAccountByID(id int) (*http.Response, error)
- func (c *Client) GetAccountByID(id int) (*ResponseAccount, error)
- func (c *Client) GetAccountByName(name string) (*ResponseAccount, error)
- func (c *Client) GetSSOFailoverSettings() (*SSOFailoverResponse, error)
- func (c *Client) UpdateAccountByID(id int, accountDetail *AccountDetail) (*ResponseAccount, error)
- func (c *Client) UpdateAccountByName(name string, accountDetail *AccountDetail) (*ResponseAccount, error)
- func (c *Client) UpdateFailoverUrl() (*SSOFailoverResponse, error)
- type Groups
- type Logger
- type Privilege
- type ResponseAccount
- type ResponseAccountGroup
- type ResponseAccountsList
- type SSOFailoverResponse
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDataSubsetGroup ¶
type AccountDataSubsetGroup struct {
ID int `json:"id,omitempty" xml:"id,omitempty"`
Name string `json:"name" xml:"name"`
Site AccountDataSubsetSite `json:"site,omitempty" xml:"site,omitempty"`
Privileges AccountDataSubsetPrivileges `json:"privileges,omitempty" xml:"privileges,omitempty"`
}
type AccountDataSubsetPrivileges ¶
type AccountDataSubsetPrivileges struct {
JSSObjects []string `json:"jss_objects,omitempty" xml:"jss_objects>privilege"`
JSSSettings []string `json:"jss_settings,omitempty" xml:"jss_settings>privilege"`
JSSActions []string `json:"jss_actions,omitempty" xml:"jss_actions>privilege"`
Recon []string `json:"recon,omitempty" xml:"recon>privilege"`
CasperAdmin []string `json:"casper_admin,omitempty" xml:"casper_admin>privilege"`
CasperRemote []string `json:"casper_remote,omitempty" xml:"casper_remote>privilege"`
CasperImaging []string `json:"casper_imaging,omitempty" xml:"casper_imaging>privilege"`
}
type AccountDataSubsetSite ¶
type AccountDataSubsetUser ¶
type AccountDetail ¶ added in v0.0.6
type AccountDetail struct {
ID int `json:"id,omitempty" xml:"id,omitempty"`
Name string `json:"name" xml:"name"`
DirectoryUser bool `json:"directory_user,omitempty" xml:"directory_user,omitempty"`
FullName string `json:"full_name,omitempty" xml:"full_name,omitempty"`
Email string `json:"email,omitempty" xml:"email,omitempty"`
EmailAddress string `json:"email_address,omitempty" xml:"email_address,omitempty"`
Enabled string `json:"enabled,omitempty" xml:"enabled,omitempty"`
LdapServer AccountDataSubsetLdapServer `json:"ldap_server,omitempty" xml:"ldap_server,omitempty"`
ForcePasswordChange bool `json:"force_password_change,omitempty" xml:"force_password_change,omitempty"`
AccessLevel string `json:"access_level,omitempty" xml:"access_level,omitempty"`
Password string `json:"password" xml:"password"`
PrivilegeSet string `json:"privilege_set,omitempty" xml:"privilege_set,omitempty"`
Site AccountDataSubsetSite `json:"site,omitempty" xml:"site,omitempty"`
Privileges AccountDataSubsetPrivileges `json:"privileges,omitempty" xml:"privileges,omitempty"`
}
type AccountUser ¶
type Client ¶
type Client struct {
HTTP *http_client.Client
}
func NewClient ¶
func NewClient(baseURL string, config http_client.Config) *Client
NewClient creates a new Jamf Pro client
func (*Client) CreateAccountByID ¶ added in v0.0.6
func (c *Client) CreateAccountByID(accountDetail *AccountDetail) (*ResponseAccount, error)
CreateAccountByID creates an Account using its ID
func (*Client) DeleteAccountByID ¶
DeleteAccountByID deletes an Account using its ID and returns a response.
func (*Client) GetAccountByID ¶
func (c *Client) GetAccountByID(id int) (*ResponseAccount, error)
GetAccountByID retrieves the Account by its ID
func (*Client) GetAccountByName ¶
func (c *Client) GetAccountByName(name string) (*ResponseAccount, error)
GetAccountByName retrieves the Account by its name
func (*Client) GetSSOFailoverSettings ¶
func (c *Client) GetSSOFailoverSettings() (*SSOFailoverResponse, error)
GetSSOFailoverSettings fetches SSO failover settings from Jamf Pro
func (*Client) UpdateAccountByID ¶
func (c *Client) UpdateAccountByID(id int, accountDetail *AccountDetail) (*ResponseAccount, error)
UpdateAccountByID updates an Account using its ID
func (*Client) UpdateAccountByName ¶
func (c *Client) UpdateAccountByName(name string, accountDetail *AccountDetail) (*ResponseAccount, error)
UpdateAccountByName updates an Account using its name.
func (*Client) UpdateFailoverUrl ¶ added in v0.0.6
func (c *Client) UpdateFailoverUrl() (*SSOFailoverResponse, error)
UpdateFailoverUrl regenerates the failover URL by changing the failover key to a new one and returns the new failover settings.
type Groups ¶
type Groups struct {
Group []ResponseAccountGroup `json:"group,omitempty" xml:"group,omitempty"`
}
type Logger ¶
type Logger interface {
Trace(msg string, keysAndValues ...interface{}) // For very detailed logs
Debug(msg string, keysAndValues ...interface{}) // For development and troubleshooting
Info(msg string, keysAndValues ...interface{}) // Informational messages
Warn(msg string, keysAndValues ...interface{}) // For potentially problematic situations
Error(msg string, keysAndValues ...interface{}) // For errors that might still allow the app to continue running
Fatal(msg string, keysAndValues ...interface{}) // For errors that might prevent the app from continuing
}
Logger is an interface for logging within the SDK.
func NewDefaultLogger ¶ added in v0.0.6
func NewDefaultLogger() Logger
NewDefaultLogger returns a new instance of the default logger.
type Privilege ¶ added in v0.0.6
type Privilege struct {
Privilege string `json:"privilege,omitempty" xml:"privilege,omitempty"`
}
type ResponseAccount ¶
type ResponseAccount struct {
Account AccountDetail `json:"account"`
}
type ResponseAccountGroup ¶
type ResponseAccountGroup struct {
ID int `json:"id,omitempty" xml:"id"`
Name string `json:"name" xml:"name"`
AccessLevel string `json:"access_level" xml:"access_level"`
PrivilegeSet string `json:"privilege_set" xml:"privilege_set"`
Site AccountDataSubsetSite `json:"site" xml:"site"`
Privileges AccountDataSubsetPrivileges `json:"privileges" xml:"privileges"`
Members []AccountDataSubsetUser `json:"members" xml:"members>user"`
}
type ResponseAccountsList ¶
type SSOFailoverResponse ¶ added in v0.0.6
type Users ¶
type Users struct {
User []AccountUser `json:"user,omitempty" xml:"user,omitempty"`
}