Documentation
¶
Index ¶
- func Attribute(node ast.Node, key string) []byte
- func AttributeBytes(attr *ast.Attribute) []byte
- func AttributeClass(node ast.Node, key string) bool
- func AttributeFilter(node ast.Node, filter func(key string) bool)
- func AttributeFromNode(node ast.Node) *ast.Attribute
- func AttributeInit(node ast.Node)
- func DeleteAttribute(node ast.Node, key string)
- func MoveChildren(a, b ast.Node)
- func SetAttribute(node ast.Node, key string, value []byte)
- type Address
- type AddressPostal
- type Author
- type Bibliography
- type BibliographyItem
- type DocumentIndex
- type FilterFunc
- type IndexItem
- type IndexLetter
- type IndexLink
- type IndexSubItem
- type SeriesInfo
- type Title
- type TitleData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeBytes ¶
func AttributeClass ¶ added in v1.9.982
AttributeClass returns true is class key is set.
func AttributeFilter ¶ added in v1.9.980
AttributeFilter runs the attribute on node through filter and only allows elements for which filter returns true.
func AttributeFromNode ¶
AttributeFromNode returns the attribute from the node, if it was there was one.
func AttributeInit ¶ added in v1.9.98
AttributeInit will initialize an *Attribute on node if there wasn't one.
func DeleteAttribute ¶ added in v1.9.98
DeleteAttribute delete the attribute under key from a.
func MoveChildren ¶ added in v1.9.98
MoveChilderen moves the children from a to b *and* make the parent of each point to b. Any children of b are obliterated.
Types ¶
type Address ¶
type Address struct {
Phone string
Email string
URI string
Postal AddressPostal
}
Address denotes the address of an RFC author.
type AddressPostal ¶
type AddressPostal struct {
Street string
City string
Code string
Country string
Region string
PostalLine []string
// Plurals when these need to be specified multiple times.
Streets []string
Cities []string
Codes []string
Countries []string
Regions []string
}
AddressPostal denotes the postal address of an RFC author.
type Author ¶
type Author struct {
Initials string
Surname string
Fullname string
Organization string
OrganizationAbbrev string `toml:"abbrev"`
Role string
ASCII string
Address Address
}
Author denotes an RFC author.
type Bibliography ¶
type Bibliography struct {
ast.Container
Type ast.CitationTypes
}
Bibliography represents markdown bibliography node.
type BibliographyItem ¶
type BibliographyItem struct {
ast.Leaf
Anchor []byte
Type ast.CitationTypes
Raw []byte // raw reference XML
Reference reference.Reference // parsed reference XML
}
BibliographyItem contains a single bibliography item.
type DocumentIndex ¶
DocumentIndex represents markdown document index node.
type FilterFunc ¶ added in v1.9.980
FilterFunc checks if s is an allowed key in an attribute. If s is: "id" the ID should be checked "class" the classes should be allowed or disallowed any other string means checking the individual attributes. it returns true for elements that are allows, false otherwise.
type IndexLetter ¶
IndexLetter has the Letter of this index item.
type IndexSubItem ¶
IndexSubItem contains an sub item index for the indices section.
type SeriesInfo ¶
type SeriesInfo struct {
Name string // name of the document, values are "RFC", "Internet-Draft", and "DOI"
Value string // either draft name, or number
Status string // The status of this document, values: "standard", "informational", "experimental", "bcp", "fyi", and "full-standard"
Stream string // "IETF" (default),"IAB", "IRTF" or "independent"
}
SeriesInfo holds details on the Internet-Draft or RFC, see https://tools.ietf.org/html/rfc7991#section-2.47
type TitleData ¶
type TitleData struct {
Title string
Abbrev string
SeriesInfo SeriesInfo
Consensus bool
Ipr string // See https://tools.ietf.org/html/rfc7991#appendix-A.1
Obsoletes []int
Updates []int
SubmissionType string // IETF, IAB, IRTF or independent
Date time.Time
Area string
Workgroup string
Keyword []string
Author []Author
}
TitleData holds all the elements of the title.