Documentation ¶
Index ¶
- func ReadDeploymentConfig(reader io.Reader, os string, arch string) (string, error)
- func ValidateDeploymentConfig(expandedDeploymentConfig string) error
- func WriteInfo(info *BundleInfo, filePath string)
- type BundleConfig
- type BundleInfo
- type Command
- type DeploymentConfig
- type ExecutionConfig
- type FileInfo
- type FileInfoMap
- func (fm FileInfoMap) DeleteFileCount() uint64
- func (bundleFiles FileInfoMap) FilePaths() []string
- func (infoMap FileInfoMap) FirstPathElement(sep rune) (firstElement string)
- func (bundleFiles FileInfoMap) ForOS() FileInfoMap
- func (fm FileInfoMap) HasChanges() bool
- func (fm FileInfoMap) HasUpdates() bool
- func (fm FileInfoMap) Join(other FileInfoMap)
- func (fm FileInfoMap) MustGetOnly() (key string, fileInfo *FileInfo)
- func (bundleFiles FileInfoMap) OmitEntriesWithMissingSha() FileInfoMap
- func (bundleFiles FileInfoMap) Prepend(pathElement string, sep rune) FileInfoMap
- func (infoMap FileInfoMap) StripFirstPathElement(sep rune) FileInfoMap
- func (fm FileInfoMap) UpdateByteCount() uint64
- func (fm FileInfoMap) UpdateFileCount() uint64
- func (bundleFiles FileInfoMap) WithForwardSlashes() FileInfoMap
- type HashDataConfig
- type LauncherConfig
- type LauncherUpdateConfig
- type Platform
- type StatusMessages
- type VersionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadDeploymentConfig ¶
func WriteInfo ¶
func WriteInfo(info *BundleInfo, filePath string)
Types ¶
type BundleConfig ¶
type BundleConfig struct { HashDataConfig LocalDirectory string `json:"LocalDirectory"` TargetPlatforms []string `json:"TargetPlatforms,omitempty"` Tags []string `json:"Tags,omitempty"` }
func FilterBundlesByPlatform ¶
func FilterBundlesByPlatform(bundles []BundleConfig, os string, arch string) []BundleConfig
type BundleInfo ¶
type BundleInfo struct { Timestamp string `json:"Timestamp"` UniqueBundleName string `json:"UniqueBundleName"` BundleFiles FileInfoMap `json:"BundleFiles"` // Within BundleInfo, keys are filepaths with forward slashes. }
func ReadInfo ¶
func ReadInfo(filePath string) *BundleInfo
func ReadInfoFromByteSlice ¶
func ReadInfoFromByteSlice(data []byte) *BundleInfo
func ReadInfoFromReader ¶
func ReadInfoFromReader(reader *strings.Reader) *BundleInfo
func (*BundleInfo) GetFileHashes ¶
func (info *BundleInfo) GetFileHashes() FileInfoMap
GetFileHashes returns a FileInfoMap for the info's BundleFiles using filepath.Separator in the place of forward slashes.
type Command ¶
type DeploymentConfig ¶
type DeploymentConfig struct { Timestamp string `json:"Timestamp,omitempty"` LauncherUpdate []LauncherUpdateConfig `json:"LauncherUpdate,omitempty"` Bundles []BundleConfig `json:"Bundles,omitempty"` Execution ExecutionConfig `json:"Execution,omitempty"` }
func ParseDeploymentConfig ¶
func ParseDeploymentConfig(reader io.Reader, os string, arch string) (deploymentConfig *DeploymentConfig)
func (*DeploymentConfig) GetLauncherUpdateConfig ¶
func (dc *DeploymentConfig) GetLauncherUpdateConfig() *LauncherUpdateConfig
func (*DeploymentConfig) HasLauncherUpdateConfig ¶
func (dc *DeploymentConfig) HasLauncherUpdateConfig() bool
type ExecutionConfig ¶
type FileInfoMap ¶
func MakeDiffFileInfoMap ¶
func MakeDiffFileInfoMap(have FileInfoMap, want FileInfoMap) FileInfoMap
Returns a FileInfoMap which describes the changes from have to want. In the returned FileInfoMap, a key which maps to a *FileInfo with its SHA256-field being non-empty indicates that the file described by the key-string requires an update or is new. A key which maps to a *FileInfo with an empty SHA256-field indicates that the file described by the key-string should be removed.
func NewFileInfoMap ¶
func NewFileInfoMap() FileInfoMap
func (FileInfoMap) DeleteFileCount ¶
func (fm FileInfoMap) DeleteFileCount() uint64
func (FileInfoMap) FilePaths ¶
func (bundleFiles FileInfoMap) FilePaths() []string
func (FileInfoMap) FirstPathElement ¶
func (infoMap FileInfoMap) FirstPathElement(sep rune) (firstElement string)
func (FileInfoMap) ForOS ¶
func (bundleFiles FileInfoMap) ForOS() FileInfoMap
ForOS returns a copy of the FileInfoMap where all keys' forward slashes are replaced by the separator character of the underling operating system.
func (FileInfoMap) HasChanges ¶
func (fm FileInfoMap) HasChanges() bool
func (FileInfoMap) HasUpdates ¶
func (fm FileInfoMap) HasUpdates() bool
func (FileInfoMap) Join ¶
func (fm FileInfoMap) Join(other FileInfoMap)
func (FileInfoMap) MustGetOnly ¶
func (fm FileInfoMap) MustGetOnly() (key string, fileInfo *FileInfo)
func (FileInfoMap) OmitEntriesWithMissingSha ¶
func (bundleFiles FileInfoMap) OmitEntriesWithMissingSha() FileInfoMap
func (FileInfoMap) Prepend ¶
func (bundleFiles FileInfoMap) Prepend(pathElement string, sep rune) FileInfoMap
func (FileInfoMap) StripFirstPathElement ¶
func (infoMap FileInfoMap) StripFirstPathElement(sep rune) FileInfoMap
func (FileInfoMap) UpdateByteCount ¶
func (fm FileInfoMap) UpdateByteCount() uint64
func (FileInfoMap) UpdateFileCount ¶
func (fm FileInfoMap) UpdateFileCount() uint64
func (FileInfoMap) WithForwardSlashes ¶
func (bundleFiles FileInfoMap) WithForwardSlashes() FileInfoMap
WithForwardSlashes returns a copy of the FileInfoMap where all occurrences of os.PathSeparator in the keys are replaced with forward slashes if os.PathSeparator is not already the forward slash.
type HashDataConfig ¶
type LauncherConfig ¶
type LauncherConfig struct { DeploymentConfigURL string `json:"DeploymentConfigURL"` VendorName string `json:"VendorName"` ProductName string `json:"ProductName"` BrandingName string `json:"BrandingName"` BrandingNameShort string `json:"BrandingNameShort"` ReverseDnsProductId string `json:"ReverseDnsProductId"` ProductVersion VersionData `json:"ProductVersion"` BinaryName string `json:"BinaryName"` StatusMessages StatusMessages `json:"StatusMessages"` IgnoreLauncherBundleInfoHashes []string `json:"IgnoreLauncherBundleInfoHashes"` }
func ReadLauncherConfigFromReader ¶
func ReadLauncherConfigFromReader(reader io.Reader) (launcherConfig *LauncherConfig)
type LauncherUpdateConfig ¶
type LauncherUpdateConfig struct { HashDataConfig TargetPlatforms []string `json:"TargetPlatforms,omitempty"` }
func FilterLauncherUpdatesByPlatform ¶
func FilterLauncherUpdatesByPlatform(launcherUpdates []LauncherUpdateConfig, os string, arch string) []LauncherUpdateConfig
type StatusMessages ¶
type StatusMessages struct { AcquireLock string `json:"AcquireLock"` GetDeploymentConfig string `json:"GetDeploymentConfig"` DetermineLocalLauncherVersion string `json:"DetermineLocalLauncherVersion"` RetrieveRemoteLauncherVersion string `json:"RetrieveRemoteLauncherVersion"` SelfUpdate string `json:"SelfUpdate"` DetermineLocalBundleVersions string `json:"DetermineLocalBundleVersions"` RetrieveRemoteBundleVersions string `json:"RetrieveRemoteBundleVersions"` AwaitApplicationsTerminated string `json:"AwaitApplicationsTerminated"` DownloadBundleUpdates string `json:"DownloadBundleUpdates"` LaunchApplication string `json:"LaunchApplication"` }