feat: start of ContainerCreate struct
ci/woodpecker/push/lint Pipeline failed Details

jef
Jef Roosens 2022-06-23 20:43:18 +02:00
parent 60fd13d25a
commit 847a904e8d
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 44 additions and 0 deletions

View File

@ -1,6 +1,7 @@
module types module types
pub struct Port { pub struct Port {
pub:
ip string [json: IP] ip string [json: IP]
private_port u16 [json: PrivatePort] private_port u16 [json: PrivatePort]
public_port u16 [json: PublicPort] public_port u16 [json: PublicPort]
@ -8,16 +9,19 @@ pub struct Port {
} }
pub struct HostConfig { pub struct HostConfig {
pub:
network_mode string [json: NetworkMode] network_mode string [json: NetworkMode]
} }
pub struct EndpointIpamConfig { pub struct EndpointIpamConfig {
pub:
ipv4_address string [json: IPv4Address] ipv4_address string [json: IPv4Address]
ipv6_address string [json: IPv6Address] ipv6_address string [json: IPv6Address]
link_local_ips []string [json: LinkLocalIPs] link_local_ips []string [json: LinkLocalIPs]
} }
pub struct EndpointSettings { pub struct EndpointSettings {
pub:
ipam_config EndpointIpamConfig [json: IPAMConfig] ipam_config EndpointIpamConfig [json: IPAMConfig]
links []string [json: Links] links []string [json: Links]
aliases []string [json: Aliases] aliases []string [json: Aliases]
@ -34,10 +38,12 @@ pub struct EndpointSettings {
} }
pub struct NetworkSettings { pub struct NetworkSettings {
pub:
networks map[string]EndpointSettings [json: Networks] networks map[string]EndpointSettings [json: Networks]
} }
pub struct MountPoint { pub struct MountPoint {
pub:
type_ string [json: Type] type_ string [json: Type]
name string [json: Name] name string [json: Name]
source string [json: Source] source string [json: Source]
@ -49,6 +55,7 @@ pub struct MountPoint {
} }
pub struct ContainerListItem { pub struct ContainerListItem {
pub:
id string [json: Id] id string [json: Id]
names []string [json: Names] names []string [json: Names]
image string [json: Image] image string [json: Image]
@ -65,3 +72,40 @@ pub struct ContainerListItem {
network_settings NetworkSettings [json: NetworkSettings] network_settings NetworkSettings [json: NetworkSettings]
mounts []MountPoint [json: Mounts] mounts []MountPoint [json: Mounts]
} }
pub struct HealthConfig {
pub:
test []string [json: Test]
interval int [json: Interval]
timeout int [json: Timeout]
retries int [json: Retries]
start_period int [json: StartPeriod]
}
pub struct ContainerCreate {
pub:
hostname string [json: Hostname]
domain_name string [json: Domainname]
user string [json: User]
attach_stdin bool [json: AttachStdin]
attach_stdout bool [json: AttachStderr] = true
// ExposedPorts
tty bool [json: Tty]
open_stdin bool [json: OpenStdin]
stdin_once bool [json: StdinOnce]
env []string [json: Env]
cmd []string [json: Cmd]
healthcheck HealthConfig [json: Healthcheck]
args_escaped bool [json: ArgsEscaped]
image string [json: Image]
// Volumes
working_dir string [json: WorkingDir]
entrypoint []string [json: Entrypoint]
network_disabled bool [json: NetworkDisabled]
mac_address string [json: MacAddress]
on_build []string [json: OnBuild]
labels map[string]string [json: Labels]
stop_signal string [json: StopSignal]
stop_timeout int [json: StopTimeout]
shell []string [json: Shell]
}