storage

package
v0.0.0-...-a2527aa Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2013 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package storage provides a generic interface for manipulating a BitTorrent tracker's web application data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, driver Driver)

Register makes a database driver available by the provided name. If Register is called twice with the same name or if driver is nil, it panics.

Types

type Conn

type Conn interface {
	Close() error
	UpdateTorrents(t []models.Torrent) error
	UpdateUsers(u []models.User) error
}

Conn represents a connection to the data store.

func Open

func Open(conf *config.DataStore) (Conn, error)

Open creates a connection specified by a storage configuration.

type Driver

type Driver interface {
	New(*config.DataStore) Conn
}

Directories

Path Synopsis
Package batter provides a driver for a BitTorrent tracker to interface with the postgres database used by batter (github.com/wafflesfm/batter).
Package batter provides a driver for a BitTorrent tracker to interface with the postgres database used by batter (github.com/wafflesfm/batter).

Jump to

Keyboard shortcuts

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