repository

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB() *gorm.DB

Types

type Task

type Task struct {
	gorm.Model
	UUID        string
	UserID      string
	Title       string
	Description string
	Status      int
}

type TaskRepository

type TaskRepository struct {
	DB *gorm.DB
}

func NewTaskRepository

func NewTaskRepository(db *gorm.DB) *TaskRepository

func (*TaskRepository) Create

func (repository *TaskRepository) Create(task model.Task) (model.Task, error)

func (*TaskRepository) Delete

func (repository *TaskRepository) Delete(id string) error

func (*TaskRepository) Fetch

func (repository *TaskRepository) Fetch(params model.TaskFetchParam) ([]model.Task, error)

func (*TaskRepository) FetchByID

func (repository *TaskRepository) FetchByID(id string) (model.Task, error)

func (*TaskRepository) Update

func (repository *TaskRepository) Update(task model.Task) (model.Task, error)

Jump to

Keyboard shortcuts

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