derp: rename panelapi to remote

This commit is contained in:
Jakob Schrettenbrunner 2021-01-22 22:38:11 +00:00
parent e396b88cb5
commit 82f70c2755
3 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@ import (
"github.com/pterodactyl/wings/config" "github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment" "github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/loggers/cli" "github.com/pterodactyl/wings/loggers/cli"
"github.com/pterodactyl/wings/panelapi" "github.com/pterodactyl/wings/remote"
"github.com/pterodactyl/wings/router" "github.com/pterodactyl/wings/router"
"github.com/pterodactyl/wings/server" "github.com/pterodactyl/wings/server"
"github.com/pterodactyl/wings/sftp" "github.com/pterodactyl/wings/sftp"
@ -190,11 +190,11 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
}).Info("configured system user successfully") }).Info("configured system user successfully")
} }
panelClient := panelapi.CreateClient( panelClient := remote.CreateClient(
config.Get().PanelLocation, config.Get().PanelLocation,
config.Get().AuthenticationTokenId, config.Get().AuthenticationTokenId,
config.Get().AuthenticationToken, config.Get().AuthenticationToken,
panelapi.WithTimeout(time.Second*time.Duration(config.Get().RemoteQuery.Timeout)), remote.WithTimeout(time.Second*time.Duration(config.Get().RemoteQuery.Timeout)),
) )
_ = panelClient _ = panelClient

View File

@ -16,7 +16,7 @@ import (
"github.com/pterodactyl/wings/config" "github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment" "github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/environment/docker" "github.com/pterodactyl/wings/environment/docker"
"github.com/pterodactyl/wings/panelapi" "github.com/pterodactyl/wings/remote"
"github.com/pterodactyl/wings/server/filesystem" "github.com/pterodactyl/wings/server/filesystem"
) )
@ -30,7 +30,7 @@ func (m *manager) Initialize(serversPerPage int) error {
log.Info("fetching list of servers from API") log.Info("fetching list of servers from API")
assignedServers, err := m.panelClient.GetServers(context.TODO(), serversPerPage) assignedServers, err := m.panelClient.GetServers(context.TODO(), serversPerPage)
if err != nil { if err != nil {
if !panelapi.IsRequestError(err) { if !remote.IsRequestError(err) {
return err return err
} }

View File

@ -1,7 +1,7 @@
package server package server
import ( import (
"github.com/pterodactyl/wings/panelapi" "github.com/pterodactyl/wings/remote"
) )
type Manager interface { type Manager interface {
@ -16,11 +16,11 @@ type Manager interface {
type manager struct { type manager struct {
servers Collection servers Collection
panelClient panelapi.Client panelClient remote.Client
} }
// NewManager creates a new server manager. // NewManager creates a new server manager.
func NewManager(panelClient panelapi.Client) Manager { func NewManager(panelClient remote.Client) Manager {
return &manager{panelClient: panelClient} return &manager{panelClient: panelClient}
} }