Documentation ¶
Index ¶
- type Account
- type AccountsResponse
- type BaseAccount
- type BaseType
- type Client
- func (c *Client) CreateBearerToken(ctx context.Context, username string, password string) (string, error)
- func (c *Client) GetAccounts(ctx context.Context) ([]*UserAccount, []*Group, error)
- func (c *Client) GetGroupDetails(ctx context.Context, groupId int) (*Group, error)
- func (c *Client) GetSites(ctx context.Context) (*[]Site, error)
- func (c *Client) GetTokenDetails(ctx context.Context) (*TokenDetails, error)
- func (c *Client) GetUserAccountDetails(ctx context.Context, userId int) (*UserAccount, error)
- func (c *Client) GetUserGroupDetails(ctx context.Context, userGroupId int) (*UserGroup, error)
- func (c *Client) GetUserGroups(ctx context.Context) ([]*UserGroup, error)
- func (c *Client) GetUsers(ctx context.Context) ([]*User, error)
- func (c *Client) SetBearerToken(token string)
- type Group
- type GroupResponse
- type Site
- type SitesResponse
- type TokenDetails
- type TokenResponse
- type User
- type UserAccount
- type UserAccountResponse
- type UserGroup
- type UserGroupResponse
- type UserGroupsResponse
- type UserResponse
- type UsersResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID string `json:"id"` Username string `json:"username"` RealName string `json:"realName"` Email string `json:"email"` MultiSiteAdmin bool `json:"multiSiteAdmin"` AccessLevel string `json:"accessLevel"` PrivilegeSet string `json:"privilegeSet"` CurrentSiteID string `json:"currentSiteId"` }
type AccountsResponse ¶ added in v0.0.4
type AccountsResponse struct {
Accounts BaseAccount `json:"accounts"`
}
type BaseAccount ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient( wrapper *uhttp.BaseHttpClient, token string, instanceURL string, ) *Client
func (*Client) CreateBearerToken ¶ added in v0.0.4
func (c *Client) CreateBearerToken( ctx context.Context, username string, password string, ) (string, error)
CreateBearerToken creates bearer token needed to use the Jamf API.
func (*Client) GetAccounts ¶
GetAccounts returns all Jamf accounts. TODO(marcos): The Jamf API doesn't have pagination, but this method could benefit from parallelization.
func (*Client) GetGroupDetails ¶
GetGroupDetails returns Jamf group details.
func (*Client) GetTokenDetails ¶
func (c *Client) GetTokenDetails(ctx context.Context) (*TokenDetails, error)
GetTokenDetails gets authorization details associated with the current api token.
func (*Client) GetUserAccountDetails ¶
GetUserAccountDetails returns Jamf user account details.
func (*Client) GetUserGroupDetails ¶
GetUserGroupDetails returns Jamf user group details.
func (*Client) GetUserGroups ¶
GetUserGroups returns all Jamf user groups.
func (*Client) SetBearerToken ¶ added in v0.0.4
type GroupResponse ¶ added in v0.0.4
type GroupResponse struct {
Group Group `json:"group"`
}
type SitesResponse ¶ added in v0.0.4
type SitesResponse struct {
Sites []Site `json:"sites"`
}
type TokenDetails ¶
type TokenResponse ¶ added in v0.0.4
type User ¶
type User struct { BaseType FullName string `json:"full_name"` Email string `json:"email"` EmailAddress string `json:"email_address"` Username string `json:"username"` Sites []struct { Site BaseType `json:"site"` } `json:"sites"` }
User - end user in Jamf.
type UserAccount ¶
type UserAccount struct { BaseType FullName string `json:"full_name"` Email string `json:"email"` EmailAddress string `json:"email_address"` Enabled string `json:"enabled"` AccessLevel string `json:"access_level"` PrivilegeSet string `json:"privilege_set"` Site BaseType `json:"site"` }
UserAccount - user that has access to their system and can be granted permissions.
type UserAccountResponse ¶ added in v0.0.4
type UserAccountResponse struct {
UserAccount UserAccount `json:"account"`
}
type UserGroupResponse ¶ added in v0.0.4
type UserGroupResponse struct {
UserGroup UserGroup `json:"user_group"`
}
type UserGroupsResponse ¶ added in v0.0.4
type UserGroupsResponse struct {
UserGroups []UserGroup `json:"user_groups"`
}
type UserResponse ¶ added in v0.0.4
type UserResponse struct {
User User `json:"user"`
}
type UsersResponse ¶ added in v0.0.4
type UsersResponse struct {
Users []BaseType `json:"users"`
}
Click to show internal directories.
Click to hide internal directories.