mapping

package
v0.0.0-...-77bdb4f Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Skipped

func Skipped(rendermap *RenderMap, include, exclude Fields, columns []string, values []interface{}) bool

Skipped checks data for skipped records

Types

type Cursor

type Cursor struct {
	ID string
	AT string
}

Cursor contains current pointer to document

func (*Cursor) Decode

func (c *Cursor) Decode(
	specification Fields, idName, atName string, renderMap *RenderMap,
	columns []string, values []interface{},
)

Decode updates pointers or markers from data

type Field

type Field struct {
	Topic  string
	Name   string
	Type   string
	Format string
}

Field contains name and format of every data item

type Fields

type Fields []Field

Fields declared as type which used in decoder

func (*Fields) Decode

func (f *Fields) Decode(value string) error

Decode used as decoder for type Fields

func (*Fields) RenderMapping

func (f *Fields) RenderMapping() (mapping string)

RenderMapping creates mapping

type RenderMap

type RenderMap struct {
	DateTemplate string
	DateFormat   string
	TimeTemplate string
	TimeFormat   string
	Delimiter    string
	Finalizer    string
	UseNames     bool
	Quotas       bool
	Extras       bool
}

RenderMap setup renderer

func (*RenderMap) Render

func (r *RenderMap) Render(field Field, columns []string, values []interface{}) (data string)

Render generates data

type Renderer

type Renderer interface {
	Render(field Field, columns []string, values []interface{}) (data string)
}

Renderer describes Render method

Jump to

Keyboard shortcuts

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