component: Remove legacy type alias
This commit is contained in:
parent
11b2e3eb37
commit
162b1d3d65
4 changed files with 9 additions and 12 deletions
|
|
@ -8,7 +8,7 @@ import (
|
|||
_ "embed"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/control/static"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/info"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/timex"
|
||||
"github.com/tkw1536/goprogram/stream"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
|
@ -65,7 +65,7 @@ func (home *Home) homeRender() ([]byte, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
context.Instances = make([]info.WissKIInfo, len(wissKIs))
|
||||
context.Instances = make([]ingredient.Information, len(wissKIs))
|
||||
|
||||
// determine their infos
|
||||
var eg errgroup.Group
|
||||
|
|
@ -86,7 +86,7 @@ func (home *Home) homeRender() ([]byte, error) {
|
|||
}
|
||||
|
||||
type HomeContext struct {
|
||||
Instances []info.WissKIInfo
|
||||
Instances []ingredient.Information
|
||||
|
||||
Time time.Time
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/config"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/control/static"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/info"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ type indexContext struct {
|
|||
|
||||
Config *config.Config
|
||||
|
||||
Instances []info.WissKIInfo
|
||||
Instances []ingredient.Information
|
||||
|
||||
TotalCount int
|
||||
RunningCount int
|
||||
|
|
@ -45,7 +45,7 @@ func (nfo *Info) index(r *http.Request) (idx indexContext, err error) {
|
|||
}
|
||||
|
||||
// get all of their info!
|
||||
idx.Instances = make([]info.WissKIInfo, len(all))
|
||||
idx.Instances = make([]ingredient.Information, len(all))
|
||||
for i, instance := range all {
|
||||
{
|
||||
i := i
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/control/static"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/instances"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/info"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/httpx"
|
||||
)
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ type instanceContext struct {
|
|||
Time time.Time
|
||||
|
||||
Instance models.Instance
|
||||
Info info.WissKIInfo
|
||||
Info ingredient.Information
|
||||
}
|
||||
|
||||
func (info *Info) instance(r *http.Request) (is instanceContext, err error) {
|
||||
|
|
|
|||
|
|
@ -18,12 +18,9 @@ type Info struct {
|
|||
Analytics *lazy.PoolAnalytics
|
||||
}
|
||||
|
||||
// TODO: Use the information struct globally
|
||||
type WissKIInfo = ingredient.Information
|
||||
|
||||
// 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 WissKIInfo, err error) {
|
||||
func (wisski *Info) Information(quick bool) (info ingredient.Information, err error) {
|
||||
// setup flags
|
||||
flags := ingredient.FetchFlags{
|
||||
Quick: quick,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue