diff options
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 +} |