74 lines
1.9 KiB
Go
74 lines
1.9 KiB
Go
package kubernetes
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
|
|
"git.acooldomain.co/server-manager/backend-kubernetes-go/instance_manager"
|
|
"git.acooldomain.co/server-manager/backend-kubernetes-go/models"
|
|
)
|
|
|
|
type InstanceManager struct {
|
|
instancemanager.InstanceManager
|
|
}
|
|
|
|
// General
|
|
// Read Only
|
|
func (self *InstanceManager) GetServer(ctx context.Context, serverId string) (*instancemanager.Server, error) {
|
|
return nil, nil
|
|
}
|
|
func (self *InstanceManager) ListServers(ctx context.Context) ([]instancemanager.Server, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// State Changing
|
|
func (self *InstanceManager) StartServer(ctx context.Context, serverId string, command string, ports []models.Port) error {
|
|
return nil
|
|
}
|
|
func (self *InstanceManager) StopServer(ctx context.Context, serverId string) error {
|
|
return nil
|
|
}
|
|
|
|
func (self *InstanceManager) CreateServer(ctx context.Context, image models.Image) (*instancemanager.Server, error) {
|
|
|
|
return nil, nil
|
|
}
|
|
|
|
func (self *InstanceManager) DeleteServer(ctx context.Context, serverId string) error {
|
|
return nil
|
|
}
|
|
|
|
// Terminal
|
|
|
|
// Read Only
|
|
func (self *InstanceManager) GetLogs(ctx context.Context, serverId string) (string, error) {
|
|
return "", nil
|
|
}
|
|
|
|
// Status Changing
|
|
func (self *InstanceManager) InteractiveTerminal(ctx context.Context, serverId string) (*net.Conn, error) {
|
|
return nil, nil
|
|
}
|
|
func (self *InstanceManager) RunCommand(ctx context.Context, serverId string, command string) (string, error) {
|
|
|
|
return "", nil
|
|
}
|
|
|
|
// File Browser
|
|
|
|
// Read Only
|
|
func (self *InstanceManager) GetFileBrowser(ctx context.Context, serverId string) (*models.FileBrowser, error) {
|
|
return nil, nil
|
|
}
|
|
func (self *InstanceManager) ListFileBrowsers(ctx context.Context) ([]models.FileBrowser, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// Status Changing
|
|
func (self *InstanceManager) StartFileBrowser(ctx context.Context, serverId string) (*models.FileBrowser, error) {
|
|
return nil, nil
|
|
}
|
|
func (self *InstanceManager) StopFileBrowser(ctx context.Context, serverId string) error {
|
|
return nil
|
|
}
|