v2.30.0-pre7 3ee801c

container.go RawHistoryFolder

1// Package domain contains pure business types without external dependencies.
2// These types are used throughout the application and have no tags or framework dependencies.
3package domain
4
5import "time"
6
7// Container represents a running container in the system.
8type Container struct {
9	ID       string
10	Image    string
11	ImageID  string // Docker image ID (sha256 digest) used to detect redundant deploys
12	Name     string
13	Status   string
14	ExitCode int
15	Ports    []int
16	Labels   map[string]string
17	Created  time.Time
18}
19
20// NetworkInfo represents network configuration and state.
21type NetworkInfo struct {
22	ID         string
23	Name       string
24	Driver     string
25	Containers []string
26	Labels     map[string]string
27}
28
29// Attachment represents an attached service container.
30type Attachment struct {
31	Name        string
32	Image       string
33	ContainerID string
34	Status      string
35	Network     string
36	Ports       []int
37}
38
39// RouteInfo combines route configuration with runtime state.
40type RouteInfo struct {
41	Domain          string
42	Image           string
43	ContainerID     string
44	ContainerStatus string
45	Network         string
46	Attachments     []Attachment
47}
48
49// ContainerConfig holds configuration for creating a container.
50type ContainerConfig struct {
51	Image           string
52	Name            string
53	Env             []string
54	Ports           []int
55	Labels          map[string]string
56	WorkingDir      string
57	Cmd             []string
58	AutoRemove      bool
59	Volumes         map[string]string // map[containerPath]volumeName
60	ReadOnlyVolumes map[string]string // containerPath -> volumeName (mounted read-only)
61	NetworkMode     string            // Network to join
62	Hostname        string            // Container hostname for DNS
63	Aliases         []string          // Additional network aliases
64	MemoryLimit     int64             // Memory limit in bytes (0 = no limit)
65	NanoCPUs        int64             // CPU quota in nanoseconds (1e9 = 1 core, 0 = no limit)
66	PidsLimit       int64             // Max number of PIDs (0 = no limit)
67}
68
69// ContainerStatus represents the current state of a container.
70type ContainerStatus string
71
72const (
73	ContainerStatusRunning ContainerStatus = "running"
74	ContainerStatusStopped ContainerStatus = "stopped"
75	ContainerStatusCreated ContainerStatus = "created"
76	ContainerStatusExited  ContainerStatus = "exited"
77	ContainerStatusPaused  ContainerStatus = "paused"
78	ContainerStatusUnknown ContainerStatus = "unknown"
79)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close