Documentation ¶
Index ¶
- Constants
- type Asset
- type Association
- type Client
- func (c *Client) AssociateSerialsToApp(appID string, serials []string) (*ManageVPPLicensesByAdamIdSrv, error)
- func (c *Client) CheckAssignedLicense(serial string, appID string) (bool, error)
- func (c *Client) DisassociateSerialsToApp(appID string, serials []string) (*ManageVPPLicensesByAdamIdSrv, error)
- func (c *Client) GetClientConfigSrv(opts ...GetClientConfigSrvOptions) (*ClientConfigSrv, error)
- func (c *Client) GetClientConfigSrvVerbose() (*ClientConfigSrv, error)
- func (c *Client) GetClientContext() (*ClientContext, error)
- func (c *Client) GetLicensesForSerial(serial string) ([]License, error)
- func (c *Client) GetLicensesSrv(options GetLicensesSrvOptions) (*LicensesSrv, error)
- func (c *Client) GetPricingParamForApp(appID string) (string, error)
- func (c *Client) GetVPPAssetsSrv() (*VPPAssetsSrv, error)
- func (c *Client) GetVPPServiceConfigSrv() (*VPPServiceConfigSrv, error)
- func (c *Client) ManageVPPLicensesByAdamIdSrv(appID string, options ManageVPPLicensesByAdamIdSrvOptions) (ManageVPPLicensesByAdamIdSrv, error)
- func (c *Client) SetClientContext(serverURL string) (*ClientContext, error)
- type ClientConfigSrv
- type ClientContext
- type Error
- type GetClientConfigSrvOptions
- type GetLicensesSrvOptions
- type HTTPClient
- type HTTPError
- type License
- type LicensesSrv
- type Location
- type ManageVPPLicensesByAdamIdSrv
- type ManageVPPLicensesByAdamIdSrvOptions
- type VPPAssetsSrv
- type VPPServiceConfigSrv
Constants ¶
const ( XServerProtocolVersionHeader = "X-Server-Protocol-Version" XServerProtocolVersion = "3" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ProductTypeID int `json:"productTypeId"` IsIrrevocable bool `json:"isIrrevocable"` PricingParam string `json:"pricingParam"` AdamIDStr string `json:"adamIdStr"` ProductTypeName string `json:"productTypeName"` DeviceAssignable bool `json:"deviceAssignable"` }
Contains information about VPP Assets
type Association ¶
type Association struct { SerialNumber string `json:"serialNumber,omitempty"` ClientUserIdStr string `json:"clientUserIdStr,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` ErrorCode int `json:"errorCode,omitempty"` ErrorNumber int `json:"errorNumber,omitempty"` LicenseIDStr string `json:"licenseIdStr,omitempty"` LicenseAlreadyAssigned *License `json:"licenseAlreadyAssigned,omitempty"` }
Contains information about an app association
type Client ¶
type Client struct { SToken string VPPServiceConfigSrv *VPPServiceConfigSrv UserAgent string Client HTTPClient BaseURL *url.URL }
Contains the sToken string used to authenticate to the various VPP services Contains the return VPPServiceConfigSrv information
func (*Client) AssociateSerialsToApp ¶
func (c *Client) AssociateSerialsToApp(appID string, serials []string) (*ManageVPPLicensesByAdamIdSrv, error)
Associates a list of serials to a VPP app license
func (*Client) CheckAssignedLicense ¶
Checks if a particular serial is associated with an appID
func (*Client) DisassociateSerialsToApp ¶
func (c *Client) DisassociateSerialsToApp(appID string, serials []string) (*ManageVPPLicensesByAdamIdSrv, error)
Disssociates a list of serials to a VPP app license
func (*Client) GetClientConfigSrv ¶
func (c *Client) GetClientConfigSrv(opts ...GetClientConfigSrvOptions) (*ClientConfigSrv, error)
Gets ClientConfigSrv information
func (*Client) GetClientConfigSrvVerbose ¶
func (c *Client) GetClientConfigSrvVerbose() (*ClientConfigSrv, error)
Gets the appleID field along with the standard information
func (*Client) GetClientContext ¶
func (c *Client) GetClientContext() (*ClientContext, error)
Gets the values that determine which mdm server is associated with a VPP account token
func (*Client) GetLicensesForSerial ¶
Gets licenses with specified serial associated
func (*Client) GetLicensesSrv ¶
func (c *Client) GetLicensesSrv(options GetLicensesSrvOptions) (*LicensesSrv, error)
Gets the LicensesSrv information
func (*Client) GetPricingParamForApp ¶
Gets the pricing param for a particular VPP asset
func (*Client) GetVPPAssetsSrv ¶
func (c *Client) GetVPPAssetsSrv() (*VPPAssetsSrv, error)
Gets information about the VPP Assets associated with a VPP Account token
func (*Client) GetVPPServiceConfigSrv ¶
func (c *Client) GetVPPServiceConfigSrv() (*VPPServiceConfigSrv, error)
func (*Client) ManageVPPLicensesByAdamIdSrv ¶
func (c *Client) ManageVPPLicensesByAdamIdSrv(appID string, options ManageVPPLicensesByAdamIdSrvOptions) (ManageVPPLicensesByAdamIdSrv, error)
Interfaces with the ManageVPPLicensesByAdamIdSrv to managed VPP licenses
func (*Client) SetClientContext ¶
func (c *Client) SetClientContext(serverURL string) (*ClientContext, error)
Sets the values that determine which mdm server is associated with a VPP account token
type ClientConfigSrv ¶
type ClientConfigSrv struct { ClientContext string `json:"clientContext"` AppleID string `json:"appleId,omitempty"` OrganizationIDHash string `json:"organizationIdHash"` Status int `json:"status"` OrganizationID int `json:"organizationId"` UID string `json:"uId"` CountryCode string `json:"countryCode"` Location Location `json:"location"` APNToken string `json:"apnToken"` Email string `json:"email"` }
Contains org information associated with a VPP account token
type ClientContext ¶
Contains information that associates your particular mdm server to a VPP account token
type GetClientConfigSrvOptions ¶
type GetClientConfigSrvOptions func(*getClientConfigSrvOpts) error
These specify options for the ClientConfigSrv
func ClientContextOption ¶
func ClientContextOption(context string) GetClientConfigSrvOptions
ClientContext is an optional argument that can be added to GetClientConfigSrv
func VerboseOption ¶
func VerboseOption(verbose bool) GetClientConfigSrvOptions
Verbose is an optional argument that can be added to GetClientConfigSrv
type GetLicensesSrvOptions ¶
type GetLicensesSrvOptions struct { SToken string `json:"sToken"` SerialNumber string `json:"serialNumber,omitempty"` }
Options for the LicensesSrv
type HTTPError ¶
func NewHTTPError ¶
type License ¶
type License struct { LicenseID int `json:"licenseId"` ProductTypeID int `json:"productTypeId"` IsIrrevocable bool `json:"isIrrevocable"` Status string `json:"status"` PricingParam string `json:"pricingParam"` AdamIDStr string `json:"adamIdStr"` LicenseIDStr string `json:"licenseIdStr"` ProductTypeName string `json:"productTypeName"` AdamID int `json:"adamId"` SerialNumber string `json:"serialNumber"` }
Contains information about VPP Licenses
type LicensesSrv ¶
type LicensesSrv struct { IfModifiedSinceMillisOrig string `json:"ifModifiedSinceMillisOrig"` TotalCount int `json:"totalCount"` Status int `json:"status"` TotalBatchCount string `json:"totalBatchCount"` Licenses []License `json:"licenses"` BatchToken string `json:"batchToken"` BatchCount int `json:"batchCount"` ClientContext string `json:"clientContext"` UID string `json:"uId"` Location Location `json:"location"` }
Contains information about the VPP Licenses associated with a VPP account token
type Location ¶
type Location struct { LocationName string `json:"locationName"` LocationID int `json:"locationId"` }
Contains location information associated with a VPP account token
type ManageVPPLicensesByAdamIdSrv ¶
type ManageVPPLicensesByAdamIdSrv struct { ProductTypeID int `json:"productTypeId,omitempty"` ProductTypeName string `json:"productTypeName,omitempty"` IsIrrevocable bool `json:"isIrrevocable,omitempty"` PricingParam string `json:"pricingParam,omitempty"` UID string `json:"uId,omitempty"` AdamIdStr string `json:"adamIdStr,omitempty"` Status int `json:"status"` ClientContext string `json:"clientContext,omitempty"` Location *Location `json:"location,omitempty"` Associations []Association `json:"associations,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` ErrorNumber int `json:"errorNumber,omitempty"` }
Contains information about a managed license
type ManageVPPLicensesByAdamIdSrvOptions ¶
type ManageVPPLicensesByAdamIdSrvOptions struct { SToken string `json:"sToken"` AdamIDStr string `json:"adamIdStr"` PricingParam string `json:"pricingParam"` AssociateClientUserIdStrs []string `json:"associateClientUserIdStrs,omitempty"` AssociateSerialNumbers []string `json:"associateSerialNumbers,omitempty"` DisassociateClientUserIdStrs []string `json:"disassociateClientUserIdStrs,omitempty"` DisassociateSerialNumbers []string `json:"disassociateSerialNumbers,omitempty"` }
Contains options to pass to the ManageVPPLicensesByAdamIdSrv
type VPPAssetsSrv ¶
type VPPAssetsSrv struct { TotalCount int `json:"totalCount"` Status int `json:"status"` Assets []Asset `json:"assets"` ClientContext string `json:"clientContext"` UID string `json:"uId"` Location Location `json:"location"` }
Contains information about the VPP Assets associated with a VPP account token
type VPPServiceConfigSrv ¶
type VPPServiceConfigSrv struct { EditUserSrvURL string `json:"editUserSrvUrl"` DisassociateLicenseSrvURL string `json:"disassociateLicenseSrvUrl"` ContentMetadataLookupURL string `json:"contentMetadataLookupUrl"` ClientConfigSrvURL string `json:"clientConfigSrvUrl"` GetUserSrvURL string `json:"getUserSrvUrl"` GetUsersSrvURL string `json:"getUsersSrvUrl"` GetLicensesSrvURL string `json:"getLicensesSrvUrl"` GetVPPAssetsSrvURL string `json:"getVPPAssetsSrvUrl"` VppWebsiteURL string `json:"vppWebsiteUrl"` InvitationEmailURL string `json:"invitationEmailUrl"` RetireUserSrvURL string `json:"retireUserSrvUrl"` AssociateLicenseSrvURL string `json:"associateLicenseSrvUrl"` ManageVPPLicensesByAdamIdSrvURL string `json:"manageVPPLicensesByAdamIdSrvUrl"` RegisterUserSrvURL string `json:"registerUserSrvUrl"` MaxBatchAssociateLicenseCount int `json:"maxBatchAssociateLicenseCount"` MaxBatchDisassociateLicenseCount int `json:"maxBatchDisassociateLicenseCount"` Status int `json:"status"` ErrorCodes []Error `json:"errorCodes"` }
Contains the most recent data from Apple for configuring vpp