db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(driverName string, dataSourceName string, logger log.Logger) (store.DB, error)

Types

type DB

type DB struct {
	*sql.DB
	// contains filtered or unexported fields
}

func (*DB) Delete

func (db *DB) Delete(id int) error

func (*DB) Insert

func (db *DB) Insert(c csr.CSR) (int, error)

func (*DB) SelectAll

func (db *DB) SelectAll() csr.CSRs

func (*DB) SelectAllByCN

func (db *DB) SelectAllByCN(cn string) csr.CSRs

func (*DB) SelectByID

func (db *DB) SelectByID(id int) (csr.CSR, error)

func (*DB) SelectByStatus

func (db *DB) SelectByStatus(status string) csr.CSRs

func (*DB) UpdateByID

func (db *DB) UpdateByID(id int, c csr.CSR) (csr.CSR, error)

func (*DB) UpdateFilePath

func (db *DB) UpdateFilePath(c csr.CSR) error

Jump to

Keyboard shortcuts

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