Documentation
¶
Index ¶
- Constants
- Variables
- type App
- type AppAttributes
- type AppResponse
- type AppStore
- func (as *AppStore) CreateCertificate(ctype string, csrData string) (*Certificate, error)
- func (as *AppStore) CreateProfile(name string, ptype string, bundleID string, cerIDs, devicesIDs []string) (*ProfileResponse, error)
- func (as *AppStore) DeleteBundleID(id string) (*BundleIdResponse, error)
- func (as *AppStore) DeleteProfile(id string) error
- func (as *AppStore) EnableCapability(id, ctype string) (*BundleIdCapability, error)
- func (as *AppStore) GenerateToken(life time.Duration) (string, error)
- func (as *AppStore) GetApps() ([]App, error)
- func (as *AppStore) GetBundleID(id string) (*BundleID, error)
- func (as *AppStore) GetBundleIDApp(id string) (*AppResponse, error)
- func (as *AppStore) GetBundleIDCapabilities(id string) (*BundleIdCapabilitiesResponse, error)
- func (as *AppStore) GetBundleIDProfiles(id string) (*ProfileResponse, error)
- func (as *AppStore) GetBundleIDs() ([]BundleID, error)
- func (as *AppStore) GetCertificates() ([]Certificate, error)
- func (as *AppStore) GetDevices() ([]Device, error)
- func (as *AppStore) GetProfile(id string) (*Profile, error)
- func (as *AppStore) GetProfileBundleID(id string) (*BundleID, error)
- func (as *AppStore) GetProfileCerts(id string) ([]Certificate, error)
- func (as *AppStore) GetProfileDevices(id string) ([]Device, error)
- func (as *AppStore) GetProfiles() ([]Profile, error)
- func (as *AppStore) GetToken() string
- func (as *AppStore) ModifyDevice(id, name, status string) (*Device, error)
- func (as *AppStore) RegisterBundleID(name, id string) (*BundleIdResponse, error)
- func (as *AppStore) RegisterDevice(name, platform, udid string) (*Device, error)
- func (as *AppStore) RevokeCertificate(id string) error
- type AppsResponse
- type BundleID
- type BundleIDCapabilityCreateRequest
- type BundleIdCapabilitiesResponse
- type BundleIdCapability
- type BundleIdCapabilityResponse
- type BundleIdCreateRequest
- type BundleIdResponse
- type BundleIdsResponse
- type CapabilityOption
- type CapabilitySetting
- type Certificate
- type CertificateCreateRequest
- type CertificateResponse
- type CertificatesResponse
- type Data
- type Date
- type Device
- type DeviceCreateRequest
- type DeviceResponse
- type DeviceUpdateRequest
- type DevicesResponse
- type DocumentLinks
- type ErrorResponse
- type Errors
- type Links
- type Meta
- type PagedDocumentLinks
- type Profile
- type ProfileCreateRequest
- type ProfileResponse
- type ProfileType
- type ProfilesResponse
- type ResourceLinks
Constants ¶
const ( V1 subscriptionStatusUrlVersion = "V1" V2 subscriptionStatusUrlVersion = "V2" LowerV1 subscriptionStatusUrlVersion = "v1" LowerV2 subscriptionStatusUrlVersion = "v2" )
const ( IOS bundleIdPlatform = "IOS" MAC_OS bundleIdPlatform = "MAC_OS" )
const ( ICLOUD capabilityType = "ICLOUD" IN_APP_PURCHASE capabilityType = "IN_APP_PURCHASE" GAME_CENTER capabilityType = "GAME_CENTER" PUSH_NOTIFICATIONS capabilityType = "PUSH_NOTIFICATIONS" WALLET capabilityType = "WALLET" INTER_APP_AUDIO capabilityType = "INTER_APP_AUDIO" MAPS capabilityType = "MAPS" ASSOCIATED_DOMAINS capabilityType = "ASSOCIATED_DOMAINS" PERSONAL_VPN capabilityType = "PERSONAL_VPN" APP_GROUPS capabilityType = "APP_GROUPS" HEALTHKIT capabilityType = "HEALTHKIT" HOMEKIT capabilityType = "HOMEKIT" WIRELESS_ACCESSORY_CONFIGURATION capabilityType = "WIRELESS_ACCESSORY_CONFIGURATION" APPLE_PAY capabilityType = "APPLE_PAY" DATA_PROTECTION capabilityType = "DATA_PROTECTION" SIRIKIT capabilityType = "SIRIKIT" NETWORK_EXTENSIONS capabilityType = "NETWORK_EXTENSIONS" MULTIPATH capabilityType = "MULTIPATH" HOT_SPOT capabilityType = "HOT_SPOT" NFC_TAG_READING capabilityType = "NFC_TAG_READING" CLASSKIT capabilityType = "CLASSKIT" AUTOFILL_CREDENTIAL_PROVIDER capabilityType = "AUTOFILL_CREDENTIAL_PROVIDER" ACCESS_WIFI_INFORMATION capabilityType = "ACCESS_WIFI_INFORMATION" NETWORK_CUSTOM_PROTOCOL capabilityType = "NETWORK_CUSTOM_PROTOCOL" COREMEDIA_HLS_LOW_LATENCY capabilityType = "COREMEDIA_HLS_LOW_LATENCY" SYSTEM_EXTENSION_INSTALL capabilityType = "SYSTEM_EXTENSION_INSTALL" USER_MANAGEMENT capabilityType = "USER_MANAGEMENT" APPLE_ID_AUTH capabilityType = "APPLE_ID_AUTH" )
const ( ENTRY allowedInstanceType = "ENTRY" SINGLE allowedInstanceType = "SINGLE" MULTIPLE allowedInstanceType = "MULTIPLE" )
const ( ICLOUD_VERSION capabilityKey = "ICLOUD_VERSION" DATA_PROTECTION_PERMISSION_LEVEL capabilityKey = "DATA_PROTECTION_PERMISSION_LEVEL" APPLE_ID_AUTH_APP_CONSENT capabilityKey = "APPLE_ID_AUTH_APP_CONSENT" )
const ( XCODE_5 capabilityOptionKey = "XCODE_5" XCODE_6 capabilityOptionKey = "XCODE_6" COMPLETE_PROTECTION capabilityOptionKey = "COMPLETE_PROTECTION" PROTECTED_UNLESS_OPEN capabilityOptionKey = "PROTECTED_UNLESS_OPEN" PROTECTED_UNTIL_FIRST_USER_AUTH capabilityOptionKey = "PROTECTED_UNTIL_FIRST_USER_AUTH" PRIMARY_APP_CONSENT capabilityOptionKey = "PRIMARY_APP_CONSENT" )
const ( CT_IOS_DEVELOPMENT certificateType = "IOS_DEVELOPMENT" CT_IOS_DISTRIBUTION certificateType = "IOS_DISTRIBUTION" CT_MAC_APP_DISTRIBUTION certificateType = "MAC_APP_DISTRIBUTION" CT_MAC_INSTALLER_DISTRIBUTION certificateType = "MAC_INSTALLER_DISTRIBUTION" CT_MAC_APP_DEVELOPMENT certificateType = "MAC_APP_DEVELOPMENT" CT_DEVELOPER_ID_KEXT certificateType = "DEVELOPER_ID_KEXT" CT_DEVELOPER_ID_APPLICATION certificateType = "DEVELOPER_ID_APPLICATION" CT_DEVELOPMENT certificateType = "DEVELOPMENT" CT_DISTRIBUTION certificateType = "DISTRIBUTION" CT_PASS_TYPE_ID certificateType = "PASS_TYPE_ID" CT_PASS_TYPE_ID_WITH_NFC certificateType = "PASS_TYPE_ID_WITH_NFC" )
Variables ¶
var CertTypes = []string{
"IOS_DEVELOPMENT",
"IOS_DISTRIBUTION",
"MAC_APP_DISTRIBUTION",
"MAC_INSTALLER_DISTRIBUTION",
"MAC_APP_DEVELOPMENT",
"DEVELOPER_ID_KEXT",
"DEVELOPER_ID_APPLICATION",
"DEVELOPMENT",
"DISTRIBUTION",
"PASS_TYPE_ID",
"PASS_TYPE_ID_WITH_NFC",
}
var ProfileTypes = []string{
"IOS_APP_DEVELOPMENT",
"IOS_APP_STORE",
"IOS_APP_ADHOC",
"IOS_APP_INHOUSE",
"MAC_APP_DEVELOPMENT",
"MAC_APP_STORE",
"MAC_APP_DIRECT",
"TVOS_APP_DEVELOPMENT",
"TVOS_APP_STORE",
"TVOS_APP_ADHOC",
"TVOS_APP_INHOUSE",
"MAC_CATALYST_APP_DEVELOPMENT",
"MAC_CATALYST_APP_STORE",
"MAC_CATALYST_APP_DIRECT",
}
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
ID string `json:"id"`
Type string `json:"type"` // apps
Attributes AppAttributes `json:"attributes"`
Relationships any `json:"relationships"`
Links Links `json:"links"`
}
type AppAttributes ¶
type AppAttributes struct {
BundleID string `json:"bundleId"`
Name string `json:"name"`
Locale string `json:"primaryLocale"`
SKU string `json:"sku"`
AvailableInNewTerritories bool `json:"availableInNewTerritories,omitempty"`
ContentRightsDeclaration string `json:"contentRightsDeclaration"` // DOES_NOT_USE_THIRD_PARTY_CONTENT, USES_THIRD_PARTY_CONTENT
IsOrEverWasMadeForKids bool `json:"isOrEverWasMadeForKids"`
SubscriptionStatusURL string `json:"subscriptionStatusUrl"`
SubscriptionStatusURLForSandbox string `json:"subscriptionStatusUrlForSandbox"`
SubscriptionStatusURLVersion subscriptionStatusUrlVersion `json:"subscriptionStatusUrlVersion"`
SubscriptionStatusURLVersionForSandbox subscriptionStatusUrlVersion `json:"subscriptionStatusUrlVersionForSandbox"`
}
type AppResponse ¶
type AppResponse struct {
Data App `json:"data"`
Links DocumentLinks `json:"links"`
}
type AppStore ¶
type AppStore struct {
P8 string
Iss string
Kid string
Proxy string
Insecure bool
// contains filtered or unexported fields
}
func NewAppStore ¶
NewAppStore creates a new App Store Connect API object
func (*AppStore) CreateCertificate ¶
func (as *AppStore) CreateCertificate(ctype string, csrData string) (*Certificate, error)
CreateCertificate creates a new certificate using a certificate signing request.
func (*AppStore) CreateProfile ¶
func (as *AppStore) CreateProfile(name string, ptype string, bundleID string, cerIDs, devicesIDs []string) (*ProfileResponse, error)
CreateProfile creates a new profile
func (*AppStore) DeleteBundleID ¶
func (as *AppStore) DeleteBundleID(id string) (*BundleIdResponse, error)
DeleteBundleID deletes a bundle ID that is used for app development.
func (*AppStore) DeleteProfile ¶
DeleteProfile deletes a provisioning profile that is used for app development or distribution.
func (*AppStore) EnableCapability ¶
func (as *AppStore) EnableCapability(id, ctype string) (*BundleIdCapability, error)
EnableCapability enables a capability for a bundle ID.. // TODO: finish this
func (*AppStore) GenerateToken ¶
GenerateToken generates a new JWT token
func (*AppStore) GetBundleID ¶
GetBundleID returns information about a specific bundle ID.
func (*AppStore) GetBundleIDApp ¶
func (as *AppStore) GetBundleIDApp(id string) (*AppResponse, error)
GetBundleIDApp returns the app information for a specific bundle ID.
func (*AppStore) GetBundleIDCapabilities ¶
func (as *AppStore) GetBundleIDCapabilities(id string) (*BundleIdCapabilitiesResponse, error)
GetBundleIDCapabilities returns a list of all capabilities for a specific bundle ID.
func (*AppStore) GetBundleIDProfiles ¶
func (as *AppStore) GetBundleIDProfiles(id string) (*ProfileResponse, error)
GetBundleIDProfiles returns a list of all provisioning profiles for a specific bundle ID.
func (*AppStore) GetBundleIDs ¶
GetBundleIDs returns a list bundle IDs that are registered to your team.
func (*AppStore) GetCertificates ¶
func (as *AppStore) GetCertificates() ([]Certificate, error)
GetCertificates returns a list certificates and download their data.
func (*AppStore) GetDevices ¶
GetDevices returns a list devices registered to your team.
func (*AppStore) GetProfile ¶
GetProfile returns a provisioning profile and download their data.
func (*AppStore) GetProfileBundleID ¶
GetProfileBundleID returns the bundle ID information for a specific provisioning profile.
func (*AppStore) GetProfileCerts ¶
func (as *AppStore) GetProfileCerts(id string) ([]Certificate, error)
GetProfileCerts returns a list of all certificates and their data for a specific provisioning profile.
func (*AppStore) GetProfileDevices ¶
GetProfileDevices returns a list of all devices for a specific provisioning profile
func (*AppStore) GetProfiles ¶
GetProfiles returns a list provisioning profiles and download their data.
func (*AppStore) ModifyDevice ¶
ModifyDevice updates the name or status of a specific device.
func (*AppStore) RegisterBundleID ¶
func (as *AppStore) RegisterBundleID(name, id string) (*BundleIdResponse, error)
RegisterBundleID registers a new bundle ID for app development.
func (*AppStore) RegisterDevice ¶
RegisterDevice registers a new device for app development.
func (*AppStore) RevokeCertificate ¶
RevokeCertificate revokes a lost, stolen, compromised, or expiring signing certificate.
type AppsResponse ¶
type AppsResponse struct {
Data []App `json:"data"`
Links PagedDocumentLinks `json:"links"`
Meta Meta `json:"meta"`
}
type BundleID ¶
type BundleID struct {
ID string `json:"id"`
Type string `json:"type"` // bundleIds
Attributes struct {
ID string `json:"identifier"`
Name string `json:"name"`
Platform bundleIdPlatform `json:"platform"`
SeedID string `json:"seedId"`
} `json:"attributes"`
Relationships struct {
Capabilities BundleIdCapabilitiesResponse `json:"bundleIdCapabilities"`
Profiles struct {
Data []struct {
ID string `json:"id"`
Type string `json:"type"` // profiles
} `json:"data"`
Meta Meta `json:"meta"`
Links Links `json:"links"`
} `json:"profiles"`
App struct {
Data struct {
ID string `json:"id"`
Type string `json:"type"` // apps
} `json:"data"`
Links Links `json:"links"`
} `json:"app"`
} `json:"relationships"`
Links Links `json:"links"`
}
type BundleIDCapabilityCreateRequest ¶
type BundleIDCapabilityCreateRequest struct {
Data struct {
Type string `json:"type"` // bundleIdCapabilities
Attributes struct {
CapabilityType capabilityType `json:"capabilityType"`
Settings []CapabilitySetting `json:"settings"`
} `json:"attributes"`
Relationships struct {
BundleID struct {
Data struct {
ID string `json:"id"`
Type string `json:"type"` // bundleIds
} `json:"data"`
} `json:"bundleId"`
} `json:"relationships"`
} `json:"data"`
}
type BundleIdCapabilitiesResponse ¶
type BundleIdCapabilitiesResponse struct {
Data []BundleIdCapability `json:"data"`
Links Links `json:"links"`
Meta Meta `json:"meta"`
}
type BundleIdCapability ¶
type BundleIdCapability struct {
ID string `json:"id"`
Type string `json:"type"` // bundleIdCapabilities
Attributes struct {
CapabilityType capabilityType `json:"capabilityType"`
Settings []CapabilitySetting `json:"settings"`
} `json:"attributes"`
Links ResourceLinks `json:"links"`
}
type BundleIdCapabilityResponse ¶
type BundleIdCapabilityResponse struct {
Data BundleIdCapability `json:"data"`
Links DocumentLinks `json:"links"`
}
type BundleIdCreateRequest ¶
type BundleIdResponse ¶
type BundleIdsResponse ¶
type CapabilityOption ¶
type CapabilitySetting ¶
type CapabilitySetting struct {
AllowedInstances allowedInstanceType `json:"allowedInstances"`
Description string `json:"description"`
Enabled bool `json:"enabledByDefault"`
Key capabilityKey `json:"key"`
Name string `json:"name"`
Options []CapabilityOption `json:"options"`
Visible bool `json:"visible"`
MinInstances int `json:"minInstances"`
}
type Certificate ¶
type Certificate struct {
Type string `json:"type"`
ID string `json:"id"`
Attributes struct {
SerialNumber string `json:"serialNumber"`
CertificateContent []byte `json:"certificateContent"`
DisplayName string `json:"displayName"`
Name string `json:"name"`
CsrContent any `json:"csrContent"`
Platform string `json:"platform"`
ExpirationDate Date `json:"expirationDate"`
CertificateType string `json:"certificateType"`
} `json:"attributes"`
Links Links `json:"links"`
}
func (Certificate) IsExpired ¶
func (c Certificate) IsExpired() bool
type CertificateResponse ¶
type CertificateResponse struct {
Data Certificate `json:"data"`
Links Links `json:"links"`
}
type CertificatesResponse ¶
type CertificatesResponse struct {
Data []Certificate `json:"data"`
Links PagedDocumentLinks `json:"links"`
Meta Meta `json:"meta"`
}
type Device ¶
type Device struct {
Type string `json:"type"`
ID string `json:"id"`
Attributes struct {
AddedDate Date `json:"addedDate"`
Name string `json:"name"`
DeviceClass string `json:"deviceClass"`
Model string `json:"model"`
Udid string `json:"udid"`
Platform string `json:"platform"`
Status string `json:"status"`
} `json:"attributes"`
Links Links `json:"links"`
}
type DeviceCreateRequest ¶
type DeviceCreateRequest struct {
Data struct {
Type string `json:"type"` // devices
Attributes struct {
Name string `json:"name"`
DeviceClass string `json:"deviceClass"`
Model string `json:"model"`
Udid string `json:"udid"`
Platform bundleIdPlatform `json:"platform"`
} `json:"attributes"`
} `json:"data"`
}
type DeviceResponse ¶
type DeviceUpdateRequest ¶
type DevicesResponse ¶
type DocumentLinks ¶
type DocumentLinks struct {
Self string `json:"self"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Errors []Errors `json:"errors"`
}
type PagedDocumentLinks ¶
type Profile ¶
type Profile struct {
ID string `json:"id"`
Type ProfileType `json:"type"` // profiles
Attributes struct {
ProfileState string `json:"profileState"`
CreatedDate Date `json:"createdDate"`
ProfileType string `json:"profileType"`
Name string `json:"name"`
ProfileContent []byte `json:"profileContent"`
UUID string `json:"uuid"`
Platform string `json:"platform"`
ExpirationDate Date `json:"expirationDate"`
} `json:"attributes"`
Relationships struct {
BundleID struct {
Data struct {
Type string `json:"type"`
ID string `json:"id"`
} `json:"data"`
Links struct {
Self string `json:"self"`
Related string `json:"related"`
} `json:"links"`
} `json:"bundleId"`
Certificates struct {
Meta struct {
Paging struct {
Total int `json:"total"`
Limit int64 `json:"limit"`
} `json:"paging"`
} `json:"meta"`
Data []struct {
Type string `json:"type"`
ID string `json:"id"`
} `json:"data"`
Links struct {
Self string `json:"self"`
Related string `json:"related"`
} `json:"links"`
} `json:"certificates"`
Devices struct {
Meta struct {
Paging struct {
Total int `json:"total"`
Limit int64 `json:"limit"`
} `json:"paging"`
} `json:"meta"`
Data []struct {
Type string `json:"type"`
ID string `json:"id"`
} `json:"data"`
Links struct {
Self string `json:"self"`
Related string `json:"related"`
} `json:"links"`
} `json:"devices"`
} `json:"relationships"`
Links Links `json:"links"`
}
type ProfileCreateRequest ¶
type ProfileCreateRequest struct {
Data struct {
Type string `json:"type"` // profiles
Attributes struct {
Name string `json:"name"`
ProfileType string `json:"profileType"`
} `json:"attributes"`
Relationships struct {
BundleID struct {
Data Data `json:"data"`
} `json:"bundleId"`
Certificates struct {
Data []Data `json:"data"`
} `json:"certificates"`
Devices struct {
Data []Data `json:"data"`
} `json:"devices"`
} `json:"relationships"`
} `json:"data"`
}
type ProfileResponse ¶
type ProfileResponse struct {
Data Profile `json:"data"`
Links DocumentLinks `json:"links"`
}
type ProfileType ¶
type ProfileType string
const ( IOS_APP_DEVELOPMENT ProfileType = "IOS_APP_DEVELOPMENT" IOS_APP_STORE ProfileType = "IOS_APP_STORE" IOS_APP_ADHOC ProfileType = "IOS_APP_ADHOC" IOS_APP_INHOUSE ProfileType = "IOS_APP_INHOUSE" MAC_APP_DEVELOPMENT ProfileType = "MAC_APP_DEVELOPMENT" MAC_APP_STORE ProfileType = "MAC_APP_STORE" MAC_APP_DIRECT ProfileType = "MAC_APP_DIRECT" TVOS_APP_DEVELOPMENT ProfileType = "TVOS_APP_DEVELOPMENT" TVOS_APP_STORE ProfileType = "TVOS_APP_STORE" TVOS_APP_ADHOC ProfileType = "TVOS_APP_ADHOC" TVOS_APP_INHOUSE ProfileType = "TVOS_APP_INHOUSE" MAC_CATALYST_APP_DEVELOPMENT ProfileType = "MAC_CATALYST_APP_DEVELOPMENT" MAC_CATALYST_APP_STORE ProfileType = "MAC_CATALYST_APP_STORE" MAC_CATALYST_APP_DIRECT ProfileType = "MAC_CATALYST_APP_DIRECT" )
type ProfilesResponse ¶
type ResourceLinks ¶
type ResourceLinks struct {
Self string `json:"self"`
}