aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/entities/network.go
blob: a057640b35cc38545abe540b41db2cc45b999050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package entities

import (
	"net"

	"github.com/containers/common/libnetwork/types"
)

// NetworkListOptions describes options for listing networks in cli
type NetworkListOptions struct {
	Format  string
	Quiet   bool
	Filters map[string][]string
}

// NetworkReloadOptions describes options for reloading container network
// configuration.
type NetworkReloadOptions struct {
	All    bool
	Latest bool
}

// NetworkReloadReport describes the results of reloading a container network.
type NetworkReloadReport struct {
	// nolint:stylecheck,golint
	Id  string
	Err error
}

// NetworkRmOptions describes options for removing networks
type NetworkRmOptions struct {
	Force   bool
	Timeout *uint
}

//NetworkRmReport describes the results of network removal
type NetworkRmReport struct {
	Name string
	Err  error
}

// NetworkCreateOptions describes options to create a network
type NetworkCreateOptions struct {
	DisableDNS bool
	Driver     string
	Gateways   []net.IP
	Internal   bool
	Labels     map[string]string
	MacVLAN    string
	Ranges     []string
	Subnets    []string
	IPv6       bool
	// Mapping of driver options and values.
	Options map[string]string
}

// NetworkCreateReport describes a created network for the cli
type NetworkCreateReport struct {
	Name string
}

// NetworkDisconnectOptions describes options for disconnecting
// containers from networks
type NetworkDisconnectOptions struct {
	Container string
	Force     bool
}

// NetworkConnectOptions describes options for connecting
// a container to a network
type NetworkConnectOptions struct {
	Container string `json:"container"`
	types.PerNetworkOptions
}

// NetworkPruneReport containers the name of network and an error
// associated in its pruning (removal)
// swagger:model NetworkPruneReport
type NetworkPruneReport struct {
	Name  string
	Error error
}

// NetworkPruneOptions describes options for pruning
// unused cni networks
type NetworkPruneOptions struct {
	Filters map[string][]string
}