updates3util

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Overview

Package updates3util implements the logic for s3 update download

Package updates3util implements the logic for s3 update download

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadManifestErrorCodes

type DownloadManifestErrorCodes string

DownloadManifestErrorCodes represents error codes while downloading manifest

var (
	// ResolveManifestURLErrorCode represents error code for manifest URL resolution error
	ResolveManifestURLErrorCode DownloadManifestErrorCodes = "d1"
	// TmpDownloadDirCreationErrorCode represents error code for directory download error
	TmpDownloadDirCreationErrorCode DownloadManifestErrorCodes = "d2"
	// NetworkFileDownloadErrorCode represents error code for manifest file download error
	NetworkFileDownloadErrorCode DownloadManifestErrorCodes = "d3"
	// HashMismatchErrorCode represents error code for file hash mismatch failure
	HashMismatchErrorCode DownloadManifestErrorCodes = "d4"
	// LocalFilePathEmptyErrorCode represents error code for empty local download file path
	LocalFilePathEmptyErrorCode DownloadManifestErrorCodes = "d5"
	// LoadManifestErrorCode represents error code for load manifest error
	LoadManifestErrorCode DownloadManifestErrorCodes = "d6"
)

type T

type T interface {
	DownloadManifest(manifest updatemanifest.T, manifestUrl string) *UpdateErrorStruct

	DownloadUpdater(
		manifest updatemanifest.T,
		updaterPackageName string,
		downloadPath string,
	) (version string, err error)

	GetStableVersion(stableVersionUrl string) (stableVersion string, err error)
}

func New

func New(context context.T) T

type UpdateErrorStruct

type UpdateErrorStruct struct {
	// Error denotes update error
	Error error
	// Error denotes update error code
	ErrorCode string
}

UpdateErrorStruct represents Update error struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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