repositories

package
v0.0.0-...-365bb53 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT 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 {
	Save(note entities.Note) error
	Update(note entities.Note) error
	Delete(noteId int) error
	FindById(noteId int) (entities.Note, error)
	FindAll() ([]entities.Note, error)
}

func NewNoteRepositoryImpl

func NewNoteRepositoryImpl(db *gorm.DB) NoteRepository

type NoteRepositoryImpl

type NoteRepositoryImpl struct {
	Db *gorm.DB
}

func (*NoteRepositoryImpl) Delete

func (n *NoteRepositoryImpl) Delete(noteId int) error

func (*NoteRepositoryImpl) FindAll

func (n *NoteRepositoryImpl) FindAll() ([]entities.Note, error)

func (*NoteRepositoryImpl) FindById

func (n *NoteRepositoryImpl) FindById(noteId int) (entities.Note, error)

func (*NoteRepositoryImpl) Save

func (n *NoteRepositoryImpl) Save(note entities.Note) error

func (*NoteRepositoryImpl) Update

func (n *NoteRepositoryImpl) Update(note entities.Note) error

Jump to

Keyboard shortcuts

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