dbe

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: GPL-3.0 Imports: 13 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" connarg:"host"`
	Port        int    `json:"port" connarg:"port"`
	Name        string `json:"dbname" connarg:"dbname"`
	Username    string `json:"user" connarg:"user"`
	Password    string `json:"password" connarg:"password,protected"`
	SSLMode     string `json:"sslmode" connarg:"sslmode"`
	SSLCert     string `json:"sslcert" connarg:"sslcert"`
	SSLKey      string `json:"sslkey" connarg:"sslkey"`
	SSLRootCert string `json:"sslrootcert" connarg:"sslrootcert"`
	Debug       bool   `json:"debug"`
	Verbose     bool   `json:"verbose"`
	Retries     int    `json:"retries"`
}

func NewEngineArgs added in v1.1.2

func NewEngineArgs(flags *flag.FlagSet) *EngineArgs

func (*EngineArgs) AddFlags added in v1.1.2

func (ea *EngineArgs) AddFlags(flags *flag.FlagSet)

func (*EngineArgs) ToConnStr added in v1.1.2

func (ea *EngineArgs) ToConnStr(protectPassword bool) string

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