apple

package module
v0.0.0-...-46cda3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

README

app store manager api golang version

Learning and research version, prohibited for any commercial use

学习和研究版本,禁止用于任何商业用途

Documentation

Index

Constants

View Source
const (
	ProtocolVersion = "QH65B2"
	UserLocale      = "en_US"
	ClientID        = "XABBG36SBA"
	APIKey          = "ba2ec180e6ca6e6c6a542255453b24d6e6e5b2be0cc48bc1b0d8ad64cfe0228f"
)

public const

Variables

View Source
var JSONRequestHeader map[string]string = map[string]string{
	"Accept":           "application/vnd.api+json",
	"Content-Type":     "application/vnd.api+json",
	"X-Apple-App-Info": "com.apple.gs.xcode.auth",
	"X-Xcode-Version":  "7.0 (7A120f)",
	"Accept-Encoding":  "gzip, deflate",
	"User-Agent":       "Xcode",
}

JSONRequestHeader header

View Source
var RequestHeader map[string]string = map[string]string{
	"Host":            "developerservices2.apple.com",
	"Accept":          "text/x-xml-plist",
	"Content-Type":    "text/x-xml-plist",
	"Accept-Language": "en-us",
	"Accept-Encoding": "gzip, deflate",
	"X-Xcode-Version": "7.0 (7A120f)",
}

RequestHeader header

Functions

func AddDevice

func AddDevice(deviceName, deviceNumber, teamID, myacinfo string) (map[string]string, error)

AddDevice add device to developer apple

func BuildSearchQueryString

func BuildSearchQueryString(teamId string, s map[string]string) string

func Capabilities

func Capabilities(teamID, bundleID, capabilityType, myacinfo string) ([]map[string]string, error)

Capabilities

func ContentToPem

func ContentToPem(body string, chunklen uint) string

func CreateCertificateSigningRequest

func CreateCertificateSigningRequest(commonName, emailAddress string, years int) (string, string)

func DeleteCertficate

func DeleteCertficate(Id, teamId, myacinfo string) (bool, error)

DeleteCertficate

func ExportCertficate

func ExportCertficate(csrContent, priKey, password string) ([]byte, error)

ExportCertficate csrContent

func FindDevice

func FindDevice(udid, teamID, myacinfo string) (map[string]string, error)

FindDevice use udid to find device infomation

func GenerateUDID

func GenerateUDID() string

func GetAuth

func GetAuth(email, password string) (map[string]string, error)

GetAuth is Login

func GetDeviceTotal

func GetDeviceTotal(teamID, myacinfo string) (map[string]int, error)

GetDeviceTotal device total

func GetProfileContent

func GetProfileContent(profileId, teamId, myacinfo string) (string, error)

GetProfileContent return base64 encode profileContent

func GetSubject

func GetSubject(commonName, emailAddress string) pkix.Name

func GetTeam

func GetTeam(myacinfo string) ([]byte, error)

GetTeam team info

func GetTeamID

func GetTeamID(myacinfo string) (string, error)

GetTeamID - Get the Apple Developer ID of the current account

func NewClientRequest

func NewClientRequest(rawurl, method string) *clientRequest

NewClientRequest init

Types

type AddAppId

type AddAppId struct {
	AppIds       AppId  `plist:"appId"`
	UserString   string `plist:"userString"`
	Code         int    `plist:"resultCode"`
	PageNumber   int    `plist:"pageNumber"`
	PageSize     int    `plist:"pageSize"`
	TotalRecords int    `plist:"totalRecords"`
}

AppIds

func AddBundleID

func AddBundleID(name, bundleId, platform, myacinfo, teamId string) (AddAppId, error)

addBundleID

type AppId

type AppId struct {
	AppIDID    string `plist:"appIdId"`
	NAME       string `plist:"name"`
	Platform   string `plist:"appIdPlatform"`
	Prefix     string `plist:"prefix"`
	Identifier string `plist:"identifier"`
}

AppId

type AppIds

type AppIds struct {
	AppIds       []AppId `plist:"appIds"`
	UserString   string  `plist:"userString"`
	Code         int     `plist:"resultCode"`
	PageNumber   int     `plist:"pageNumber"`
	PageSize     int     `plist:"pageSize"`
	TotalRecords int     `plist:"totalRecords"`
}

AppIds

func GetBundleLists

func GetBundleLists(myacinfo, teamId string, pageNumber, pageSize int) (AppIds, error)

GetBundleLists lists

type CertificateData

type CertificateData struct {
	CertType   string            `json:"type"`
	Id         string            `json:"id"`
	Attributes map[string]string `json:"attributes"`
}

func CertLists

func CertLists(customSearch map[string]string, teamId, myacinfo string) ([]CertificateData, error)

CertLists filter[id] certificateType

func CreateCertificate

func CreateCertificate(certificateType, csrContent, teamId, myacinfo string) (CertificateData, error)

CreateCertificate info

type DeviceListRequest

type DeviceListRequest struct {
	Devices      []map[string]string `plist:"devices"`
	Error        string              `plist:"userString"`
	Code         int                 `plist:"resultCode"`
	PageNumber   int                 `plist:"pageNumber"`
	PageSize     int                 `plist:"pageSize"`
	TotalRecords int                 `plist:"totalRecords"`
}

DeviceListRequest Devices is device list

func DeviceLists

func DeviceLists(teamID, myacinfo string, pageNumber, pageSize int) (DeviceListRequest, error)

DeviceLists list devices and return DeviceListRequest

type ProfileData

type ProfileData struct {
	Stype      string            `json:"type"`
	Id         string            `json:"id"`
	Attributes map[string]string `json:"attributes"`
}

func ProfileLists

func ProfileLists(customSearch map[string]string, teamId, myacinfo string) ([]ProfileData, error)

ProfileLists get file

type ProvisioningProfile

type ProvisioningProfile struct {
	ProvisioningProfileId string `plist:"provisioningProfileId"`
	Name                  string `plist:"name"`
	Status                string `plist:"status"`
	ProvisioningType      string `plist:"type"`
	DistributionMethod    string `plist:"distributionMethod"`
	ProProPlatform        string `plist:"proProPlatform"`
	UUID                  string `plist:"UUID"`
	Filename              string `plist:"filename"`
	ProfileContent        string `plist:"encodedProfile"`
}

func CreateProfile

func CreateProfile(provisioningProfileName, bundleId, distributionType string, certs, devices []string, isRegen bool, teamId, myacinfo string) (ProvisioningProfile, error)

CreateProfile

Directories

Path Synopsis
Package pkcs12 implements some of PKCS#12.
Package pkcs12 implements some of PKCS#12.
rc2
Package rc2 implements the RC2 cipher https://www.ietf.org/rfc/rfc2268.txt http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf This code is licensed under the MIT license.
Package rc2 implements the RC2 cipher https://www.ietf.org/rfc/rfc2268.txt http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf This code is licensed under the MIT license.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL