Documentation
¶
Index ¶
- 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 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 MigrationToolsDir() string
- func MigrationToolsMap(release codegen.Release) (map[string][]MigrationTool, error)
- 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 StartMigration(sysRoot string) error
- func StopModule(release codegen.Release) error
- func UpdateStatus(status 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 MigrationTool
- type Services
Constants ¶
This section is empty.
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 Status codegen.Status
TODO move to another place
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 MigrationToolsDir ¶
func MigrationToolsDir() string
func MigrationToolsMap ¶
func MigrationToolsMap(release codegen.Release) (map[string][]MigrationTool, error)
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 StartMigration ¶
func StopModule ¶
func UpdateStatus ¶
func VerifyAllMigrationTools ¶
verify migration tools for a release are already cached
func VerifyChecksumByFilePath ¶
sha256sum
func VerifyMigrationTool ¶
func VerifyUninstallScript ¶
Types ¶
type MigrationTool ¶
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 Services ¶
type Services interface {
Gateway() (external.ManagementService, error)
MessageBus() (*message_bus.ClientWithResponses, error)
}
var MyService Services
func NewService ¶
Click to show internal directories.
Click to hide internal directories.