Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Index ¶
- func Connect(ctx context.Context, networkName string, containerNameOrID string, ...) error
- func Create(ctx context.Context, network *types.Network) (types.Network, error)
- func CreateWithOptions(ctx context.Context, network *types.Network, ...) (types.Network, error)
- func Disconnect(ctx context.Context, networkName string, containerNameOrID string, ...) error
- func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error)
- func Inspect(ctx context.Context, nameOrID string, _ *InspectOptions) (entitiesTypes.NetworkInspectReport, error)
- func List(ctx context.Context, options *ListOptions) ([]types.Network, error)
- func Prune(ctx context.Context, options *PruneOptions) ([]*entitiesTypes.NetworkPruneReport, error)
- func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) ([]*entitiesTypes.NetworkRmReport, error)
- func Update(ctx context.Context, netNameOrID string, options *UpdateOptions) error
- type CreateOptions
- func (o *CreateOptions) Changed(fieldName string) bool
- func (o *CreateOptions) GetDisableDNS() bool
- func (o *CreateOptions) GetDriver() string
- func (o *CreateOptions) GetGateway() net.IP
- func (o *CreateOptions) GetIPRange() net.IPNet
- func (o *CreateOptions) GetIPv6() bool
- func (o *CreateOptions) GetInternal() bool
- func (o *CreateOptions) GetLabels() map[string]string
- func (o *CreateOptions) GetMacVLAN() string
- func (o *CreateOptions) GetName() string
- func (o *CreateOptions) GetOptions() map[string]string
- func (o *CreateOptions) GetSubnet() net.IPNet
- func (o *CreateOptions) ToParams() (url.Values, error)
- func (o *CreateOptions) WithDisableDNS(value bool) *CreateOptions
- func (o *CreateOptions) WithDriver(value string) *CreateOptions
- func (o *CreateOptions) WithGateway(value net.IP) *CreateOptions
- func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions
- func (o *CreateOptions) WithIPv6(value bool) *CreateOptions
- func (o *CreateOptions) WithInternal(value bool) *CreateOptions
- func (o *CreateOptions) WithLabels(value map[string]string) *CreateOptions
- func (o *CreateOptions) WithMacVLAN(value string) *CreateOptions
- func (o *CreateOptions) WithName(value string) *CreateOptions
- func (o *CreateOptions) WithOptions(value map[string]string) *CreateOptions
- func (o *CreateOptions) WithSubnet(value net.IPNet) *CreateOptions
- type DisconnectOptions
- type ExistsOptions
- type ExtraCreateOptions
- type InspectOptions
- type ListOptions
- type PruneOptions
- type RemoveOptions
- func (o *RemoveOptions) Changed(fieldName string) bool
- func (o *RemoveOptions) GetForce() bool
- func (o *RemoveOptions) GetTimeout() uint
- func (o *RemoveOptions) ToParams() (url.Values, error)
- func (o *RemoveOptions) WithForce(value bool) *RemoveOptions
- func (o *RemoveOptions) WithTimeout(value uint) *RemoveOptions
- type UpdateOptions
- func (o *UpdateOptions) Changed(fieldName string) bool
- func (o *UpdateOptions) GetAddDNSServers() []string
- func (o *UpdateOptions) GetRemoveDNSServers() []string
- func (o *UpdateOptions) ToParams() (url.Values, error)
- func (o *UpdateOptions) WithAddDNSServers(value []string) *UpdateOptions
- func (o *UpdateOptions) WithRemoveDNSServers(value []string) *UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(ctx context.Context, networkName string, containerNameOrID string, options *types.PerNetworkOptions) error
Connect adds a container to a network
func CreateWithOptions ¶
func Disconnect ¶
func Disconnect(ctx context.Context, networkName string, containerNameOrID string, options *DisconnectOptions) error
Disconnect removes a container from a given network
func Inspect ¶
func Inspect(ctx context.Context, nameOrID string, _ *InspectOptions) (entitiesTypes.NetworkInspectReport, error)
Inspect returns information about a network configuration
func Prune ¶
func Prune(ctx context.Context, options *PruneOptions) ([]*entitiesTypes.NetworkPruneReport, error)
Prune removes unused networks
func Remove ¶
func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) ([]*entitiesTypes.NetworkRmReport, error)
Remove deletes a defined network configuration by name. The optional force boolean will remove all containers associated with the network when set to true. A slice of NetworkRemoveReports are returned.
Types ¶
type CreateOptions ¶
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 }
CreateOptions are optional options for creating networks
func (*CreateOptions) Changed ¶
func (o *CreateOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*CreateOptions) GetDisableDNS ¶
func (o *CreateOptions) GetDisableDNS() bool
GetDisableDNS returns value of field DisableDNS
func (*CreateOptions) GetDriver ¶
func (o *CreateOptions) GetDriver() string
GetDriver returns value of field Driver
func (*CreateOptions) GetGateway ¶
func (o *CreateOptions) GetGateway() net.IP
GetGateway returns value of field Gateway
func (*CreateOptions) GetIPRange ¶
func (o *CreateOptions) GetIPRange() net.IPNet
GetIPRange returns value of field IPRange
func (*CreateOptions) GetIPv6 ¶
func (o *CreateOptions) GetIPv6() bool
GetIPv6 returns value of field IPv6
func (*CreateOptions) GetInternal ¶
func (o *CreateOptions) GetInternal() bool
GetInternal returns value of field Internal
func (*CreateOptions) GetLabels ¶
func (o *CreateOptions) GetLabels() map[string]string
GetLabels returns value of field Labels
func (*CreateOptions) GetMacVLAN ¶
func (o *CreateOptions) GetMacVLAN() string
GetMacVLAN returns value of field MacVLAN
func (*CreateOptions) GetName ¶
func (o *CreateOptions) GetName() string
GetName returns value of field Name
func (*CreateOptions) GetOptions ¶
func (o *CreateOptions) GetOptions() map[string]string
GetOptions returns value of field Options
func (*CreateOptions) GetSubnet ¶
func (o *CreateOptions) GetSubnet() net.IPNet
GetSubnet returns value of field Subnet
func (*CreateOptions) ToParams ¶
func (o *CreateOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*CreateOptions) WithDisableDNS ¶
func (o *CreateOptions) WithDisableDNS(value bool) *CreateOptions
WithDisableDNS set field DisableDNS to given value
func (*CreateOptions) WithDriver ¶
func (o *CreateOptions) WithDriver(value string) *CreateOptions
WithDriver set field Driver to given value
func (*CreateOptions) WithGateway ¶
func (o *CreateOptions) WithGateway(value net.IP) *CreateOptions
WithGateway set field Gateway to given value
func (*CreateOptions) WithIPRange ¶
func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions
WithIPRange set field IPRange to given value
func (*CreateOptions) WithIPv6 ¶
func (o *CreateOptions) WithIPv6(value bool) *CreateOptions
WithIPv6 set field IPv6 to given value
func (*CreateOptions) WithInternal ¶
func (o *CreateOptions) WithInternal(value bool) *CreateOptions
WithInternal set field Internal to given value
func (*CreateOptions) WithLabels ¶
func (o *CreateOptions) WithLabels(value map[string]string) *CreateOptions
WithLabels set field Labels to given value
func (*CreateOptions) WithMacVLAN ¶
func (o *CreateOptions) WithMacVLAN(value string) *CreateOptions
WithMacVLAN set field MacVLAN to given value
func (*CreateOptions) WithName ¶
func (o *CreateOptions) WithName(value string) *CreateOptions
WithName set field Name to given value
func (*CreateOptions) WithOptions ¶
func (o *CreateOptions) WithOptions(value map[string]string) *CreateOptions
WithOptions set field Options to given value
func (*CreateOptions) WithSubnet ¶
func (o *CreateOptions) WithSubnet(value net.IPNet) *CreateOptions
WithSubnet set field Subnet to given value
type DisconnectOptions ¶
type DisconnectOptions struct { // Force indicates to remove the container from // the network forcibly Force *bool }
DisconnectOptions are optional options for disconnecting containers from a network
func (*DisconnectOptions) Changed ¶
func (o *DisconnectOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*DisconnectOptions) GetForce ¶
func (o *DisconnectOptions) GetForce() bool
GetForce returns value of field Force
func (*DisconnectOptions) ToParams ¶
func (o *DisconnectOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*DisconnectOptions) WithForce ¶
func (o *DisconnectOptions) WithForce(value bool) *DisconnectOptions
WithForce set field Force to given value
type ExistsOptions ¶
type ExistsOptions struct { }
ExistsOptions are optional options for checking if a network exists
func (*ExistsOptions) Changed ¶
func (o *ExistsOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
type ExtraCreateOptions ¶
type ExtraCreateOptions struct { // IgnoreIfExists if true, do not fail if the network already exists IgnoreIfExists *bool `schema:"ignoreIfExists"` }
ExtraCreateOptions are optional additional configuration flags for creating Networks that are not part of the network configuration
func (*ExtraCreateOptions) Changed ¶
func (o *ExtraCreateOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*ExtraCreateOptions) GetIgnoreIfExists ¶
func (o *ExtraCreateOptions) GetIgnoreIfExists() bool
GetIgnoreIfExists returns value of field IgnoreIfExists
func (*ExtraCreateOptions) ToParams ¶
func (o *ExtraCreateOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*ExtraCreateOptions) WithIgnoreIfExists ¶
func (o *ExtraCreateOptions) WithIgnoreIfExists(value bool) *ExtraCreateOptions
WithIgnoreIfExists set field IgnoreIfExists to given value
type InspectOptions ¶
type InspectOptions struct { }
InspectOptions are optional options for inspecting networks
func (*InspectOptions) Changed ¶
func (o *InspectOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
type ListOptions ¶
type ListOptions struct { // Filters are applied to the list of networks to be more // specific on the output Filters map[string][]string }
ListOptions are optional options for listing networks
func (*ListOptions) Changed ¶
func (o *ListOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*ListOptions) GetFilters ¶
func (o *ListOptions) GetFilters() map[string][]string
GetFilters returns value of field Filters
func (*ListOptions) ToParams ¶
func (o *ListOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*ListOptions) WithFilters ¶
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions
WithFilters set field Filters to given value
type PruneOptions ¶
type PruneOptions struct { // Filters are applied to the prune of networks to be more // specific on choosing Filters map[string][]string }
PruneOptions are optional options for removing unused networks
func (*PruneOptions) Changed ¶
func (o *PruneOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*PruneOptions) GetFilters ¶
func (o *PruneOptions) GetFilters() map[string][]string
GetFilters returns value of field Filters
func (*PruneOptions) ToParams ¶
func (o *PruneOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*PruneOptions) WithFilters ¶
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions
WithFilters set field Filters to given value
type RemoveOptions ¶
type RemoveOptions struct { // Force removes the network even if it is being used Force *bool Timeout *uint }
RemoveOptions are optional options for inspecting networks
func (*RemoveOptions) Changed ¶
func (o *RemoveOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*RemoveOptions) GetForce ¶
func (o *RemoveOptions) GetForce() bool
GetForce returns value of field Force
func (*RemoveOptions) GetTimeout ¶
func (o *RemoveOptions) GetTimeout() uint
GetTimeout returns value of field Timeout
func (*RemoveOptions) ToParams ¶
func (o *RemoveOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*RemoveOptions) WithForce ¶
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions
WithForce set field Force to given value
func (*RemoveOptions) WithTimeout ¶
func (o *RemoveOptions) WithTimeout(value uint) *RemoveOptions
WithTimeout set field Timeout to given value
type UpdateOptions ¶
type UpdateOptions struct { AddDNSServers []string `json:"adddnsservers"` RemoveDNSServers []string `json:"removednsservers"` }
NetworkUpdateOptions describes options to update a network
func (*UpdateOptions) Changed ¶
func (o *UpdateOptions) Changed(fieldName string) bool
Changed returns true if named field has been set
func (*UpdateOptions) GetAddDNSServers ¶
func (o *UpdateOptions) GetAddDNSServers() []string
GetAddDNSServers returns value of field AddDNSServers
func (*UpdateOptions) GetRemoveDNSServers ¶
func (o *UpdateOptions) GetRemoveDNSServers() []string
GetRemoveDNSServers returns value of field RemoveDNSServers
func (*UpdateOptions) ToParams ¶
func (o *UpdateOptions) ToParams() (url.Values, error)
ToParams formats struct fields to be passed to API service
func (*UpdateOptions) WithAddDNSServers ¶
func (o *UpdateOptions) WithAddDNSServers(value []string) *UpdateOptions
WithAddDNSServers set field AddDNSServers to given value
func (*UpdateOptions) WithRemoveDNSServers ¶
func (o *UpdateOptions) WithRemoveDNSServers(value []string) *UpdateOptions
WithRemoveDNSServers set field RemoveDNSServers to given value