container

package
v1.0.0-pre Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListContainer(ctx context.Context, all bool) ([]*Container, error) // Show all containers (default shows just running)
	ListImage(ctx context.Context, all bool) ([]*Image, error)         // Show all images (default hides intermediate images)
	ListNetwork(ctx context.Context) ([]*Network, error)
	Logs(ctx context.Context, containerId string) (io.ReadCloser, error)
	Terminal(ctx *gin.Context, containerId string, user, cmd string) error
	Close()
}

type Container

type Container struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Image       string       `json:"image"`
	ImageID     string       `json:"imageId"`
	Command     string       `json:"command"`
	Created     int64        `json:"created"`
	Ports       []types.Port `json:"ports"`
	Status      string       `json:"status"`
	State       string       `json:"state"`
	NetworkMode string       `json:"networkMode"`
	Mounts      []Mount      `json:"mounts"`
	Runtime     string       `json:"runtime"`
}

type Image

type Image struct {
	ID      string            `json:"id"`
	Labels  map[string]string `json:"labels"`
	Size    int64             `json:"size"`
	Name    string            `json:"name"`
	Created int64             `json:"created"`
}

type Mount

type Mount struct {
	Source string `json:"source"`
	Dest   string `json:"dest"`
	Type   string `json:"type"`
}

type Network added in v0.0.8

type Network struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Driver   string `json:"driver"`
	IPv6     bool   `json:"ipv6"`
	Internal bool   `json:"internal"`
	Scope    string `json:"scope"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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