db

package
v0.0.0-...-c23400f Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() error

func CreateUser

func CreateUser(u User) error

func LoginUser

func LoginUser(user string, pass string) (string, error)

Types

type DBConfig

type DBConfig struct {
	Salt string
}
var Config DBConfig

type User

type User struct {
	Username string
	Password string
}

todo: store password hash instead

type ViewResponse

type ViewResponse struct {
	TotalRows int           `json:"total_rows"`
	Offset    int           `json:"offset"`
	Rows      []interface{} `json:"rows"`
}

Jump to

Keyboard shortcuts

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