buna

package module
v0.0.0-...-f9e5e15 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 17 Imported by: 0

README

buna

Initial setup

git clone https://github.com/nicholas-p1/buna.git
cd buna
./build.sh

Usage

cd buna
./buna

This will store the data in an SQLite database named bunaDB.db

Optional database name
cd buna
./buna -db {your_database_name}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, db DB) error

Types

type DB

type DB interface {

	// general
	TransactContext(ctx context.Context, f func(ctx context.Context, tx *sql.Tx) error) error
	Close() error
	// contains filtered or unexported methods
}

type SQLiteDB

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

func OpenSQLiteDB

func OpenSQLiteDB(ctx context.Context, logger *zap.Logger, dsn string) (*SQLiteDB, error)

func (*SQLiteDB) Close

func (s *SQLiteDB) Close() error

func (*SQLiteDB) TransactContext

func (s *SQLiteDB) TransactContext(ctx context.Context, f func(ctx context.Context, tx *sql.Tx) error) (err error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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