model

package
v0.0.0-...-c96ccbb Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTodo

func CreateTodo(todo *Todo)

func CreateUser

func CreateUser(user *User)

func DeleteTodo

func DeleteTodo(t *Todo) error

func UpdateTodo

func UpdateTodo(t *Todo) error

Types

type Todo

type Todo struct {
	UID       int    `json:"uid"`
	ID        int    `json:"id" gorm:"praimaly_key"`
	Name      string `json:"name"`
	Completed bool   `json:"completed"`
}

type Todos

type Todos []Todo

func FindTodos

func FindTodos(t *Todo) Todos

type User

type User struct {
	ID       int    `json:"id" gorm:"praimaly_key"`
	Name     string `json:"name"`
	Password string `json:"password"`
}

func FindUser

func FindUser(u *User) User

Jump to

Keyboard shortcuts

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