updater

package module
v0.0.0-...-7111dfa Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllUpdaterInfo

func GetAllUpdaterInfo(w http.ResponseWriter, req *http.Request)

GetAllUpdaterInfo get all updater info

func NewUpdater

func NewUpdater(cfg map[string]string)

func PostTriggerUpdater

func PostTriggerUpdater(w http.ResponseWriter, req *http.Request)

PostTriggerUpdater trigger updater for special agent

func SetupSelfUpdater

func SetupSelfUpdater(agent *SelfUpdaterAgent)

func TriggerUpdater

func TriggerUpdater(agentName string)

func TriggerUpdaterBySelfConfig

func TriggerUpdaterBySelfConfig(updaterInfo *UpdateAgentInfo)

Types

type SelfUpdaterAgent

type SelfUpdaterAgent struct {
	Updater   *selfupdate.Updater
	AgentName string
}

func (*SelfUpdaterAgent) GetAgentName

func (agent *SelfUpdaterAgent) GetAgentName() string

type UpdateAgentInfo

type UpdateAgentInfo struct {
	CurrentVersion string `json:"version"`
	ApiURL         string `json:"api_url"`
	BinURL         string `json:"bin_url"`
	DiffURL        string `json:"diff_url"`
	Dir            string `json:"dir"`
	CmdName        string `json:"cmd_name"`
	ForceCheck     bool   `json:"force_check"`
	AgentName      string `json:"agent_name"`
}

func GetAllUpdaterAgent

func GetAllUpdaterAgent() []*UpdateAgentInfo

Jump to

Keyboard shortcuts

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