mirror of https://github.com/mickael-menu/zk
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
525 B
Go
27 lines
525 B
Go
package note
|
|
|
|
import (
|
|
"github.com/mickael-menu/zk/util/opt"
|
|
)
|
|
|
|
type Content struct {
|
|
// Title is the heading of the note.
|
|
Title opt.String
|
|
// Lead is the opening paragraph or section of the note.
|
|
Lead opt.String
|
|
// Body is the content of the note, including the Lead but without the Title.
|
|
Body opt.String
|
|
// Links is the list of outbound links found in the note.
|
|
Links []Link
|
|
}
|
|
|
|
type Link struct {
|
|
Title string
|
|
Target string
|
|
Rels []string
|
|
}
|
|
|
|
type Parser interface {
|
|
Parse(source string) (*Content, error)
|
|
}
|