Initial commit
This commit is contained in:
30
internal/podman/models/models.go
Normal file
30
internal/podman/models/models.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/containers/podman/v4/pkg/domain/entities"
|
||||
)
|
||||
|
||||
type ContainerStatus int
|
||||
|
||||
const (
|
||||
StopContainer ContainerStatus = iota
|
||||
StartContainer
|
||||
RestartContainer
|
||||
)
|
||||
|
||||
type PodmanService interface {
|
||||
List() ([]entities.ListContainer, error)
|
||||
Create(ContainerBlueprint) error
|
||||
Delete(string) error
|
||||
UpdateStatus(string, string) error
|
||||
}
|
||||
|
||||
type PortMapping struct {
|
||||
ContainerPort uint16 `json:"containerPort"`
|
||||
HostPort uint16 `json:"hostPort"`
|
||||
}
|
||||
|
||||
type ContainerBlueprint struct {
|
||||
Image string `json:"image"`
|
||||
PortMapping []PortMapping `json:"portMapping"`
|
||||
}
|
||||
Reference in New Issue
Block a user