mast

package
v1.9.982 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attribute added in v1.9.98

func Attribute(node ast.Node, key string) []byte

Attribute returns the attribute value under key.

func AttributeClass added in v1.9.982

func AttributeClass(node ast.Node, key string) bool

AttributeClass returns true is class key is set.

func AttributeFilter added in v1.9.980

func AttributeFilter(node ast.Node, filter func(key string) bool)

AttributeFilter runs the attribute on node through filter and only allows elements for which filter returns true.

func AttributeInit added in v1.9.98

func AttributeInit(node ast.Node)

AttributeInit will initialize an *Attribute on node if there wasn't one.

func DeleteAttribute added in v1.9.98

func DeleteAttribute(node ast.Node, key string)

DeleteAttribute delete the attribute under key from a.

func MoveChildren added in v1.9.98

func MoveChildren(a, b ast.Node)

MoveChilderen moves the children from a to b *and* make the parent of each point to b. Any children of b are obliterated.

func SetAttribute added in v1.9.98

func SetAttribute(node ast.Node, key string, value []byte)

SetAttribute sets the attribute under key to value.

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

type DocumentIndex struct {
	ast.Container
}

DocumentIndex represents markdown document index node.

type FilterFunc added in v1.9.980

type FilterFunc func(s string) bool

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 IndexItem

type IndexItem struct {
	ast.Container

	*ast.Index
}

IndexItem contains an index for the indices section.

type IndexLetter

type IndexLetter struct {
	ast.Leaf
}

IndexLetter has the Letter of this index item.

type IndexLink struct {
	*ast.Link

	Primary bool
}

IndexLink links to the index in the document.

type IndexSubItem

type IndexSubItem struct {
	ast.Container

	*ast.Index
}

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 Title

type Title struct {
	ast.Leaf
	*TitleData
}

Title represents the TOML encoded title block.

func NewTitle

func NewTitle() *Title

NewTitle returns a pointer to TitleData with some defaults set.

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.

Directories

Path Synopsis
Package reference defines the elements of a <reference> block.
Package reference defines the elements of a <reference> block.

Jump to

Keyboard shortcuts

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