Documentation
¶
Overview ¶
http_logging.go
Index ¶
- type AccountDataSubsetGroup
- type AccountDataSubsetLdapServer
- type AccountDataSubsetPrivileges
- type AccountDataSubsetSite
- type AccountDataSubsetUser
- type AccountDetail
- type AccountUser
- type BuildingDetail
- 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) GetBuildingByID(id int) (*ResponseBuilding, error)
- func (c *Client) GetBuildingsByName(name string) (*ResponseBuilding, error)
- func (c *Client) GetGroupByID(id int) (*ResponseAccountGroup, 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 GroupDetail
- type Groups
- type Logger
- type Privilege
- type ResponseAccount
- type ResponseAccountGroup
- type ResponseAccountsList
- type ResponseBuilding
- 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 ¶
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 BuildingDetail ¶ added in v0.0.8
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 ¶
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) GetBuildingByID ¶ added in v0.0.8
func (c *Client) GetBuildingByID(id int) (*ResponseBuilding, error)
GetBuildingByID retrieves the Building by its ID
func (*Client) GetBuildingsByName ¶ added in v0.0.8
func (c *Client) GetBuildingsByName(name string) (*ResponseBuilding, error)
GetBuildingsByName retrieves the Building by its Name
func (*Client) GetGroupByID ¶ added in v0.0.8
func (c *Client) GetGroupByID(id int) (*ResponseAccountGroup, error)
GetGroupByID gets an account group using its ID and returns a response.
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 ¶
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 GroupDetail ¶ added in v0.0.8
type GroupDetail 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 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 ¶
func NewDefaultLogger() Logger
NewDefaultLogger returns a new instance of the default logger.
type Privilege ¶
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 {
Groups []GroupDetail `json:"group"`
}
type ResponseAccountsList ¶
type ResponseBuilding ¶ added in v0.0.8
type ResponseBuilding struct {
Building BuildingDetail `json:"building"`
}
type SSOFailoverResponse ¶
type Users ¶
type Users struct {
User []AccountUser `json:"user,omitempty" xml:"user,omitempty"`
}