notes

package
v0.0.0-...-ae82b82 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotesFS embed.FS

Functions

func DeriveNotePath

func DeriveNotePath(noteType NoteType, elements ...string) (string, error)

func ReadNoteFile

func ReadNoteFile(file fs.File) (string, error)

func RenderNote

func RenderNote(content string) string

Types

type Note

type Note struct {
	NoteID       string    `json:"note_id"`
	Type         NoteType  `json:"type"`
	Data         string    `json:"data"`
	ModTime      time.Time `json:"mod_time"`
	Path         string    `json:"path"`
	PathElements []string  `json:"path_elements"`
}

func ReadNotes

func ReadNotes(pointers []NotePointer) []Note

type NotePointer

type NotePointer struct {
	NoteType     NoteType `json:"note_type"`
	PathElements []string `json:"path_elements"`
}

type NoteType

type NoteType string
const (
	Output      NoteType = "output"
	Script      NoteType = "script"
	NullData    NoteType = "nulldata"
	ScriptGroup NoteType = "scriptgroup"
	Transaction NoteType = "transaction"
	Coinbase    NoteType = "coinbase"
)

Jump to

Keyboard shortcuts

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