db

package
v0.0.0-...-92cf2b6 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: BSD-2-Clause Imports: 0 Imported by: 1

Documentation

Overview

Package db contains common interface that all implementations under db directory must satisfy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Begin() (Tx, error) // Begin returns an object of transaction interface.
}

DB is a general interface for arbitrary database type.

type Deleter

type Deleter interface {
	Delete(v interface{}) error
}

Deleter provides the Delete method to delete an object.

type Storer

type Storer interface {
	Store(v interface{}) error
}

Storer provides the Store method to store an object parsed from an HTTP response.

type Tx

type Tx interface {
	Storer
	Deleter
	Commit() error
	Rollback() error
}

Tx is a transaction interface that provides methods for storing objects, commit or rollback changes. Tx's implementation must allow concurrent use.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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