backend/db_handler/servers_db_handler.go

30 lines
547 B
Go

package dbhandler
type Image struct {
Registry string
Tag string
}
type Server struct {
Id string
Owner string
Image string
Nickname string
Command string
}
type ServerUpdateRequest struct {
Owner string
Image string
Nickname string
Command string
}
type ServersDbHandler interface {
ListServers() ([]Server, error)
GetServer(serverId string) (*Server, error)
CreateServer(server Server) error
DeleteServer(serverId string) error
UpdateServer(serverId string, updateParams ServerUpdateRequest) error
}