Documentation ¶
Index ¶
Constants ¶
View Source
const GithubLatestReleaseAPI = "https://api.github.com/repos/0xJacky/nginx-ui/releases/latest"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigDetail ¶
func ParseTemplate ¶
func ParseTemplate(path, name string) (c ConfigDetail, err error)
type ConfigInfoItem ¶
type ConfigInfoItem struct { Name string `json:"name"` Description map[string]string `json:"description"` Author string `json:"author"` Filename string `json:"filename"` }
func GetTemplateInfo ¶
func GetTemplateInfo(path, name string) (configListItem ConfigInfoItem)
func GetTemplateList ¶
func GetTemplateList(path string) (configList []ConfigInfoItem, err error)
type CurVersion ¶
type CurVersion struct { Version string `json:"version"` BuildID int `json:"build_id"` TotalBuild int `json:"total_build"` }
func GetCurrentVersion ¶
func GetCurrentVersion() (c CurVersion, err error)
type RuntimeInfo ¶
type RuntimeInfo struct { OS string `json:"os"` Arch string `json:"arch"` ExPath string `json:"ex_path"` }
func GetRuntimeInfo ¶
func GetRuntimeInfo() (r RuntimeInfo, err error)
type TRelease ¶
type TRelease struct { TagName string `json:"tag_name"` Name string `json:"name"` PublishedAt time.Time `json:"published_at"` Body string `json:"body"` Assets []TReleaseAsset `json:"assets"` RuntimeInfo }
func GetRelease ¶
type TReleaseAsset ¶
type Upgrader ¶
type Upgrader struct {
Release TRelease
}
func NewUpgrader ¶
func (*Upgrader) DownloadLatestRelease ¶
func (*Upgrader) PerformCoreUpgrade ¶
Click to show internal directories.
Click to hide internal directories.