dockerapi

package
v0.0.0-...-e800d3e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StaleStatusProcessing = "processing"
	StaleStatusYes        = "yes"
	StaleStatusNo         = "no"
	StaleStatusError      = "error"
)

Variables

This section is empty.

Functions

func ComposeDeploy

func ComposeDeploy(req *DockerComposeDeploy, ws *websocket.Conn) error

func ComposeDown

func ComposeDown(req *DockerComposeDown, ws *websocket.Conn) error

func ComposeDownNoStreaming

func ComposeDownNoStreaming(req *DockerComposeDownNoStreaming) error

func ComposeLogs

func ComposeLogs(req *DockerComposeLogs, ws *websocket.Conn) error

func ComposePull

func ComposePull(req *DockerComposePull, ws *websocket.Conn) error

func ComposeUp

func ComposeUp(req *DockerComposeUp, ws *websocket.Conn) error

func ContainerLogs

func ContainerLogs(req *DockerContainerLogs, ws *websocket.Conn) error

func ContainerRefreshStaleStatus

func ContainerRefreshStaleStatus() error

func ContainerRemove

func ContainerRemove(req *DockerContainerRemove) error

func ContainerRestart

func ContainerRestart(req *DockerContainerRestart) error

func ContainerScheduleRefreshStaleStatus

func ContainerScheduleRefreshStaleStatus()

func ContainerStart

func ContainerStart(req *DockerContainerStart) error

func ContainerStop

func ContainerStop(req *DockerContainerStop) error

func ContainerTerminal

func ContainerTerminal(req *DockerContainerTerminal, wsBrowser *websocket.Conn) error

func ImageRemove

func ImageRemove(req *DockerImageRemove) error

func NetworkRemove

func NetworkRemove(req *DockerNetworkRemove) error

func VolumeRemove

func VolumeRemove(req *DockerVolumeRemove) error

Types

type ComposeContainer

type ComposeContainer struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	Image   string `json:"image"`
	Service string `json:"service"`
	Status  string `json:"status"`
	State   string `json:"state"`
	Ports   string `json:"ports"`
	Stale   string `json:"stale"`
}

type ComposeContainerInternal

type ComposeContainerInternal struct {
	Id      string `json:"ID"`
	Name    string `json:"Name"`
	Image   string `json:"Image"`
	Service string `json:"Service"`
	Status  string `json:"Status"`
	State   string `json:"State"`
	Ports   string `json:"Ports"`
}

type ComposeItem

type ComposeItem struct {
	Name        string `json:"name"`
	Status      string `json:"status"`
	ConfigFiles string `json:"configFiles"`
	Stale       string `json:"stale"`
}

func ComposeGet

func ComposeGet(req *DockerComposeGet) (*ComposeItem, error)

Note: Returns nil if project not found. Does not return error.

type ComposeItemInternal

type ComposeItemInternal struct {
	Name        string `json:"Name"`
	Status      string `json:"Status"`
	ConfigFiles string `json:"ConfigFiles"`
}

type Container

type Container struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Image  string `json:"image"`
	Status string `json:"status"`
	State  string `json:"state"`
	Ports  []Port `json:"ports"`
	Stale  string `json:"stale"` // yes, no, error, processing
}

type DockerComposeContainerList

type DockerComposeContainerList struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeContainerListResponse

type DockerComposeContainerListResponse struct {
	Items []ComposeContainer `json:"items"`
}

type DockerComposeDeploy

type DockerComposeDeploy struct {
	ProjectName string                         `json:"projectName"`
	Definition  string                         `json:"definition"`
	Variables   map[string]store.VariableValue `json:"variables"`
}

type DockerComposeDown

type DockerComposeDown struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeDownNoStreaming

type DockerComposeDownNoStreaming struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeGet

type DockerComposeGet struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeList

type DockerComposeList struct {
}

type DockerComposeListResponse

type DockerComposeListResponse struct {
	Items []ComposeItem `json:"items"`
}

type DockerComposeLogs

type DockerComposeLogs struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeProjectCreate

type DockerComposeProjectCreate struct {
	ProjectName string `json:"projectName"`
	Definition  string `json:"definition"`
}

type DockerComposeProjectDefinition

type DockerComposeProjectDefinition struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeProjectDefinitionResponse

type DockerComposeProjectDefinitionResponse struct {
	ProjectName string `json:"projectName"`
	Definition  string `json:"definition"`
}

type DockerComposeProjectDelete

type DockerComposeProjectDelete struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeProjectUnique

