librarian_pg

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LibrarianPG

type LibrarianPG struct {

	// Config contains general configuration of BHLnames. Some of the config
	// settings modify behavior of algorithms to find BHL references.
	config.Config

	// KV contains a key-value Badger store where data about known
	// publications is kept.
	KV *badger.DB

	// DB is a PostgreSQL connection for plain SQL-queries.
	DB *sql.DB

	// GormDB is a PostgreSQL connection for ORM-queries.
	GormDB *gorm.DB
}

LibrarianPG is an implementation of Librarian interface. It uses pre-populated PostgreSQL database and Badger key-value store to find BHL references where a scientific name-string appears.

func NewLibrarianPG

func NewLibrarianPG(cfg config.Config) LibrarianPG

func (LibrarianPG) Close

func (l LibrarianPG) Close() error

func (LibrarianPG) ReferencesBHL

func (l LibrarianPG) ReferencesBHL(name_string string, opts ...config.Option) (*entity.NameRefs, error)

Jump to

Keyboard shortcuts

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