Documentation ¶
Index ¶
- type PostgresNotesRepository
- func (p PostgresNotesRepository) CreateNewNote(ctx context.Context, note *model.Note) (*model.Note, error)
- func (p PostgresNotesRepository) ExistsNoteWithID(ctx context.Context, noteId string) (bool, error)
- func (p PostgresNotesRepository) GetAllNotes(ctx context.Context) ([]*model.Note, error)
- func (p PostgresNotesRepository) UpdateNote(ctx context.Context, noteId string, note *model.Note) (*model.Note, error)
- type Repository
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresNotesRepository ¶
type PostgresNotesRepository struct {
// contains filtered or unexported fields
}
local database models.
func (PostgresNotesRepository) CreateNewNote ¶
func (PostgresNotesRepository) ExistsNoteWithID ¶
func (PostgresNotesRepository) GetAllNotes ¶
type Repository ¶
type Repository interface { CreateNewNote(ctx context.Context, note *model.Note) (*model.Note, error) GetAllNotes(ctx context.Context) ([]*model.Note, error) UpdateNote(ctx context.Context, noteId string, note *model.Note) (*model.Note, error) ExistsNoteWithID(ctx context.Context, noteId string) (bool, error) }
func ProvideNewNotesRepository ¶
func ProvideNewNotesRepository(db *db.Database) (Repository, error)
type Service ¶
type Service interface { SaveNewNote(ctx context.Context, newNoteInput model.NewNoteInput) (*model.Note, error) GetAllNotes(ctx context.Context) ([]*model.Note, error) }
func ProvideNewNotesService ¶
func ProvideNewNotesService(notesRepository Repository, transactionManager db.TransactionManager) (Service, error)
Click to show internal directories.
Click to hide internal directories.