updater

package
v0.0.0-...-0583c98 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "update",
	Short: "start a local updater process",
	Run: func(cmd *cobra.Command, args []string) {
		Run()
	},
}

Functions

func Run

func Run()

Types

type Setup

type Setup func(stgy *Strategy) // Strategy的配置选项

func WithEndmark

func WithEndmark(version string) Setup

func WithForceUpdate

func WithForceUpdate(flag bool) Setup

func WithLifeTime

func WithLifeTime(life time.Duration) Setup

type Strategy

type Strategy struct {
	Loc         []riotmodel.LOCATION
	Lang        []riotmodel.LANG
	LifeTime    time.Duration
	ForceUpdate bool
	EndMark     string
}

type Updater

type Updater struct {
	CurVersion string
	// contains filtered or unexported fields
}

func NewRiotUpdater

func NewRiotUpdater(opts ...Setup) *Updater

func (*Updater) UpdateAll

func (u *Updater) UpdateAll()

func (*Updater) UpdateChampions

func (u *Updater) UpdateChampions(version string)

UpdateChampions from Version X.Y.Z

func (*Updater) UpdateItems

func (u *Updater) UpdateItems(version string)

func (*Updater) UpdatePerks

func (u *Updater) UpdatePerks(version string)

func (*Updater) UpdateSpell

func (u *Updater) UpdateSpell(version string)

func (*Updater) UpdateVersions

func (u *Updater) UpdateVersions() (version []string)

Jump to

Keyboard shortcuts

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