outputFormatter

package
v0.0.0-...-dd73e6d Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiWrapper

type ApiWrapper struct {
	Resp        interface{}     `json:"response"`
	Cols        []Column        `json:"columns"`
	ColWrappers []ColumnWrapper `json:"colWrappers"`
	Error       string          `json:"error"`
	IsTable     bool            `json:"isTable"`
	Version     float64         `json:"version"`
}

func MakeApiWrapper

func MakeApiWrapper(r interface{}, c []string, ca []string, cm map[string]map[string]interface{}, err string, isTable bool) ApiWrapper

wraps the given interface r into a returned Wrapper prepped for encoding to stream

type Column

type Column struct {
	Name             string                 `json:"colName"`
	ForeignKey       bool                   `json:"isForeignKey"`
	ForeignKeyValues map[string]interface{} `json:"foreignKeyValues"`
}

func MakeColumns

func MakeColumns(columns []string, fkMap map[string]map[string]interface{}) []Column

type ColumnWrapper

type ColumnWrapper struct {
	Field        string `json:"field"`
	DisplayName  string `json:"displayName"`
	ColumnFilter bool   `json:"columnFilter"`
}

func MakeColumnWrappers

func MakeColumnWrappers(columns []string) []ColumnWrapper

Jump to

Keyboard shortcuts

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