Documentation ¶
Index ¶
- Constants
- Variables
- func CurrentModuleVersion(module string, sysrootPath string) (*semver.Version, error)
- func CurrentReleaseVersion(sysrootPath string) (*semver.Version, error)
- func DownloadAllMigrationTools(ctx context.Context, release codegen.Release, sysrootPath string) (bool, error)
- func DownloadChecksum(ctx context.Context, release codegen.Release, mirror string) (string, error)
- func DownloadMigrationTool(ctx context.Context, release codegen.Release, moduleName string, ...) (string, error)
- func DownloadRelease(ctx context.Context, release codegen.Release, force bool) (string, error)
- func DownloadUninstallScript(ctx context.Context, sysRoot string) (string, error)
- func ExecuteMigrationTool(moduleName string, migrationFilePath string, sysRoot string) error
- func ExecuteModuleInstallScript(releaseFilePath string, release codegen.Release) error
- func ExtractReleasePackages(packageFilepath string, release codegen.Release) error
- func GetChecksums(release codegen.Release) (map[string]string, error)
- func GetFileNameFromMigrationURL(url string) string
- func GetInstallMethod(sysRoot string) (string, error)
- func GetMigrationDownloadURLFromMigrationListURL(url string) string
- func GetRelease(ctx context.Context, tag string) (*codegen.Release, error)
- func GetReleaseBranch(sysRoot string) string
- func GetStatus() codegen.Status
- func InstallCasaOSPackages(release codegen.Release, sysRoot string) error
- func InstallDependencies(release codegen.Release, sysrootPath string) error
- func InstallRAUC(release codegen.Release, sysRoot string) error
- func InstallRelease(release codegen.Release, sysrootPath string) error
- func InstallSystem(release codegen.Release, sysRoot string) error
- func IsCasaOS(sysRoot string) bool
- func IsUpgradable(release codegen.Release, sysrootPath string) bool
- func IsZimaOS(sysRoot string) bool
- func LaunchModule(release codegen.Release) error
- func LoadReleaseFromLocal() (*codegen.Release, error)
- func MigrationToolsDir() string
- func MigrationToolsMap(release codegen.Release) (map[string][]MigrationTool, error)
- func NormalizationVersion(version string) string
- func NormalizeMigrationToolURL(url string) string
- func NormalizeMigrationToolURLPass1(url string) string
- func NormalizeMigrationToolURLPass2(url string) string
- func NormalizeVersion(version string) string
- func PostMigration(sysRoot string) error
- func PostReleaseInstall(release codegen.Release, sysrootPath string) error
- func PublishEventWrapper(ctx context.Context, eventType message_bus.EventType, ...)
- func RebootSystem()
- func ReleaseDir(release codegen.Release) (string, error)
- func ShouldUpgrade(release codegen.Release, sysrootPath string) bool
- func StartFallbackWebsite()
- func StartMigration(sysRoot string) error
- func StopFallbackWebsite()
- func StopModule(release codegen.Release) error
- func UpdateStatus(newStatus codegen.Status)
- func VerifyAllMigrationTools(targetRelease codegen.Release, sysRoot string) bool
- func VerifyChecksumByFilePath(filepath, checksum string) error
- func VerifyMigrationTool(moduleName string, fileName string) (string, error)
- func VerifyRAUC(release codegen.Release) (string, error)
- func VerifyRelease(release codegen.Release) (string, error)
- func VerifyUninstallScript(sysRoot string) bool
- type InstallerServices
- type MigrationTool
- type RAUCService
- func (r *RAUCService) DownloadRelease(ctx context.Context, release codegen.Release, force bool) (string, error)
- func (r *RAUCService) GetRelease(ctx context.Context, tag string) (*codegen.Release, error)
- func (r *RAUCService) Install(release codegen.Release, sysRoot string) error
- func (r *RAUCService) MigrationInLaunch(sysRoot string) error
- func (r *RAUCService) VerifyRelease(release codegen.Release) (string, error)
- type Services
- type TarService
Constants ¶
View Source
const ( RAUCOfflinePath = "/Data/rauc/" RAUCOfflineReleaseFile = "rauc-release.yml" RAUCOfflineRAUCFile = "rauc.tar.gz" )
Variables ¶
View Source
var ( CurrentReleaseLocalPath = "/etc/casaos/release.yaml" TargetReleaseLocalPath = "/etc/casaos/target-release.yaml" )
View Source
var (
ErrReleaseNotFound = fmt.Errorf("release not found")
)
View Source
var FallbackStaticFiles embed.FS
embeded static files
Functions ¶
func CurrentModuleVersion ¶
func CurrentReleaseVersion ¶
func DownloadChecksum ¶
func DownloadMigrationTool ¶
func DownloadRelease ¶
returns releaseFilePath if successful
func DownloadUninstallScript ¶
func ExecuteMigrationTool ¶
func ExtractReleasePackages ¶
func GetInstallMethod ¶
func GetReleaseBranch ¶ added in v0.2.0
func InstallCasaOSPackages ¶
dependent config.ServerInfo.CachePath
func InstallDependencies ¶
func InstallRAUC ¶
dependent config.ServerInfo.CachePath
func IsUpgradable ¶
to check the new version is upgradable and packages are already cached(download)
func LaunchModule ¶
func LoadReleaseFromLocal ¶
func MigrationToolsDir ¶
func MigrationToolsDir() string
func MigrationToolsMap ¶
func MigrationToolsMap(release codegen.Release) (map[string][]MigrationTool, error)
func NormalizationVersion ¶ added in v0.2.0
func NormalizeMigrationToolURL ¶
Normalize migraiton tool URL to a standard format which uses `${MIRROR}` as the mirror placeholder
func NormalizeVersion ¶
func PostMigration ¶
func PostReleaseInstall ¶
func PublishEventWrapper ¶
func RebootSystem ¶
func RebootSystem()
func StartFallbackWebsite ¶ added in v0.2.0
func StartFallbackWebsite()
func StartMigration ¶
func StopFallbackWebsite ¶ added in v0.2.0
func StopFallbackWebsite()
func StopModule ¶
func UpdateStatus ¶
func VerifyAllMigrationTools ¶
verify migration tools for a release are already cached
func VerifyChecksumByFilePath ¶
sha256sum
func VerifyMigrationTool ¶
func VerifyUninstallScript ¶
Types ¶
type InstallerServices ¶
type InstallerServices interface { GetRelease(ctx context.Context, tag string) (*codegen.Release, error) VerifyRelease(release codegen.Release) (string, error) DownloadRelease(ctx context.Context, release codegen.Release, force bool) (string, error) Install(release codegen.Release, sysRoot string) error MigrationInLaunch(sysRoot string) error }
var InstallerService InstallerServices
func NewInstallerService ¶ added in v0.2.0
func NewInstallerService(sysRoot string) InstallerServices
type MigrationTool ¶
type MigrationTool struct { Version semver.Version URL string }
func GetMigrationPath ¶
func GetMigrationPath(module codegen.Module, release codegen.Release, migrationToolMap map[string][]MigrationTool, sysRoot string) ([]MigrationTool, error)
func RemoveDuplication ¶
func RemoveDuplication(arr []MigrationTool) []MigrationTool
type RAUCService ¶ added in v0.2.0
type RAUCService struct { }
func (*RAUCService) DownloadRelease ¶ added in v0.2.0
func (*RAUCService) GetRelease ¶ added in v0.2.0
func (*RAUCService) Install ¶ added in v0.2.0
func (r *RAUCService) Install(release codegen.Release, sysRoot string) error
func (*RAUCService) MigrationInLaunch ¶ added in v0.2.0
func (r *RAUCService) MigrationInLaunch(sysRoot string) error
func (*RAUCService) VerifyRelease ¶ added in v0.2.0
func (r *RAUCService) VerifyRelease(release codegen.Release) (string, error)
type Services ¶
type Services interface { Gateway() (external.ManagementService, error) MessageBus() (*message_bus.ClientWithResponses, error) }
var MyService Services
func NewService ¶
type TarService ¶ added in v0.2.0
type TarService struct { }
func (*TarService) GetRelease ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.