all repos

onasty @ 36f59cd

a one-time notes service

onasty/internal/service/notesrv/input.go(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package notesrv

import "github.com/olexsmir/onasty/internal/dtos"

// GetNoteBySlugInput used as input for [GetBySlugAndRemoveIfNeeded]
type GetNoteBySlugInput struct {
	// Slug is a note's slug :) *Required*
	Slug dtos.NoteSlug

	// Password is a note's password.
	// Leave it `""` if note has no password.
	Password string
}

func (i GetNoteBySlugInput) HasPassword() bool {
	return i.Password != ""
}