dockerapi

package
v0.0.0-...-8c3636e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 32 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 BuildCachePruneReport

type BuildCachePruneReport struct {
	CachesDeleted  []string `json:"cachesDeleted"`
	SpaceReclaimed uint64   `json:"spaceReclaimed"`
}

type BuildCachePruneRequest

type BuildCachePruneRequest struct {
	Filters map[string]string `query:"filters"`
	All     bool              `query:"all"`
}

type ClusterInfo

type ClusterInfo struct {
	ID                     string   `json:"id"`
	Name                   string   `json:"name"`
	CreatedAt              string   `json:"created_at"`
	UpdatedAt              string   `json:"updated_at"`
	Version                string   `json:"version"`
	TLSInfo                string   `json:"tls_info"`
	RootRotationInProgress bool     `json:"root_rotation_in_progress"`
	DefaultAddrPool        []string `json:"default_addr_pool"`
	SubnetSize             uint32   `json:"subnet_size"`
	DataPathPort           uint32   `json:"data_path_port"`
	Spec                   string   `json:"spec"`
	NodeCount              int      `json:"node_count"`
	ManagerCount           int      `json:"manager_count"`
	WorkerCount            int      `json:"worker_count"`
}

func GetSwarmClusterInfo

func GetSwarmClusterInfo() (*ClusterInfo, error)

type ClusterSwarmNodeList

type ClusterSwarmNodeList struct {
	Filters filters.Args
}

type ClusterSwarmNodeListResponse

type ClusterSwarmNodeListResponse struct {
	Nodes []*SwarmNodeInfo `json:"nodes"`
	Count int              `json:"count"`
}

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"`
	Stale  string `json:"stale"`
	Ports  []Port `json:"ports"`
}

type DiskUsageCategory

type DiskUsageCategory struct {
	Type               string `json:"type"`
	Size               string `json:"size"`
	Reclaimable        string `json:"reclaimable"`
	ReclaimablePercent string `json:"reclaimablePercent"`
	Total              int    `json:"total"`
	Active             int    `json:"active"`
}

type DiskUsageSummary

type DiskUsageSummary struct {
	Categories []DiskUsageCategory `json:"categories"`
}

func GetDiskUsage

func GetDiskUsage() (*DiskUsageSummary, error)

type DockerBuildCachePrune

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

type DockerComposeContainerList

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

type DockerComposeContainerListResponse

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

type DockerComposeDeploy

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

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 {
	Variables   map[string]store.VariableValue `json:"variables"`
	ProjectName string                         `json:"projectName"`
	Definition  string                         `json:"definition"`
}

type DockerComposeUp

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

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 DockerNetworkCreate

type DockerNetworkCreate struct {
	Options    map[string]string
	Labels     map[string]string
	IPAM       *IPAMConfig
	Name       string
	Driver     string
	Internal   bool
	Attachable bool
	Ingress    bool
	EnableIPv6 bool
}

type DockerNetworkCreateResponse

type DockerNetworkCreateResponse struct {
	ID      string `json:"Id"`
	Warning string
}

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 DockerVolumeCreate

type DockerVolumeCreate struct {
	DriverOpts map[string]string
	Labels     map[string]string
	Name       string
	Driver     string
}

DockerVolumeCreate contains volume creation parameters

type DockerVolumeCreateResponse

type DockerVolumeCreateResponse struct {
	Name       string
	Driver     string
	Mountpoint string
}

DockerVolumeCreateResponse contains created volume info

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 IPAMConfig

type IPAMConfig struct {
	Options map[string]string `json:"Options"`
	Driver  string            `json:"Driver"`
	Config  []IPAMPool        `json:"Config"`
}

type IPAMPool

type IPAMPool struct {
	Subnet  string `json:"Subnet"`
	Gateway string `json:"Gateway"`
}

type Image

type Image struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	Tag      string `json:"tag"`
	Size     int64  `json:"size"`
	Created  int64  `json:"created"`
	Dangling bool   `json:"dangling"`
	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"`
	Type        string `json:"type"`
	PrivatePort uint16 `json:"privatePort"`
	PublicPort  uint16 `json:"publicPort"`
}

type ResourceStats

type ResourceStats struct {
	Total       int
	Active      int
	Size        int64
	Reclaimable int64
}

type SwarmNodeInfo

type SwarmNodeInfo struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Role         string `json:"role"`
	CPU          int64  `json:"cpu"`
	Memory       int64  `json:"memory"`
	Engine       string `json:"engine"`
	IPAddress    string `json:"ip_address"`
	Status       string `json:"status"`
	Availability string `json:"availability"`
}

type SwarmNodeInfoDetailsResponse

type SwarmNodeInfoDetailsResponse struct {
	Name          string   `json:"name"`
	OSInfo        string   `json:"os"`
	CPU           int64    `json:"cpu"`
	Memory        int64    `json:"memory"`
	Version       string   `json:"version"`
	VolumeType    string   `json:"volume"`
	NetworkPlugin string   `json:"network"`
	Role          string   `json:"role"`
	Availability  string   `json:"availability"`
	Status        string   `json:"status"`
	Labels        []string `json:"labels"`
}

type SwarmNodeInfoId

type SwarmNodeInfoId struct {
	Id string `json:"id" validate:"required,max=100"`
}

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