models

package
v0.0.0-...-c20aec9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDb

func CreateDb(conn string) (*appDb, error)

Types

type AppDb

type AppDb interface {
	DbStore() *sqlx.DB
	Close() error
	NewUser(string, string) (User, error)
	Authenticate(string, string) (User, error)
}

type User

type User struct {
	Name         string `form:"name" json:"name"`
	PasswordHash string `db:"password_hash"`
}

type UserAuthenticationError

type UserAuthenticationError struct {
	Msg string
}

func (UserAuthenticationError) Error

func (e UserAuthenticationError) Error() string

Jump to

Keyboard shortcuts

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