Versions in this module Expand all Collapse all v1 v1.0.1 May 31, 2023 v1.0.0 May 31, 2023 Changes in this version + const CustomerMessageAccountDisabled + const CustomerMessageBadLogin + const CustomerMessageSubscriptionRequired + const FailureTypeInvalidCredentials + const FailureTypeLicenseNotFound + const FailureTypePasswordHasChanged + const FailureTypePasswordTokenExpired + const FailureTypeTemporarilyUnavailable + const HTTPHeaderStoreFront + const PriavteAppStoreAPIDomainPrefixWithAuthCode + const PriavteAppStoreAPIDomainPrefixWithoutAuthCode + const PricingParameterAppStore + const PricingParameterAppleArcade + const PrivateAppStoreAPIDomain + const PrivateAppStoreAPIPathAuthenticate + const PrivateAppStoreAPIPathDownload + const PrivateAppStoreAPIPathPurchase + var ErrAccountDisabled = errors.New("account is disabled") + var ErrAppLookup = errors.New("failed to find app") + var ErrAppNotFound = errors.New("failed to find app on the App Store") + var ErrApplyLegacyPatches = errors.New("failed to apply legacy patches") + var ErrApplyPatches = errors.New("failed to apply patches") + var ErrAuthCodeRequired = errors.New("auth code is required") + var ErrCheckDirectory = errors.New("failed to determine if the supplied path is a directory") + var ErrCreateDestinationFile = errors.New("failed to create destination file") + var ErrCreateMetadataFile = errors.New("failed to create metadata file") + var ErrCreateRequest = errors.New("failed to create HTTP request") + var ErrCreateSinfFile = errors.New("failed to create sinf file") + var ErrDecompressInfoFile = errors.New("failed to open decompressed info file") + var ErrDecompressManifestFile = errors.New("failed to open decompressed manifest file") + var ErrDownloadFile = errors.New("failed to download file") + var ErrEncodeMetadataFile = errors.New("failed to encode metadata") + var ErrFileWrite = errors.New("failed to write file") + var ErrGeneric = errors.New("failed due to an unknown error") + var ErrGetAccount = errors.New("failed to get account") + var ErrGetBundleName = errors.New("failed to determine name of app bundle") + var ErrGetCurrentDirectory = errors.New("failed to get current directory path") + var ErrGetData = errors.New("failed to get data") + var ErrGetExecutablePath = errors.New("failed to get executable path") + var ErrGetFileMetadata = errors.New("failed to get file metadata") + var ErrGetInfoFile = errors.New("failed to read info file") + var ErrGetKeychainItem = errors.New("failed to read item from keychain") + var ErrGetMAC = errors.New("failed to get MAC address") + var ErrGetManifestFile = errors.New("failed to read manifest file") + var ErrInvalidCountryCode = errors.New("invalid country code") + var ErrInvalidResponse = errors.New("received 0 items from the App Store; expected 1 or more") + var ErrInvalidStoreFront = errors.New("could not infer country code from store front") + var ErrLicenseExists = errors.New("account already has a license for this app") + var ErrLicenseRequired = errors.New("license is required") + var ErrLogin = errors.New("failed to log in") + var ErrMarshal = errors.New("failed to marshal data") + var ErrOpenFile = errors.New("failed to open file") + var ErrOpenZipFile = errors.New("failed to open zip file") + var ErrPaidApp = errors.New("paid apps cannot be purchased") + var ErrPasswordRequired = errors.New(...) + var ErrPasswordTokenEmpty = errors.New("password token is empty") + var ErrPasswordTokenExpired = errors.New("password token is expired") + var ErrPatchApp = errors.New("failed to patch app package") + var ErrPurchase = errors.New("failed to purchase app") + var ErrRemoveKeychainItem = errors.New("failed to remove item from keychain") + var ErrRemoveTempFile = errors.New("failed to remove temporary file") + var ErrReplicateZip = errors.New("failed to replicate zip") + var ErrRequest = errors.New("failed to send request") + var ErrResolveDestinationPath = errors.New("failed to resolve destination path") + var ErrSetKeychainItem = errors.New("failed to save item in keychain") + var ErrSubscriptionRequired = errors.New("subscription required") + var ErrTemporarilyUnavailable = errors.New("item is temporarily unavailable") + var ErrUnmarshal = errors.New("failed to unmarshal data") + var ErrWriteMetadataFile = errors.New("failed to write metadata") + var ErrWriteSinfData = errors.New("failed to write sinf data") + var ErrZipSinfs = errors.New("failed to zip sinfs and sinf paths") + var StoreFronts = map[string]string + type Account struct + DirectoryServicesID string + Email string + Name string + Password string + PasswordToken string + StoreFront string + type App struct + BundleID string + ID int64 + Name string + Price float64 + Version string + func (a App) MarshalZerologObject(event *zerolog.Event) + type AppStore interface + Download func(bundleID string, outputPath string, acquireLicense bool) (DownloadOutput, error) + DownloadFileV2 func(dst, sourceURL string) (err error) + DownloadV2 func(bundleID string, acquireLicense bool) (DownloadItemResult, error) + Info func() (InfoOutput, error) + Login func(email, password, authCode string) (LoginOutput, error) + LoginFirstMaybe func(email, password string) error + Lookup func(bundleID string) (LookupOutput, error) + Purchase func(bundleID string) error + Revoke func() error + Search func(term string, limit int64) (SearchOutput, error) + func NewAppStore(args AppStoreArgs) AppStore + type AppStoreArgs struct + CookieJar http.CookieJar + Interactive bool + Keychain keychain.Keychain + Logger log.Logger + Machine util.Machine + OperatingSystem util.OperatingSystem + type Apps []App + func (apps Apps) MarshalZerologArray(a *zerolog.Array) + type DownloadItemResult struct + HashMD5 string + Metadata map[string]interface{} + Sinfs []DownloadSinfResult + URL string + type DownloadOutput struct + DestinationPath string + type DownloadResult struct + CustomerMessage string + FailureType string + Items []DownloadItemResult + type DownloadSinfResult struct + Data []byte + ID int64 + type InfoOutput struct + Email string + Name string + type LoginAccountResult struct + Address LoginAddressResult + Email string + type LoginAddressResult struct + FirstName string + LastName string + type LoginOutput struct + Email string + Name string + type LoginResult struct + Account LoginAccountResult + CustomerMessage string + DirectoryServicesID string + FailureType string + PasswordToken string + type LookupOutput struct + App App + type PackageInfo struct + BundleExecutable string + type PackageManifest struct + SinfPaths []string + type PurchaseResult struct + CustomerMessage string + FailureType string + JingleDocType string + Status int + type SearchOutput = SearchResult + type SearchResult struct + Count int + Results []App