onasty/internal/service/notesrv/input.go (view raw)
Smirnov Oleksandr
Smirnov Oleksandr
ss2316544@gmail.com feat: add password support to notes (#41)..., 1 year ago
ss2316544@gmail.com feat: add password support to notes (#41)..., 1 year ago
| 1 | package notesrv |
| 2 | |
| 3 | import "github.com/olexsmir/onasty/internal/dtos" |
| 4 | |
| 5 | // GetNoteBySlugInput used as input for [GetBySlugAndRemoveIfNeeded] |
| 6 | type GetNoteBySlugInput struct { |
| 7 | // Slug is a note's slug :) *Required* |
| 8 | Slug dtos.NoteSlugDTO |
| 9 | |
| 10 | // Password is a note's password. |
| 11 | // Optional, needed only if note has one. |
| 12 | Password string |
| 13 | } |
| 14 | |
| 15 | func (i GetNoteBySlugInput) HasPassword() bool { |
| 16 | return i.Password != "" |
| 17 | } |