frontmatter

package
v0.0.0-...-80d4578 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFuncMap = map[string]ConverterFunc{
	"date":  convertDate,
	"draft": convertDraft,
}

Functions

This section is empty.

Types

type Converter

type Converter struct {
	FuncMap map[string]ConverterFunc
	// contains filtered or unexported fields
}

func NewConverter

func NewConverter(tableview *notionapi.TableView) *Converter

func (*Converter) AsTOML

func (c *Converter) AsTOML(columns [][]*notionapi.TextSpan) (string, error)

func (*Converter) AsYAML

func (c *Converter) AsYAML(columns [][]*notionapi.TextSpan) (string, error)

func (*Converter) Convert

func (c *Converter) Convert(columns [][]*notionapi.TextSpan, format Format) (string, error)

func (*Converter) Format

func (c *Converter) Format(format Format) *Converter

type ConverterFunc

type ConverterFunc func(string) interface{}

type Format

type Format string
const (
	FormatTOML Format = "toml"
	FormatYAML Format = "yaml"
)

Jump to

Keyboard shortcuts

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