github.com/nullne/docker@v1.13.0-rc1/api/server/router/network/backend.go (about) 1 package network 2 3 import ( 4 "github.com/docker/docker/api/types" 5 "github.com/docker/docker/api/types/network" 6 "github.com/docker/libnetwork" 7 ) 8 9 // Backend is all the methods that need to be implemented 10 // to provide network specific functionality. 11 type Backend interface { 12 FindNetwork(idName string) (libnetwork.Network, error) 13 GetNetworkByName(idName string) (libnetwork.Network, error) 14 GetNetworksByID(partialID string) []libnetwork.Network 15 GetNetworks() []libnetwork.Network 16 CreateNetwork(nc types.NetworkCreateRequest) (*types.NetworkCreateResponse, error) 17 ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error 18 DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error 19 DeleteNetwork(name string) error 20 NetworksPrune(config *types.NetworksPruneConfig) (*types.NetworksPruneReport, error) 21 }