models

package
v0.0.0-...-f8f2821 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2013 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Creator User
	Content string
	Topic   Topic
}

type Topic

type Topic struct {
	Title    string
	Creator  User
	Messages []Message
}

type User

type User struct {
	Email        string
	PasswordHash []byte
}

func NewUser

func NewUser(email string, password string) *User

func (*User) HasPassword

func (user *User) HasPassword(password string) error

type UserGobStore

type UserGobStore struct {
	Path string
}

func NewUserGobStore

func NewUserGobStore(path string) *UserGobStore

func (UserGobStore) FindUser

func (store UserGobStore) FindUser(email string) (*User, error)

func (UserGobStore) SaveUser

func (store UserGobStore) SaveUser(user User) error

type UserStore

type UserStore interface {
	FindUser(string) (*User, error)
	SaveUser(User) error
}

Jump to

Keyboard shortcuts

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