staters

package
v0.0.1-beta5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultStater = SqliteStater(conf.GetAppStateDbFile())
	Installed     = DefaultStater.Installed
	Uninstalled   = DefaultStater.Uninstalled
	Required      = DefaultStater.Required
)

Functions

This section is empty.

Types

type AppStater

type AppStater interface {
	Required(versionRequired ...VersionRequired) (err error)
	Installed(appID, versionID string, versionNo uint) (err error)
	Uninstalled(appID, versionID string) (err error)
}

func SqliteStater

func SqliteStater(dbFile string) AppStater

type AppVersion

type AppVersion struct {
	VersionID string `db:"version_id" json:"version_id"` // 版本ID
	VersionNo uint   `db:"version_no" json:"version_no"` // 版本No
	AppID     string `db:"app_id" json:"app_id"`         // 应用ID
}

func (AppVersion) Version

func (av AppVersion) Version() (version string)

type VersionRequired

type VersionRequired struct {
	AppID, AppName string
	VersionID      string
	VersionNo      uint
}

func (VersionRequired) Version

func (ar VersionRequired) Version() (version string)

Jump to

Keyboard shortcuts

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