all repos

onasty @ 450a6a9

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.
	// Optional, needed only if note has one.
	Password string
}

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