note

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Note

type Note struct {
	Name      string
	Content   string
	CreatedAt time.Time
	UpdatedAt time.Time
	Byte      []byte
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) Create

func (s *Store) Create(name, content string) error

func (*Store) Delete

func (s *Store) Delete(name string) error

func (*Store) DeleteCurrentNote

func (s *Store) DeleteCurrentNote() error

func (*Store) GetCurrentNote

func (s *Store) GetCurrentNote() (Note, bool)

func (Store) GetEditor

func (s Store) GetEditor() string

func (Store) GetNotePath

func (s Store) GetNotePath(name string) string

func (Store) GetNotes added in v0.2.0

func (s Store) GetNotes() []Note

func (*Store) IsFirstNote

func (s *Store) IsFirstNote() bool

used to determine if the note was updated externally which means that its position in the list might have changed

func (*Store) LoadNotes

func (s *Store) LoadNotes() ([]Note, error)

func (*Store) RenameCurrentNote

func (s *Store) RenameCurrentNote(newName string) (Note, error)

func (Store) RenameNote

func (s Store) RenameNote(currentName, newName string) (Note, error)

func (*Store) SetCurrentNoteName

func (s *Store) SetCurrentNoteName(name string)

func (*Store) SetEditor

func (s *Store) SetEditor(editor string) error

func (*Store) UpdateCurrentNoteContent added in v0.2.0

func (s *Store) UpdateCurrentNoteContent(newContent string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL