Documentation
¶
Overview ¶
http_logging.go
Index ¶
- type AccountDataSubsetGroup
- type AccountDataSubsetLdapServer
- type AccountDataSubsetPrivileges
- type AccountDataSubsetSite
- type AccountDataSubsetUser
- type AccountDetail
- type AccountUser
- type AllowedFileExtensionDetail
- type BuildingDetail
- type Client
- func (c *Client) CreateAccountByID(accountDetail *AccountDetail) (*ResponseAccount, error)
- func (c *Client) CreateAllowedFileExtension(extension *AllowedFileExtensionDetail) (*AllowedFileExtensionDetail, error)
- func (c *Client) CreateBuilding(buildingDetail *BuildingDetail) (*ResponseBuilding, error)
- func (c *Client) CreateDepartment(department *Department) (*Department, error)
- func (c *Client) DeleteAccountByID(id int) (*http.Response, error)
- func (c *Client) DeleteAllowedFileExtensionByID(id int) error
- func (c *Client) DeleteAllowedFileExtensionByName(extensionName string) error
- func (c *Client) DeleteDepartmentByID(id int) error
- func (c *Client) DeleteDepartmentByName(name string) error
- func (c *Client) GetAccountByID(id int) (*ResponseAccount, error)
- func (c *Client) GetAccountByName(name string) (*ResponseAccount, error)
- func (c *Client) GetAllowedFileExtensionByID(id int) (*AllowedFileExtensionDetail, error)
- func (c *Client) GetAllowedFileExtensionByName(extensionName string) (*AllowedFileExtensionDetail, error)
- func (c *Client) GetAllowedFileExtensions() (*ResponseAllowedFileExtensionsList, error)
- func (c *Client) GetBuildingByID(id int) (*ResponseBuilding, error)
- func (c *Client) GetBuildings() (*ResponseBuildings, error)
- func (c *Client) GetBuildingsByName(name string) (*ResponseBuilding, error)
- func (c *Client) GetDepartmentByID(id string) (*Department, error)
- func (c *Client) GetDepartmentByName(name string) (*Department, error)
- func (c *Client) GetDepartmentIdByName(name string) (string, error)
- func (c *Client) GetDepartments() (*ResponseDepartments, error)
- func (c *Client) GetGroupByID(id int) (*ResponseAccountGroup, error)
- func (c *Client) GetJamfProVersion() (*ResponseJamfProVersion, 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) UpdateDepartmentByID(department *Department) (*Department, error)
- func (c *Client) UpdateDepartmentByName(department *Department) (*Department, error)
- func (c *Client) UpdateFailoverUrl() (*SSOFailoverResponse, error)
- type Department
- type GroupDetail
- type Groups
- type Logger
- type Privilege
- type ResponseAccount
- type ResponseAccountGroup
- type ResponseAccountsList
- type ResponseAllowedFileExtensionsList
- type ResponseBuilding
- type ResponseBuildings
- type ResponseDepartments
- type ResponseJamfProVersion
- 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 AllowedFileExtensionDetail ¶ added in v0.0.9
type BuildingDetail ¶ added in v0.0.8
type BuildingDetail struct { ID int `json:"id,omitempty" xml:"id"` Name string `json:"name,omitempty" xml:"name"` StreetAddress1 string `json:"streetAddress1,omitempty" xml:"streetAddress1,omitempty"` StreetAddress2 string `json:"streetAddress2,omitempty" xml:"streetAddress2,omitempty"` City string `json:"city,omitempty" xml:"city,omitempty"` StateProvince string `json:"stateProvince,omitempty" xml:"stateProvince,omitempty"` ZipPostalCode string `json:"zipPostalCode,omitempty" xml:"zipPostalCode,omitempty"` Country string `json:"country,omitempty" xml:"country,omitempty"` Href string `json:"href,omitempty" xml:"href,omitempty"` }
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) CreateAllowedFileExtension ¶ added in v0.0.9
func (c *Client) CreateAllowedFileExtension(extension *AllowedFileExtensionDetail) (*AllowedFileExtensionDetail, error)
CreateAllowedFileExtension creates a new allowed file extension
func (*Client) CreateBuilding ¶ added in v0.0.9
func (c *Client) CreateBuilding(buildingDetail *BuildingDetail) (*ResponseBuilding, error)
CreateBuilding creates a new building using its ID.
func (*Client) CreateDepartment ¶ added in v0.0.10
func (c *Client) CreateDepartment(department *Department) (*Department, error)
CreateDepartment creates a new department
func (*Client) DeleteAccountByID ¶
DeleteAccountByID deletes an Account using its ID and returns a response.
func (*Client) DeleteAllowedFileExtensionByID ¶ added in v0.0.9
DeleteAllowedFileExtensionByID deletes an existing allowed file extension by ID
func (*Client) DeleteAllowedFileExtensionByName ¶ added in v0.0.9
DeleteAllowedFileExtensionByNameByID deletes an existing allowed file extension by resolving its name to an ID
func (*Client) DeleteDepartmentByID ¶ added in v0.0.10
DeleteDepartmentByID deletes an existing department by its ID
func (*Client) DeleteDepartmentByName ¶ added in v0.0.10
DeleteDepartmentByName deletes an existing department by its name
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) GetAllowedFileExtensionByID ¶ added in v0.0.9
func (c *Client) GetAllowedFileExtensionByID(id int) (*AllowedFileExtensionDetail, error)
GetAllowedFileExtensionByID retrieves the allowed file extension by its ID
func (*Client) GetAllowedFileExtensionByName ¶ added in v0.0.9
func (c *Client) GetAllowedFileExtensionByName(extensionName string) (*AllowedFileExtensionDetail, error)
GetAllowedFileExtensionByName retrieves the allowed file extension by its name
func (*Client) GetAllowedFileExtensions ¶ added in v0.0.9
func (c *Client) GetAllowedFileExtensions() (*ResponseAllowedFileExtensionsList, error)
GetAllowedFileExtensions retrieves all allowed file extensions
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) GetBuildings ¶ added in v0.0.9
func (c *Client) GetBuildings() (*ResponseBuildings, error)
GetBuildings retrieves all buildings.
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) GetDepartmentByID ¶ added in v0.0.10
func (c *Client) GetDepartmentByID(id string) (*Department, error)
GetDepartmentByID retrieves the department by its ID
func (*Client) GetDepartmentByName ¶ added in v0.0.10
func (c *Client) GetDepartmentByName(name string) (*Department, error)
GetDepartmentByName retrieves the department by its name
func (*Client) GetDepartmentIdByName ¶ added in v0.0.10
GetDepartmentIdByName retrieves the department ID by its name
func (*Client) GetDepartments ¶ added in v0.0.10
func (c *Client) GetDepartments() (*ResponseDepartments, error)
GetDepartments retrieves all departments
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) GetJamfProVersion ¶ added in v0.0.10
func (c *Client) GetJamfProVersion() (*ResponseJamfProVersion, error)
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) UpdateDepartmentByID ¶ added in v0.0.10
func (c *Client) UpdateDepartmentByID(department *Department) (*Department, error)
UpdateDepartmentByID updates an existing department
func (*Client) UpdateDepartmentByName ¶ added in v0.0.10
func (c *Client) UpdateDepartmentByName(department *Department) (*Department, error)
UpdateDepartmentByName updates an existing department by 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 Department ¶ added in v0.0.10
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 ResponseAllowedFileExtensionsList ¶ added in v0.0.9
type ResponseAllowedFileExtensionsList struct { XMLName xml.Name `xml:"allowed_file_extensions"` Size int `xml:"size"` AllowedFileExtensions []AllowedFileExtensionDetail `xml:"allowed_file_extension"` }
Response structure for the list of allowed file extensions
type ResponseBuilding ¶ added in v0.0.8
type ResponseBuilding BuildingDetail
ResponseBuilding is now directly the BuildingDetail
type ResponseBuildings ¶ added in v0.0.9
type ResponseBuildings struct { Size int `xml:"size"` Buildings []BuildingDetail `xml:"building"` }
For multiple buildings, the structure remains the same.
type ResponseDepartments ¶ added in v0.0.10
type ResponseDepartments struct { XMLName xml.Name `xml:"departments"` TotalCount int `xml:"size"` Results []Department `xml:"department"` }
Response structure for the list of departments
type ResponseJamfProVersion ¶ added in v0.0.10
type ResponseJamfProVersion struct {
Version *string `json:"Version,omitempty"`
}
type SSOFailoverResponse ¶
type Users ¶
type Users struct {
User []AccountUser `json:"user,omitempty" xml:"user,omitempty"`
}