status: Rename Information => WissKI

This commit is contained in:
Tom Wiesing 2022-11-18 08:41:42 +01:00
parent 3fada6ad38
commit 57f2fe8c86
No known key found for this signature in database
16 changed files with 21 additions and 21 deletions

View file

@ -70,7 +70,7 @@ type LastRebuildFetcher struct {
Barrel *Barrel
}
func (lbr *LastRebuildFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (lbr *LastRebuildFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.LastRebuild, _ = lbr.Barrel.LastRebuild()
return
}

View file

@ -44,7 +44,7 @@ type LastCronFetcher struct {
Drush *Drush
}
func (lbr *LastCronFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (lbr *LastCronFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
if flags.Quick {
return
}

View file

@ -55,7 +55,7 @@ type LastUpdateFetcher struct {
Drush *Drush
}
func (lbr *LastUpdateFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (lbr *LastUpdateFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.LastUpdate, err = lbr.Drush.LastUpdate()
return
}

View file

@ -21,7 +21,7 @@ type RunningFetcher struct {
Barrel *Barrel
}
func (rf *RunningFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (rf *RunningFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.Running, err = rf.Barrel.Running()
return
}

View file

@ -33,7 +33,7 @@ func (ssh *SSH) Keys() ([]ssh.PublicKey, error) {
return sshx.ParseAllKeys(bytes), nil
}
func (sshx *SSH) Fetch(flags ingredient.FetcherFlags, info *status.Information) error {
func (sshx *SSH) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) error {
if flags.Quick {
return nil
}

View file

@ -10,7 +10,7 @@ type WissKIFetcher interface {
// Fetch fetches information from this ingredient and writes it into target.
// Distinct WissKIFetchers must write into distinct fields.
Fetch(flags FetcherFlags, target *status.Information) error
Fetch(flags FetcherFlags, target *status.WissKI) error
}
// FetcherFlags describes options for a WissKIFetcher

View file

@ -21,7 +21,7 @@ type Info struct {
// Information fetches information about this WissKI.
// TODO: Rework this to be able to determine what kind of information is available.
func (wisski *Info) Information(quick bool) (info status.Information, err error) {
func (wisski *Info) Information(quick bool) (info status.WissKI, err error) {
// setup flags
flags := ingredient.FetcherFlags{
Quick: quick,
@ -48,7 +48,7 @@ func (wisski *Info) Information(quick bool) (info status.Information, err error)
return
}
func (wisski *Info) Fetch(flags ingredient.FetcherFlags, info *status.Information) error {
func (wisski *Info) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) error {
info.Time = time.Now().UTC()
info.Slug = wisski.Slug
info.URL = wisski.URL().String()

View file

@ -11,7 +11,7 @@ type SnapshotsFetcher struct {
Info *Info
}
func (lbr *SnapshotsFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (lbr *SnapshotsFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
if flags.Quick {
return
}

View file

@ -18,7 +18,7 @@ func (lock *Locker) Locked() (locked bool) {
return
}
func (locker *Locker) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (locker *Locker) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.Locked = locker.Locked()
return
}

View file

@ -45,7 +45,7 @@ func (pathbuilder *Pathbuilder) GetAll(server *phpx.Server) (pathbuilders map[st
return
}
func (pathbuilder *Pathbuilder) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (pathbuilder *Pathbuilder) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
if flags.Quick {
return
}

View file

@ -156,7 +156,7 @@ func (wisski *Prefixes) Update() error {
return prefix.SetAll(wisski.MStore, prefixes...)
}
func (prefixes *Prefixes) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (prefixes *Prefixes) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.NoPrefixes = prefixes.NoPrefix()
if flags.Quick {
// quick mode: grab only the cached prefixes

View file

@ -28,7 +28,7 @@ func (stats *Stats) Get(server *phpx.Server) (data status.Statistics, err error)
return
}
func (stats *Stats) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
func (stats *Stats) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
if flags.Quick {
return
}