Documentation ¶
Index ¶
- Constants
- Variables
- func Compare(v1, v2 string) (int, error)
- func DetectLegacyVersion() (int, int, int, error)
- func DetectMinorVersion() (int, error)
- func DetectVersion() (int, int, int, error)
- func IsConfigKeyDBPathExist() (bool, error)
- func ParseVersion(version string) (int, int, int, int, string, error)
- type GlobalMigrationStatus
Constants ¶
View Source
const (
LegacyCasaOSServiceName = "casaos.service"
)
Variables ¶
View Source
var ( GlobalMigrationStatusDirPath = "/var/lib/casaos/migration" ErrInvalidServiceName = errors.New("service name should not contain space or upper case letter") )
View Source
var ( ErrLegacyVersionNotFound = errors.New("legacy version not found") ErrVersionNotFound = errors.New("version (non-legacy) not found") )
View Source
var (
// this value will be updated at init() to actual config file path.
LegacyCasaOSConfigFilePath = "/etc/casaos.conf"
)
Functions ¶
func DetectMinorVersion ¶
Detect minor version of CasaOS. It returns 2 for "0.2.x" or 3 for "0.3.x"
(This is often useful when failing to get version from API because CasaOS is not running.)
func IsConfigKeyDBPathExist ¶
Check if user data is stored in database (0.3.3+)
Types ¶
type GlobalMigrationStatus ¶
func GetGlobalMigrationStatus ¶
func GetGlobalMigrationStatus(serviceName string) (*GlobalMigrationStatus, error)
func (*GlobalMigrationStatus) Done ¶
func (m *GlobalMigrationStatus) Done(version string) error
func (*GlobalMigrationStatus) GetGlobalMigrationStatusFilePath ¶
func (m *GlobalMigrationStatus) GetGlobalMigrationStatusFilePath() string
Click to show internal directories.
Click to hide internal directories.