models

package
v0.0.0-...-0b688d9 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(user User)

func GetModels

func GetModels() []interface{}

Types

type Session

type Session struct {
	Username string
}

type User

type User struct {
	gorm.Model
	Email          string `json:"email" gorm:"not null;unique_index"`
	Username       string `json:"username" gorm:"not null;unique_index"`
	HashedPassword []byte
	DisplayName    string `json:"displayName"`
}

func GetAllUsers

func GetAllUsers() ([]User, error)

func GetUserByEmail

func GetUserByEmail(email string) (User, error)

func GetUserByUsername

func GetUserByUsername(username string) (User, error)

Jump to

Keyboard shortcuts

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