Documentation ¶
Index ¶
- Variables
- type ArchiveNote
- type CreateNote
- type DeleteNote
- type GetNoteById
- type GetNotesByUserEmail
- type NotesUseCase
- func (u *NotesUseCase) ArchiveNote(ctx context.Context, data ArchiveNote) *domain.Error
- func (u *NotesUseCase) CreateNote(ctx context.Context, data CreateNote) (noteId string, err *domain.Error)
- func (u *NotesUseCase) DeleteNote(ctx context.Context, data DeleteNote) *domain.Error
- func (u *NotesUseCase) GetNoteById(ctx context.Context, data GetNoteById) (note entity.Note, err *domain.Error)
- func (u *NotesUseCase) GetNotesByUserEmail(ctx context.Context, data GetNotesByUserEmail) (notes []entity.Note, err *domain.Error)
- func (u *NotesUseCase) UnArchiveNote(ctx context.Context, data UnArchiveNote) *domain.Error
- func (u *NotesUseCase) UpdateNote(ctx context.Context, data UpdateNote) *domain.Error
- type UnArchiveNote
- type UpdateNote
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NOTE_ALREADY_ARCHIVED_ERROR = domain.NewErrorCode(4101, "NOTE_ALREADY_ARCHIVED_ERROR", "note is already archived") NOTE_ALREADY_ACTIVE_ERROR = domain.NewErrorCode(4102, "NOTE_ALREADY_ACTIVE_ERROR", "note is already activated") )
Functions ¶
This section is empty.
Types ¶
type ArchiveNote ¶
type CreateNote ¶
type DeleteNote ¶
type GetNoteById ¶
type GetNotesByUserEmail ¶
type GetNotesByUserEmail struct { UserEmail string `validate:"required,email"` Status entity.NoteStatus }
type NotesUseCase ¶
type NotesUseCase struct {
// contains filtered or unexported fields
}
func NewNotesUseCase ¶
func NewNotesUseCase(notesRepository repository.NotesRepository, usersRepository repository.UserRepository) *NotesUseCase
func (*NotesUseCase) ArchiveNote ¶
func (u *NotesUseCase) ArchiveNote(ctx context.Context, data ArchiveNote) *domain.Error
func (*NotesUseCase) CreateNote ¶
func (u *NotesUseCase) CreateNote(ctx context.Context, data CreateNote) (noteId string, err *domain.Error)
func (*NotesUseCase) DeleteNote ¶
func (u *NotesUseCase) DeleteNote(ctx context.Context, data DeleteNote) *domain.Error
func (*NotesUseCase) GetNoteById ¶
func (u *NotesUseCase) GetNoteById(ctx context.Context, data GetNoteById) (note entity.Note, err *domain.Error)
func (*NotesUseCase) GetNotesByUserEmail ¶
func (u *NotesUseCase) GetNotesByUserEmail(ctx context.Context, data GetNotesByUserEmail) (notes []entity.Note, err *domain.Error)
func (*NotesUseCase) UnArchiveNote ¶
func (u *NotesUseCase) UnArchiveNote(ctx context.Context, data UnArchiveNote) *domain.Error
func (*NotesUseCase) UpdateNote ¶
func (u *NotesUseCase) UpdateNote(ctx context.Context, data UpdateNote) *domain.Error
type UnArchiveNote ¶
Click to show internal directories.
Click to hide internal directories.