postgres

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package postgres implements the interface for PostgreSQL (TODO).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

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

func New

func New(connection string) (*Postgres, error)

New returns a postgres client connection to the specified database in 'connection'.

func (*Postgres) AddAddress

func (p *Postgres) AddAddress(a store.Address, net string) ([]byte, error)

func (*Postgres) ClosePostgres

func (p *Postgres) ClosePostgres() error

ClosePostgres will close any database connection. Must be called at termination time.

func (*Postgres) DeleteExplorer

func (p *Postgres) DeleteExplorer(net string) (err error)

func (*Postgres) GetAddresses

func (p *Postgres) GetAddresses(net []string) (addrs []store.ListenedAddresses, err error)

func (*Postgres) LoadExplorer

func (p *Postgres) LoadExplorer(net string) (ne store.NetExplorer, err error)

func (*Postgres) RemoveAddress

func (p *Postgres) RemoveAddress(a store.Address, net string) error

func (*Postgres) SaveExplorer

func (p *Postgres) SaveExplorer(net string, ne store.NetExplorer) (err error)

Jump to

Keyboard shortcuts

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