repository

package
v0.0.0-...-f26a32d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoteRepository

type NoteRepository interface {
	AddNote(note models.AddRequest) (string, error)
	EditNote(note models.EditRequest) (string, error)
	DeleteNote(note models.DeleteRequest) (string, error)
	GetAllNotes() ([]models.Notebook, error)
	GetNoteWithId(id uint) (*models.Notebook, error)
}

func NewRepo

func NewRepo(db *gorm.DB) NoteRepository

type Repo

type Repo struct {
	DB *gorm.DB
}

func (*Repo) AddNote

func (r *Repo) AddNote(note models.AddRequest) (string, error)

func (*Repo) DeleteNote

func (r *Repo) DeleteNote(note models.DeleteRequest) (string, error)

func (*Repo) EditNote

func (r *Repo) EditNote(note models.EditRequest) (string, error)

func (*Repo) GetAllNotes

func (r *Repo) GetAllNotes() ([]models.Notebook, error)

func (*Repo) GetNoteWithId

func (r *Repo) GetNoteWithId(Id uint) (*models.Notebook, error)

Jump to

Keyboard shortcuts

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