models

package
v0.0.0-...-25aee9d Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(user User) error

func MakeMigrations

func MakeMigrations()

Types

type Todo

type Todo struct {
	ID          uint64 `json:"id"`
	CreatedBy   uint64 `json:"created_by"`
	Title       string `json:"title"`
	Description string `json:"description,omitempty"`
	Status      bool   `json:"status,omitempty"`
}

func (*Todo) CreateTodo

func (t *Todo) CreateTodo() (Todo, error)

func (*Todo) DeleteTodo

func (t *Todo) DeleteTodo() error

func (*Todo) GetAllTodos

func (t *Todo) GetAllTodos() ([]Todo, error)

func (*Todo) GetNoteById

func (t *Todo) GetNoteById() (Todo, error)

func (*Todo) UpdateTodo

func (t *Todo) UpdateTodo() (Todo, error)

type User

type User struct {
	ID       uint64 `json:"id"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Username string `json:"username"`
}

func CheckEmail

func CheckEmail(email string) (User, error)

func GetUserById

func GetUserById(id string) (User, error)

Jump to

Keyboard shortcuts

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