codecs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package codecs maps domain entities to AsciiDoc documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Identify

func Identify(source []byte) (uuid.UUID, ports.NoteKind, error)

Identify reads the identity and kind used to select a document's codec. Specific domain properties are validated by that codec's Decode method.

Types

type BookmarkCodec

type BookmarkCodec struct{}

func (BookmarkCodec) Decode

func (BookmarkCodec) Decode(source []byte) (*bookmarks.Bookmark, error)

func (BookmarkCodec) Encode

func (BookmarkCodec) Encode(entity *bookmarks.Bookmark) ([]byte, error)

type HabitCodec

type HabitCodec struct{}

func (HabitCodec) Decode

func (HabitCodec) Decode(source []byte) (*habits.Habit, error)

func (HabitCodec) Encode

func (HabitCodec) Encode(habit *habits.Habit) ([]byte, error)

type InboxCodec

type InboxCodec struct{}

func (InboxCodec) Decode

func (InboxCodec) Decode(source []byte) (*inbox.Inbox, error)

func (InboxCodec) Encode

func (InboxCodec) Encode(entity *inbox.Inbox) ([]byte, error)

type JournalCodec

type JournalCodec struct{}

func (JournalCodec) Decode

func (JournalCodec) Decode(source []byte) (*journals.Journal, error)

func (JournalCodec) Encode

func (JournalCodec) Encode(entity *journals.Journal) ([]byte, error)

type PageCodec

type PageCodec struct{}

func (PageCodec) Decode

func (PageCodec) Decode(source []byte) (*pages.Page, error)

func (PageCodec) Encode

func (PageCodec) Encode(entity *pages.Page) ([]byte, error)

type PersonCodec

type PersonCodec struct{}

func (PersonCodec) Decode

func (PersonCodec) Decode(source []byte) (*persons.Person, error)

func (PersonCodec) Encode

func (PersonCodec) Encode(person *persons.Person) ([]byte, error)

Jump to

Keyboard shortcuts

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