drivers

package
v0.0.0-...-a579f18 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Provides a standard test library for drivers.

You can use the functions of this package to test your own driver implementations.

If your driver provides both read and write functionality and no inbetween synchronization you can use the TestDriver function, otherwise read and write is split into TestImport and TestData

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestData

func TestData(db password.DB) error

TestData will test that the data imported with TestImport is correctly returned. It will test "Has" function of the driver. If any error is returned the test failed.

func TestDriver

func TestDriver(db TestDB) error

TestDriver will test a driver by running TestImport followed by TestData

func TestImport

func TestImport(db password.DbWriter) error

TestImport will import about 1500 entries into your database. It will test "Add" and "AddMultiple" (if available). If any error is returned the test failed.

Types

type TestDB

type TestDB interface {
	password.DbWriter
	password.DB
}

Directories

Path Synopsis
A bitset Bloom filter for a reduced memory password representation.
A bitset Bloom filter for a reduced memory password representation.
Driver for BoltDB
Driver for BoltDB
Package cassandra is a driver for Apache Cassandra Supply a session and the database and collection name you would like to use.
Package cassandra is a driver for Apache Cassandra Supply a session and the database and collection name you would like to use.
Driver for MongoDB Tested on Mongo v3.0.4 and 2.6.x Supply a session and the database and collection name you would like to use.
Driver for MongoDB Tested on Mongo v3.0.4 and 2.6.x Supply a session and the database and collection name you would like to use.
Wrapper for an SQL database backend This can be used to use an existing database for input output.
Wrapper for an SQL database backend This can be used to use an existing database for input output.
An in-memory database for testing This database is completely in memory and can be used as a reference for your own implementation.
An in-memory database for testing This database is completely in memory and can be used as a reference for your own implementation.

Jump to

Keyboard shortcuts

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