interfaces

package module
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 0 Imported by: 6

README

CasaOS-Common

Go Reference Go Report Card codecov

Common structs and functions for CasaOS

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigrationTool

type MigrationTool interface {
	IsMigrationNeeded() (bool, error)
	PreMigrate() error
	Migrate() error
	PostMigrate() error
}

Any logic to migrate data from previous version to current can implement this interface.

The model for migrating from v0.n to v0.m is an execution chain of each version of this migration tool:

START -> migration-tool-v0.n -> migration-tool-v0.n+1 -> ... -> migration-tool-v0.m -> END

Therefore, each migration tool in the chain SHOULD ONLY work on data such as config files and databases. It is responsibility of any install/setup script to control the services because it knows when migration starts and ends.

!!!IMPORTANT!!! DO NOT stop, start, enable or disable services, because the whole execution chain might not have been completed.

Directories

Path Synopsis
The commmon package provides structs and functions for external code to interact with this gateway service.
The commmon package provides structs and functions for external code to interact with this gateway service.
@Author: LinkLeong link@icewhale.com
@Author: LinkLeong link@icewhale.com
notify
@Author: LinkLeong link@icewhale.com
@Author: LinkLeong link@icewhale.com
http
methods in this package automatically include a context with a timeout, in order to solve the problem of hanging requests and to avoid goroutine leaks
methods in this package automatically include a context with a timeout, in order to solve the problem of hanging requests and to avoid goroutine leaks
jwt
ssh

Jump to

Keyboard shortcuts

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