dbe

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 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(flags *pflag.FlagSet) DBEngine

func NewPGDBE

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

func NewSQLiteDBE

func NewSQLiteDBE(credsName string, verbose bool) (DBEngine, error)

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 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