diff options
author | baude <bbaude@redhat.com> | 2020-12-14 11:33:25 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-12-17 09:40:51 -0600 |
commit | 86335aa4ae01dadecd36468409d742e68b76925d (patch) | |
tree | fd6e5bfeb924db9020073685d0133b2fa38622c1 /pkg/bindings/network/types.go | |
parent | c38ae47a1adf3235d8b01d724e7327e608dd8078 (diff) | |
download | podman-86335aa4ae01dadecd36468409d742e68b76925d.tar.gz podman-86335aa4ae01dadecd36468409d742e68b76925d.tar.bz2 podman-86335aa4ae01dadecd36468409d742e68b76925d.zip |
misc bindings to podman v3
manifest, system, info, volumes, play, and generate bindings are
updated to always have binding options.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/bindings/network/types.go')
-rw-r--r-- | pkg/bindings/network/types.go | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/pkg/bindings/network/types.go b/pkg/bindings/network/types.go new file mode 100644 index 000000000..2a7e500dd --- /dev/null +++ b/pkg/bindings/network/types.go @@ -0,0 +1,70 @@ +package network + +import "net" + +//go:generate go run ../generator/generator.go CreateOptions +// CreateOptions are optional options for creating networks +type CreateOptions struct { + // DisableDNS turns off use of DNSMasq for name resolution + // on the network + DisableDNS *bool + // Driver is the name of network driver + Driver *string + // Gateway of the network + Gateway *net.IP + // Internal turns off communication outside the networking + // being created + Internal *bool + // Labels are metadata that can be associated with the network + Labels map[string]string + // MacVLAN is the name of the macvlan network to associate with + MacVLAN *string + // Range is the CIDR description of leasable IP addresses + IPRange *net.IPNet `scheme:"range"` + // Subnet to use + Subnet *net.IPNet + // IPv6 means the network is ipv6 capable + IPv6 *bool + // Options are a mapping of driver options and values. + Options map[string]string + // Name of the network + Name *string +} + +//go:generate go run ../generator/generator.go InspectOptions +// InspectOptions are optional options for inspecting networks +type InspectOptions struct { +} + +//go:generate go run ../generator/generator.go RemoveOptions +// RemoveOptions are optional options for inspecting networks +type RemoveOptions struct { + // Force removes the network even if it is being used + Force *bool +} + +//go:generate go run ../generator/generator.go ListOptions +// ListOptions are optional options for listing networks +type ListOptions struct { + // Filters are applied to the list of networks to be more + // specific on the output + Filters map[string][]string +} + +//go:generate go run ../generator/generator.go DisconnectOptions +// DisconnectOptions are optional options for disconnecting +// containers from a network +type DisconnectOptions struct { + // Force indicates to remove the container from + // the network forcibly + Force *bool +} + +//go:generate go run ../generator/generator.go ConnectOptions +// ConnectOptions are optional options for connecting +// containers from a network +type ConnectOptions struct { + // Aliases are names the container will be known as + // when using the dns plugin + Aliases *[]string +} |