Documentation ¶
Index ¶
- type Database
- func (in *Database) DeleteContainer(con *types.Container) error
- func (in *Database) DeleteExec(exc *types.Exec) error
- func (in *Database) DeleteImage(img *types.Image) error
- func (in *Database) DeleteNetwork(netw *types.Network) error
- func (in *Database) GetContainer(id string) (*types.Container, error)
- func (in *Database) GetContainerByName(name string) (*types.Container, error)
- func (in *Database) GetContainerByNameOrID(id string) (*types.Container, error)
- func (in *Database) GetContainers() ([]*types.Container, error)
- func (in *Database) GetExec(id string) (*types.Exec, error)
- func (in *Database) GetExecs() ([]*types.Exec, error)
- func (in *Database) GetImage(id string) (*types.Image, error)
- func (in *Database) GetImageByName(name string) (*types.Image, error)
- func (in *Database) GetImageByNameOrID(id string) (*types.Image, error)
- func (in *Database) GetImages() ([]*types.Image, error)
- func (in *Database) GetNetwork(id string) (*types.Network, error)
- func (in *Database) GetNetworkByName(name string) (*types.Network, error)
- func (in *Database) GetNetworkByNameOrID(id string) (*types.Network, error)
- func (in *Database) GetNetworks() ([]*types.Network, error)
- func (in *Database) GetNetworksByIDs(ids map[string]interface{}) ([]*types.Network, error)
- func (in *Database) SaveContainer(con *types.Container) error
- func (in *Database) SaveExec(exc *types.Exec) error
- func (in *Database) SaveImage(img *types.Image) error
- func (in *Database) SaveNetwork(netw *types.Network) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is the object contains the in-memory database.
func (*Database) DeleteContainer ¶
DeleteContainer will delete provided container.
func (*Database) DeleteExec ¶
DeleteExec will delete provided exec.
func (*Database) DeleteImage ¶
DeleteImage will delete provided image.
func (*Database) DeleteNetwork ¶
DeleteNetwork will delete provided network.
func (*Database) GetContainer ¶
GetContainer will return a container with given id, or an error if the instance does not exist.
func (*Database) GetContainerByName ¶
GetContainerByName will return a container with given name, or an error if the instance does not exist.
func (*Database) GetContainerByNameOrID ¶
GetContainerByNameOrID will return a container with id/name, or an error if the instance does not exist.
func (*Database) GetContainers ¶
GetContainers will return all stored containers.
func (*Database) GetExec ¶
GetExec will return a exec with given id, or an error if the instance does not exist.
func (*Database) GetImage ¶
GetImage will return an image with given id, or an error if the instance does not exist.
func (*Database) GetImageByName ¶
GetImageByName will return an image with given name, or an error if the instance does not exist.
func (*Database) GetImageByNameOrID ¶
GetImageByNameOrID will return an image with id/name, or an error if the instance does not exist.
func (*Database) GetNetwork ¶
GetNetwork will return a network with given id, or an error if the instance does not exist.
func (*Database) GetNetworkByName ¶
GetNetworkByName will return a network with given name, or an error if the instance does not exist.
func (*Database) GetNetworkByNameOrID ¶
GetNetworkByNameOrID will return a network with id/name, or an error if the instance does not exist.
func (*Database) GetNetworks ¶
GetNetworks will return all stored networks.
func (*Database) GetNetworksByIDs ¶
GetNetworksByIDs will return all networks that are in the given set of network ids.
func (*Database) SaveContainer ¶
SaveContainer will either update the given container, or create a new record. If ID is not provided, it will generate an ID and adds the current time in Created.
func (*Database) SaveExec ¶
SaveExec will either update the given exec, or create a new record. If ID is not provided, it will generate an ID and adds the current time in Created.