type DockerComposeProjectUnique struct {
	ProjectName string `json:"projectName"`
}

type DockerComposeProjectUpdate

type DockerComposeProjectUpdate struct {
	ProjectName string `json:"projectName"`
	Definition  string `json:"definition"`
}

type DockerComposePull

type DockerComposePull struct {
	ProjectName string                         `json:"projectName"`
	Definition  string                         `json:"definition"`
	Variables   map[string]store.VariableValue `json:"variables"`
}

type DockerComposeUp

type DockerComposeUp struct {
	ProjectName string                         `json:"projectName"`
	Definition  string                         `json:"definition"`
	Variables   map[string]store.VariableValue `json:"variables"`
}

type DockerContainerList

type DockerContainerList struct {
	All bool `json:"all"`
}

type DockerContainerListResponse

type DockerContainerListResponse struct {
	Items []Container `json:"items"`
}

type DockerContainerLogs

type DockerContainerLogs struct {
	Id string `json:"id"`
}

type DockerContainerRemove

type DockerContainerRemove struct {
	Id    string `json:"id"`
	Force bool   `json:"force"`
}

type DockerContainerRestart

type DockerContainerRestart struct {
	Id string `json:"id"`
}

type DockerContainerStart

type DockerContainerStart struct {
	Id string `json:"id"`
}

type DockerContainerStop

type DockerContainerStop struct {
	Id string `json:"id"`
}

type DockerContainerTerminal

type DockerContainerTerminal struct {
	Id string `json:"id"`
}

type DockerImageList

type DockerImageList struct {
	All bool `json:"all"`
}

type DockerImageListResponse

type DockerImageListResponse struct {
	Items []Image `json:"items"`
}

func ImageList

func ImageList(req *DockerImageList) (*DockerImageListResponse, error)

type DockerImagePull

type DockerImagePull struct {
	Image string `json:"image"`
	Tag   string `json:"tag"`
}

type DockerImageRemove

type DockerImageRemove struct {
	Id    string `json:"id"`
	Force bool   `json:"force"`
}

type DockerImagesPrune

type DockerImagesPrune struct {
	All bool `json:"all"` // Remove all unused images, not just dangling
}

type DockerImagesPruneDeletedItem

type DockerImagesPruneDeletedItem struct {
	Deleted  string `json:"deleted"`
	Untagged string `json:"untagged"`
}

type DockerImagesPruneResponse

type DockerImagesPruneResponse struct {
	ImagesDeleted  []DockerImagesPruneDeletedItem `json:"imagesDeleted"`
	SpaceReclaimed uint64                         `json:"spaceReclaimed"`
}

type DockerNetworkList

type DockerNetworkList struct {
}

type DockerNetworkListResponse

type DockerNetworkListResponse struct {
	Items []Network `json:"items"`
}

type DockerNetworkRemove

type DockerNetworkRemove struct {
	Id string `json:"id"`
}

type DockerNetworksPrune

type DockerNetworksPrune struct {
}

type DockerNetworksPruneResponse

type DockerNetworksPruneResponse struct {
	NetworksDeleted []string `json:"networksDeleted"`
}

type DockerVolumeList

type DockerVolumeList struct {
}

type DockerVolumeListResponse

type DockerVolumeListResponse struct {
	Items []Volume `json:"items"`
}

type DockerVolumeRemove

type DockerVolumeRemove struct {
	Name string `json:"name"`
}

type DockerVolumesPrune

type DockerVolumesPrune struct {
	All bool `json:"all"` // Remove all unused volumes, not just anonymous ones
}

type DockerVolumesPruneResponse

type DockerVolumesPruneResponse struct {
	VolumesDeleted []string `json:"volumesDeleted"`
	SpaceReclaimed uint64   `json:"spaceReclaimed"`
}

type Image

type Image struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	Tag      string `json:"tag"`
	Size     int64  `json:"size"`
	Dangling bool   `json:"dangling"`
	Created  int64  `json:"created"`
	InUse    bool   `json:"inUse"`
}

type Network

type Network struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Driver string `json:"driver"`
	Scope  string `json:"scope"`
	InUse  bool   `json:"inUse"`
}

type Port

type Port struct {
	IP          string `json:"ip"`
	PrivatePort uint16 `json:"privatePort"` // Container
	PublicPort  uint16 `json:"publicPort"`  // Host
	Type        string `json:"type"`
}

type Volume

type Volume struct {
	Driver string `json:"driver"`
	Name   string `json:"name"`
	InUse  bool   `json:"inUse"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL