models

package
v0.0.0-...-13f17c3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDateTime

func ConvertDateTime(tz string, dt time.Time) string

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"`
	CreatedAt   time.Time `json:"created_at,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