asc

package
v1.379.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AppId    int    `json:"app_id"`
	AppName  string `json:"app_name"`
	BundleId string `json:"bundle_id"`
	JamfId   string `json:"jamf_id"`
}

type CreateReleaseResponse

type CreateReleaseResponse struct {
	Status  string  `json:"status"`
	Message string  `json:"message"`
	LastID  int     `json:"lastID"`
	Data    Release `json:"data"`
}

type JamfAppInformationResponse

type JamfAppInformationResponse struct {
	MobileDeviceApplication JamfMobileDeviceApplication `json:"mobile_device_application"`
}

type JamfMobileDeviceApplication

type JamfMobileDeviceApplication struct {
	General JamfMobileDeviceApplicationGeneral `json:"general"`
}

type JamfMobileDeviceApplicationGeneral

type JamfMobileDeviceApplicationGeneral struct {
	Id int `json:"id"`
}

type Release

type Release struct {
	ReleaseID    int       `json:"release_id"`
	AppID        int       `json:"app_id"`
	Version      string    `json:"version"`
	Description  string    `json:"description"`
	ReleaseDate  time.Time `json:"release_date"`
	SortOrder    any       `json:"sort_order"`
	Visible      bool      `json:"visible"`
	Created      time.Time `json:"created"`
	FileMetadata any       `json:"file_metadata"`
}

type System

type System interface {
	GetAppById(appId string) (App, error)
	CreateRelease(ascAppId int, version string, description string, releaseDate string, visible bool) (CreateReleaseResponse, error)
	GetJamfAppInfo(bundleId string, jamfTargetSystem string) (JamfAppInformationResponse, error)
	UploadIpa(path string, jamfAppId int, jamfTargetSystem string, bundleId string, ascRelease Release) error
}

type SystemInstance

type SystemInstance struct {
	// contains filtered or unexported fields
}

SystemInstance is the client communicating with the ASC backend

func NewSystemInstance

func NewSystemInstance(client *piperHttp.Client, serverURL, token string) (*SystemInstance, error)

NewSystemInstance returns a new ASC client for communicating with the backend

func (*SystemInstance) CreateRelease

func (sys *SystemInstance) CreateRelease(ascAppId int, version string, description string, releaseDate string, visible bool) (CreateReleaseResponse, error)

CreateRelease creates a release in ASC

func (*SystemInstance) GetAppById

func (sys *SystemInstance) GetAppById(appId string) (App, error)

GetAppById returns the app addressed by appId from the ASC backend

func (*SystemInstance) GetJamfAppInfo

func (sys *SystemInstance) GetJamfAppInfo(bundleId string, jamfTargetSystem string) (JamfAppInformationResponse, error)

GetJamfAppInfo fetches information about the app from Jamf

func (*SystemInstance) UploadIpa

func (sys *SystemInstance) UploadIpa(path string, jamfAppId int, jamfTargetSystem string, bundleId string, ascRelease Release) error

UploadIpa uploads the ipa to ASC and therewith to Jamf

Jump to

Keyboard shortcuts

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