models

package
v0.0.0-...-027ea5e Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteContact

func DeleteContact(userId int64, contactId int64) map[string]interface{}

func GetAllContacts

func GetAllContacts(userId int64) map[string]interface{}

func GetDB

func GetDB() (*sql.DB, error)

func InsertContact

func InsertContact(userId int64, contact *Contact) map[string]interface{}

func UpdateContact

func UpdateContact(userId int64, contact *Contact) map[string]interface{}

Types

type Account

type Account struct {
	ID       int64
	Username string
	Email    string `json:"email"`
	Password string `json:"password"`
	Token    string `json:"token";sql:"-"`
}

func (*Account) Login

func (account *Account) Login() map[string]interface{}

email, password

func (*Account) Register

func (account *Account) Register() map[string]interface{}

username, email, password

type Contact

type Contact struct {
	ID      int64
	Name    string
	Phone   string
	Address string
	Email   string
}

type Token

type Token struct {
	UserId int64
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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