Documentation
¶
Index ¶
- Variables
- func CloseDB() error
- func InitDB(path string) error
- func ListTags() ([]string, error)
- func PermanentDeleteNoteByID(ID int64) error
- func RestoreNoteByID(ID int64) error
- func SoftDeleteNoteByID(ID int64) error
- type Encryptor
- type Handler
- func (h *Handler) CreateNote(c *echo.Context) error
- func (h *Handler) CreatePrivateNote(c *echo.Context) error
- func (h *Handler) DecryptNote(c *echo.Context) error
- func (h *Handler) DeleteNote(c *echo.Context) error
- func (h *Handler) GetNote(c *echo.Context) error
- func (h *Handler) ListArchive(c *echo.Context) error
- func (h *Handler) ListNotes(c *echo.Context) error
- func (h *Handler) PermanentDeleteNote(c *echo.Context) error
- func (h *Handler) RestoreNote(c *echo.Context) error
- func (h *Handler) ShowCreateForm(c *echo.Context) error
- func (h *Handler) ShowEditForm(c *echo.Context) error
- func (h *Handler) ShowPrivateCreateForm(c *echo.Context) error
- func (h *Handler) TogglePinNote(c *echo.Context) error
- func (h *Handler) UnlockPrivateEditForm(c *echo.Context) error
- func (h *Handler) UpdateNote(c *echo.Context) error
- type ListParams
- type ListResult
- type Note
- func AddNote(title, content, imageData, tags string) (Note, error)
- func AddPrivateNote(title, content, imageData, password string) (Note, error)
- func DecryptNoteByID(ID int64, password string) (Note, error)
- func GetNoteByID(ID int64) (Note, error)
- func ListArchivedNotes() ([]Note, error)
- func TogglePinNoteByID(ID int64) (Note, error)
- func UpdateNoteByID(ID int64, title, content, imageData string) (Note, error)
- func UpdatePrivateNoteByID(ID int64, title, content, imageData, currentPassword, newPassword string) (Note, error)
- type PasswordEncryptor
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func PermanentDeleteNoteByID ¶
func RestoreNoteByID ¶
func SoftDeleteNoteByID ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) ShowPrivateCreateForm ¶
func (*Handler) UnlockPrivateEditForm ¶
type ListParams ¶
type ListResult ¶
type ListResult struct {
Notes []Note
Total int
Page int
PageSize int
TotalPages int
HasPrev bool
HasNext bool
PrevPage int
NextPage int
}
func ListNotes ¶
func ListNotes(p ListParams) (ListResult, error)
type Note ¶
type Note struct {
ID int64
Title string
Content string
ImageData string
Tags []string
IsPinned bool
IsEncrypted bool
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
}
func AddPrivateNote ¶
func GetNoteByID ¶
func ListArchivedNotes ¶
func TogglePinNoteByID ¶
type PasswordEncryptor ¶
type PasswordEncryptor struct {
// contains filtered or unexported fields
}
func NewPasswordEncryptor ¶
func NewPasswordEncryptor(password string) *PasswordEncryptor
Click to show internal directories.
Click to hide internal directories.