database

package
v0.0.0-...-25f99af Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package database manages the database used by the bot

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(nick, email string) (err error)

AddUser adds an user to the database.

func NewDatabase

func NewDatabase(databaseName string, migrationsFolder string, reset bool) *sql.DB

NewDatabase creates a new database. If database name is an empty string the default path will be used ("./storage/db.sqlite"), else it will be used as the path for the database file. If reset is true destroy the database before opening it (which will recreate it).

Types

This section is empty.

Jump to

Keyboard shortcuts

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