added more stuff including some of docker support

This commit is contained in:
2025-03-15 21:16:17 +02:00
parent 4b9c30be7e
commit 5f99ec77a0
22 changed files with 1009 additions and 261 deletions

View File

@@ -0,0 +1,3 @@
module git.acooldomain.co/server-manager/backend-kubernetes-go/instance_manager/kubernetes
go 1.22.0

View File

@@ -0,0 +1,73 @@
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
}