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

@@ -1,41 +1,24 @@
package models
type PortProtocol string
const (
TCP PortProtocol = "TCP"
UDP = "UDP"
)
type Port struct {
Protocol string
Number int
Protocol PortProtocol
PublicPort uint16
ContainerPort uint16
}
type ImageInfo struct {
Name string
Version string
Ports []Port
type Image struct {
Registry string
Tag string
}
type ServerInfo struct {
Id string
OwnerId string
DefaultCommand string
Image ImageInfo
On bool
Nickname string
Ports []Port
Domain string
}
type FileBrowserInfo struct {
Id string
OwnerId string
ConnectedTo ServerInfo
Url string
}
type ServerData struct {
Id string `bson:"Id"`
OwnerId string `bson:"OwnerId"`
Image string `bson:"Image"`
VolumeId string `bson:"VolumeId"`
Nickname string `bson:"Nickname"`
UserPermissions map[string]Permission `bson:"UserPermissions"`
DefaultCommand string `bson:"DefaultCommand"`
DefaultPorts []Port `bson:"DefaultPorts"`
type FileBrowser struct {
Id string
Url string
}