render

package
v0.0.0-...-23e535f Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Renderers holds a populated list of renderers.

Functions

This section is empty.

Types

type CSVRenderer

type CSVRenderer struct{}

MySQLRenderer implements table rendering as CSV.

func (*CSVRenderer) Render

func (r *CSVRenderer) Render(tbl *table.Table) string

Render implements the Renderer interface.

func (*CSVRenderer) SectionsSupported

func (r *CSVRenderer) SectionsSupported() bool

SectionsSupported implements the Renderer interface.

func (*CSVRenderer) Type

func (r *CSVRenderer) Type() string

Type implements the Renderer interface.

type MarkdownRenderer

type MarkdownRenderer struct{}

MarkdownRenderer implements table rendering in Markdown format.

func (*MarkdownRenderer) Render

func (r *MarkdownRenderer) Render(tbl *table.Table) string

Render implements the Renderer interface.

func (*MarkdownRenderer) SectionsSupported

func (r *MarkdownRenderer) SectionsSupported() bool

SectionsSupported implements the Renderer interface.

func (*MarkdownRenderer) Type

func (r *MarkdownRenderer) Type() string

Type implements the Renderer interface.

type MySQLRenderer

type MySQLRenderer struct{}

MySQLRenderer implements table rendering similar to MySQL.

func (*MySQLRenderer) Render

func (r *MySQLRenderer) Render(tbl *table.Table) string

Render implements the Renderer interface.

func (*MySQLRenderer) SectionsSupported

func (r *MySQLRenderer) SectionsSupported() bool

SectionsSupported implements the Renderer interface.

func (*MySQLRenderer) Type

func (r *MySQLRenderer) Type() string

Type implements the Renderer interface.

type PlainRenderer

type PlainRenderer struct {
	// contains filtered or unexported fields
}

PlainRenderer implements table rendering as rows and columns of text.

func (*PlainRenderer) Render

func (r *PlainRenderer) Render(tbl *table.Table) string

Render implements the Renderer interface.

func (*PlainRenderer) SectionsSupported

func (r *PlainRenderer) SectionsSupported() bool

SectionsSupported implements the Renderer interface.

func (*PlainRenderer) SetOFS

func (r *PlainRenderer) SetOFS(ofs string)

SetOFS sets the OFS separator.

func (*PlainRenderer) Type

func (r *PlainRenderer) Type() string

Type implements the Renderer interface.

type Renderer

type Renderer interface {
	// Render the table.
	Render(*table.Table) string
	// Type returns the type of renderer.
	Type() string

	// SectionsSupported returns true if sections are supported.
	SectionsSupported() bool
}

Renderer is an interface that allows the contents of a Table to be rendered.

type SQLite3Renderer

type SQLite3Renderer struct{}

MySQLRenderer implements table rendering similar to SQLite3.

func (*SQLite3Renderer) Render

func (r *SQLite3Renderer) Render(tbl *table.Table) string

Render implements the Renderer interface.

func (*SQLite3Renderer) SectionsSupported

func (r *SQLite3Renderer) SectionsSupported() bool

SectionsSupported implements the Renderer interface.

func (*SQLite3Renderer) Type

func (r *SQLite3Renderer) Type() string

Type implements the Renderer interface.

Jump to

Keyboard shortcuts

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