repository

package
v0.0.0-...-ea737b5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPostgres

type AuthPostgres struct {
	// contains filtered or unexported fields
}

func NewAuthPostgresRepo

func NewAuthPostgresRepo(db *sqlx.DB) *AuthPostgres

func (*AuthPostgres) CreateUser

func (r *AuthPostgres) CreateUser(user domain.User) (id int, err error)

func (*AuthPostgres) GetUser

func (r *AuthPostgres) GetUser(username, password string) (domain.User, error)

type TodoItemPostgres

type TodoItemPostgres struct {
	// contains filtered or unexported fields
}

func NewTodoItemPostgresRepo

func NewTodoItemPostgresRepo(db *sqlx.DB) *TodoItemPostgres

func (*TodoItemPostgres) Create

func (r *TodoItemPostgres) Create(listId int, item domain.TodoItem) (int, error)

func (*TodoItemPostgres) Delete

func (r *TodoItemPostgres) Delete(userId, itemId int) (err error)

func (*TodoItemPostgres) GetAll

func (r *TodoItemPostgres) GetAll(userId, listId int) ([]domain.TodoItem, error)

func (*TodoItemPostgres) GetById

func (r *TodoItemPostgres) GetById(userId, itemId int) (domain.TodoItem, error)

func (*TodoItemPostgres) Update

func (r *TodoItemPostgres) Update(userId, itemId int, item domain.UpdateItemInput) error

type TodoListPostgres

type TodoListPostgres struct {
	// contains filtered or unexported fields
}

func NewTodoListPostgresRepo

func NewTodoListPostgresRepo(db *sqlx.DB) *TodoListPostgres

func (*TodoListPostgres) Create

func (r *TodoListPostgres) Create(userId int, list domain.TodoList) (int, error)

func (*TodoListPostgres) Delete

func (r *TodoListPostgres) Delete(userId int, listId int) error

func (*TodoListPostgres) GetAll

func (r *TodoListPostgres) GetAll(userId int) ([]domain.TodoList, error)

func (*TodoListPostgres) GetById

func (r *TodoListPostgres) GetById(userId int, listId int) (domain.TodoList, error)

func (*TodoListPostgres) Update

func (r *TodoListPostgres) Update(userId, listId int, list domain.UpdateListInput) error

Jump to

Keyboard shortcuts

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