Documentation
¶
Index ¶
- func Close() error
- func ContainerExists(containerID string) bool
- func CreateContainer(dbType, displayName, username, password, port, volumeType, volumePath string) (string, error)
- func CreateUser(containerID, dbType, username, password, dbName string) error
- func DeleteUser(containerID, dbType, username, dbName string) error
- func ExecCommand(containerName string, cmd []string) (string, error)
- func ExecInContainer(containerID string, cmd []string) error
- func FindAvailablePort(startPort string) (string, error)
- func GetActualVersion(containerID, dbType string) (string, error)
- func GetConfigFileName(dbType string) string
- func GetContainerStatus(containerID string) (string, error)
- func Initialize() error
- func IsPortAvailable(port string) (bool, error)
- func RemoveContainer(containerID string) error
- func RemoveVolume(volumePath string) error
- func RestartContainer(containerID string) error
- func RotatePassword(containerID, dbType, username, newPassword, dbName string) error
- func StartContainer(containerID string) error
- func StopContainer(containerID string) error
- type DBConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerExists ¶
ContainerExists checks if a container exists
func CreateContainer ¶
func CreateContainer(dbType, displayName, username, password, port, volumeType, volumePath string) (string, error)
CreateContainer creates and starts a database container
func CreateUser ¶
CreateUser creates a new user in the database
func DeleteUser ¶
DeleteUser deletes a user from the database
func ExecCommand ¶
ExecCommand executes a command in a container and returns the output
func ExecInContainer ¶
ExecInContainer executes a command in a running container
func FindAvailablePort ¶
FindAvailablePort finds the next available port starting from the default port Returns the available port as a string
func GetActualVersion ¶
GetActualVersion retrieves the actual database version from a running container
func GetConfigFileName ¶
GetConfigFileName returns the main config file name for the database type
func GetContainerStatus ¶
GetContainerStatus returns the status of a container
func IsPortAvailable ¶
IsPortAvailable checks if a port is available on the host
func RemoveContainer ¶
RemoveContainer removes a container
func RestartContainer ¶
RestartContainer restarts a container
func RotatePassword ¶
RotatePassword rotates a user's password
func StartContainer ¶
StartContainer starts an existing container
func StopContainer ¶
StopContainer stops a container gracefully