dbe

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2021 Colin Fox <greenenergy@gmail.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright © 2021 Colin Fox <greenenergy@gmail.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright © 2021 Colin Fox <greenenergy@gmail.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright © 2021 Colin Fox <greenenergy@gmail.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBEngine

type DBEngine interface {
	GetInstalledIDs() (*set.Set, error) // Return the IDs of patches that have already been installed
	Patch(*patch.Patch) error
}

func NewMockDBE

func NewMockDBE() DBEngine

func NewMySQLDBE added in v1.1.1

func NewMySQLDBE(args *EngineArgs) (DBEngine, error)

func NewMySQLDBE(host string, port int, user, password, dbname string, sslmode bool, verbose, debug bool, retries int) (DBEngine, error) {

func NewPGDBE

func NewPGDBE(args *EngineArgs) (DBEngine, error)

func NewPGDBE(host string, port int, user, password, dbname string, sslmode bool, verbose, debug bool, retries int) (DBEngine, error) {

func NewSQLiteDBE

func NewSQLiteDBE(args *EngineArgs) (DBEngine, error)

type EngineArgs added in v1.1.0

type EngineArgs struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Name     string `json:"dbname"`
	Username string `json:"username"`
	Password string `json:"password"`
	SSL      bool   `json:"ssl"`
	Debug    bool   `json:"debug"`
	Verbose  bool   `json:"verbose"`
	Retries  int    `json:"retries"`
}

type MockDBE

type MockDBE struct {
}

func (*MockDBE) GetInstalledIDs

func (p *MockDBE) GetInstalledIDs() (*set.Set, error)

func (*MockDBE) Patch

func (p *MockDBE) Patch(thepatch *patch.Patch) error

type MySQLDBE added in v1.1.1

type MySQLDBE struct {
	// contains filtered or unexported fields
}

func (*MySQLDBE) DPrint added in v1.1.1

func (p *MySQLDBE) DPrint(msg string)

func (*MySQLDBE) GetInstalledIDs added in v1.1.1

func (p *MySQLDBE) GetInstalledIDs() (*set.Set, error)

func (*MySQLDBE) Patch added in v1.1.1

func (p *MySQLDBE) Patch(ptch *patch.Patch) error

type MySqlArgs added in v1.1.1

type MySqlArgs struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Name     string `json:"dbname"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type PGArgs

type PGArgs struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Name     string `json:"dbname"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type PGDBE

type PGDBE struct {
	// contains filtered or unexported fields
}

func (*PGDBE) DPrint added in v1.0.1

func (p *PGDBE) DPrint(msg string)

func (*PGDBE) GetInstalledIDs

func (p *PGDBE) GetInstalledIDs() (*set.Set, error)

func (*PGDBE) Patch

func (p *PGDBE) Patch(ptch *patch.Patch) error

type SQLITEArgs added in v1.0.1

type SQLITEArgs struct {
	Filename string `json:"filename"`
}

type SQLiteDBE

type SQLiteDBE struct {
	// contains filtered or unexported fields
}

func (*SQLiteDBE) GetInstalledIDs

func (p *SQLiteDBE) GetInstalledIDs() (*set.Set, error)

func (*SQLiteDBE) Patch

func (p *SQLiteDBE) Patch(ptch *patch.Patch) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL