types

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 4 Imported by: 38

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RowToMap added in v0.3.0

func RowToMap(om Row) map[string]interface{}

Types

type FieldName

type FieldName = string

func GetFields added in v0.3.0

func GetFields(om Row) []FieldName

type GenericCellValue

type GenericCellValue = interface{}

type MapRowPair added in v0.3.0

func MRP added in v0.3.0

func MRP(key FieldName, value GenericCellValue) MapRowPair

type Row

func NewRow added in v0.3.0

func NewRow(initialData ...MapRowPair) Row

func NewRowFromMap added in v0.3.0

func NewRowFromMap(hash map[FieldName]GenericCellValue) Row

func NewRowFromMapWithColumns added in v0.3.0

func NewRowFromMapWithColumns(hash map[FieldName]GenericCellValue, columns []FieldName) Row

func NewRowFromRow added in v0.4.13

func NewRowFromRow(row Row) Row

func NewRowFromStruct added in v0.3.0

func NewRowFromStruct(i interface{}, lowerCaseKeys bool) Row

func SetFromStruct added in v0.4.0

func SetFromStruct(row Row, i interface{}, lowerCaseKeys bool) Row

type Table

type Table struct {
	Columns []FieldName
	Rows    []Row
	// contains filtered or unexported fields
}

func NewTable

func NewTable() *Table

func (*Table) AddRows added in v0.3.0

func (t *Table) AddRows(rows ...Row)

func (*Table) SetColumnOrder added in v0.3.0

func (t *Table) SetColumnOrder(columns []FieldName)

SetColumnOrder will set the given columns to be the first one to be output. Other columns already present in the order will be appended at the end, preserving the original order.

type TableName

type TableName = string

Jump to

Keyboard shortcuts

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