Documentation ¶
Index ¶
- Constants
- func DirExists(fn string) bool
- func FileExists(fn string) bool
- func FileRead(fn string, ref interface{}) error
- func FileRemove(fn string) error
- func FileWrite(fn string, ref interface{}, perm os.FileMode) error
- func GetAsString(r interface{}) string
- func GetEndPointString(r interface{}) string
- func GetRequestString(r interface{}) string
- func Mkdir(fn string) bool
- func PlainFileRead(fn string) ([]byte, error)
- func PlainFileWrite(fn string, data []byte, perm os.FileMode) error
- type Chart
- func (c *Chart) Generate() error
- func (c *Chart) ProcessGraphData(table *Table) error
- func (c *Chart) SetColumns(req GraphRequest) bool
- func (c *Chart) SetFilename(fn string) error
- func (c *Chart) SetHeight(v *int)
- func (c *Chart) SetRangeY(min *float64, max *float64) bool
- func (c *Chart) SetTitle(title string) error
- func (c *Chart) SetWidth(v *int)
- func (c *Chart) SetX(name string, values ...time.Time) error
- func (c *Chart) SetY(name string, values ...float64) error
- func (c *Chart) SetY2(name string, values ...float64) error
- type GraphRequest
- type Json
- type OutputType
- func (out *OutputType) IsCsv() bool
- func (out *OutputType) IsGraph() bool
- func (out *OutputType) IsJson() bool
- func (out *OutputType) IsList() bool
- func (out *OutputType) IsMarkDown() bool
- func (out *OutputType) IsNone() bool
- func (out *OutputType) IsRaw() bool
- func (out *OutputType) IsStrCsv(t string) bool
- func (out *OutputType) IsStrGraph(t string) bool
- func (out *OutputType) IsStrJson(t string) bool
- func (out *OutputType) IsStrList(t string) bool
- func (out *OutputType) IsStrMarkDown(t string) bool
- func (out *OutputType) IsStrNone(t string) bool
- func (out *OutputType) IsStrRaw(t string) bool
- func (out *OutputType) IsStrTable(t string) bool
- func (out *OutputType) IsStrXLSX(t string) bool
- func (out *OutputType) IsStrXML(t string) bool
- func (out *OutputType) IsStruct() bool
- func (out *OutputType) IsTable() bool
- func (out *OutputType) IsXLSX() bool
- func (out *OutputType) IsXML() bool
- func (out *OutputType) Set(outputType string)
- func (out *OutputType) SetCsv()
- func (out *OutputType) SetGraph()
- func (out *OutputType) SetJson()
- func (out *OutputType) SetList()
- func (out *OutputType) SetMarkDown()
- func (out *OutputType) SetNone()
- func (out *OutputType) SetRaw()
- func (out *OutputType) SetStruct()
- func (out *OutputType) SetTable()
- func (out *OutputType) SetXLSX()
- func (out *OutputType) SetXML()
- type Table
- func (t *Table) AddRow(row ...interface{}) error
- func (t *Table) AppendFilePrefix(prefix string, args ...interface{})
- func (t *Table) AppendRaw(data []byte)
- func (t *Table) AppendTitle(title string, args ...interface{})
- func (t *Table) AsCsv() string
- func (t *Table) AsJson() string
- func (t *Table) AsMarkDown() string
- func (t *Table) AsRaw() string
- func (t *Table) AsRawBytes() []byte
- func (t *Table) AsStruct() string
- func (t *Table) AsTable() string
- func (t *Table) AsXLSX() string
- func (t *Table) AsXml() string
- func (t *Table) CreateGraph() error
- func (t *Table) GetCell(row int, colName string) (string, interface{}, error)
- func (t *Table) GetFilePrefix() string
- func (t *Table) GetHeaders() []string
- func (t *Table) GetName() string
- func (t *Table) GetSortedHeaders() []string
- func (t *Table) GetTitle() string
- func (t *Table) InitGraph(req GraphRequest)
- func (t *Table) IsNotValid() bool
- func (t *Table) IsValid() bool
- func (t *Table) Output() error
- func (t *Table) PrependFilePrefix(prefix string, args ...interface{})
- func (t *Table) ProcessGraphData() error
- func (t *Table) RowLength() int
- func (t *Table) SetDirectory(prefix string, args ...interface{})
- func (t *Table) SetFilePrefix(prefix string, args ...interface{})
- func (t *Table) SetGraph(req GraphRequest) error
- func (t *Table) SetGraphFilter(filter string)
- func (t *Table) SetGraphFromJson(j Json) error
- func (t *Table) SetJson(data []byte)
- func (t *Table) SetName(name string)
- func (t *Table) SetOutputType(outputType string)
- func (t *Table) SetRaw(data []byte)
- func (t *Table) SetSaveFile(ok bool)
- func (t *Table) SetTitle(title string, args ...interface{})
- func (t *Table) Sort(sort string)
- func (t Table) String() string
- func (t *Table) WriteCsv() error
- func (t *Table) WriteJson() error
- func (t *Table) WriteList() error
- func (t *Table) WriteMarkDown() error
- func (t *Table) WriteRaw() error
- func (t *Table) WriteStruct() error
- func (t *Table) WriteTable() error
- func (t *Table) WriteXLSX() error
- func (t *Table) WriteXml() error
- type Tables
Constants ¶
View Source
const ( DefaultFileMode = 0644 DateTimeLayout = "2006/01/02 15:04:05" DateTimeSearchLayout = "2006-01-02 15:04:05" )
View Source
const ( TypeNone = iota TypeJson = iota TypeCsv = iota TypeList = iota TypeTable = iota TypeRaw = iota TypeGraph = iota TypeStruct = iota TypeXML = iota TypeXLSX = iota TypeMarkDown = iota StringTypeNone = "" StringTypeJson = "json" StringTypeCsv = "csv" StringTypeList = "list" StringTypeTable = "table" StringTypeRaw = "raw" StringTypeGraph = "graph" StringTypeStruct = "struct" StringTypeXML = "xml" StringTypeXLSX = "xlsx" StringTypeMarkDown = "md" )
Variables ¶
This section is empty.
Functions ¶
func GetAsString ¶
func GetAsString(r interface{}) string
func GetEndPointString ¶
func GetEndPointString(r interface{}) string
func GetRequestString ¶
func GetRequestString(r interface{}) string
func PlainFileRead ¶
PlainFileRead Retrieves data from a local file.
Types ¶
type Chart ¶
type Chart struct { Error error `json:"-"` // contains filtered or unexported fields }
func (*Chart) ProcessGraphData ¶
func (*Chart) SetColumns ¶
func (c *Chart) SetColumns(req GraphRequest) bool
func (*Chart) SetFilename ¶
type GraphRequest ¶
type GraphRequest struct { Title string `json:"title"` SubTitle string `json:"sub_title"` TimeColumn *string `json:"time_column"` DataColumn *string `json:"value_column"` UnitsColumn *string `json:"units_column"` NameColumn *string `json:"name_column"` DataUnit *string `json:"unit"` DataMin *float64 `json:"min"` DataMax *float64 `json:"max"` Width *int `json:"width"` Height *int `json:"height"` Error error `json:"-"` }
func JsonToGraphRequest ¶
func JsonToGraphRequest(j Json) GraphRequest
type OutputType ¶
type OutputType int
func (*OutputType) IsCsv ¶
func (out *OutputType) IsCsv() bool
func (*OutputType) IsGraph ¶
func (out *OutputType) IsGraph() bool
func (*OutputType) IsJson ¶
func (out *OutputType) IsJson() bool
func (*OutputType) IsList ¶
func (out *OutputType) IsList() bool
func (*OutputType) IsMarkDown ¶
func (out *OutputType) IsMarkDown() bool
func (*OutputType) IsNone ¶
func (out *OutputType) IsNone() bool
func (*OutputType) IsRaw ¶
func (out *OutputType) IsRaw() bool
func (*OutputType) IsStrCsv ¶
func (out *OutputType) IsStrCsv(t string) bool
func (*OutputType) IsStrGraph ¶
func (out *OutputType) IsStrGraph(t string) bool
func (*OutputType) IsStrJson ¶
func (out *OutputType) IsStrJson(t string) bool
func (*OutputType) IsStrList ¶
func (out *OutputType) IsStrList(t string) bool
func (*OutputType) IsStrMarkDown ¶
func (out *OutputType) IsStrMarkDown(t string) bool
func (*OutputType) IsStrNone ¶
func (out *OutputType) IsStrNone(t string) bool
func (*OutputType) IsStrRaw ¶
func (out *OutputType) IsStrRaw(t string) bool
func (*OutputType) IsStrTable ¶
func (out *OutputType) IsStrTable(t string) bool
func (*OutputType) IsStrXLSX ¶
func (out *OutputType) IsStrXLSX(t string) bool
func (*OutputType) IsStrXML ¶
func (out *OutputType) IsStrXML(t string) bool
func (*OutputType) IsStruct ¶
func (out *OutputType) IsStruct() bool
func (*OutputType) IsTable ¶
func (out *OutputType) IsTable() bool
func (*OutputType) IsXLSX ¶
func (out *OutputType) IsXLSX() bool
func (*OutputType) IsXML ¶
func (out *OutputType) IsXML() bool
func (*OutputType) Set ¶
func (out *OutputType) Set(outputType string)
func (*OutputType) SetCsv ¶
func (out *OutputType) SetCsv()
func (*OutputType) SetGraph ¶
func (out *OutputType) SetGraph()
func (*OutputType) SetJson ¶
func (out *OutputType) SetJson()
func (*OutputType) SetList ¶
func (out *OutputType) SetList()
func (*OutputType) SetMarkDown ¶
func (out *OutputType) SetMarkDown()
func (*OutputType) SetNone ¶
func (out *OutputType) SetNone()
func (*OutputType) SetRaw ¶
func (out *OutputType) SetRaw()
func (*OutputType) SetStruct ¶
func (out *OutputType) SetStruct()
func (*OutputType) SetTable ¶
func (out *OutputType) SetTable()
func (*OutputType) SetXLSX ¶
func (out *OutputType) SetXLSX()
func (*OutputType) SetXML ¶
func (out *OutputType) SetXML()
type Table ¶
type Table struct { OutputType OutputType Error error // contains filtered or unexported fields }
func (*Table) AppendFilePrefix ¶
func (*Table) AppendTitle ¶
func (*Table) AsMarkDown ¶
func (*Table) AsRawBytes ¶
func (*Table) CreateGraph ¶
func (*Table) GetFilePrefix ¶
func (*Table) GetHeaders ¶
func (*Table) GetSortedHeaders ¶
func (*Table) InitGraph ¶
func (t *Table) InitGraph(req GraphRequest)
func (*Table) IsNotValid ¶
func (*Table) PrependFilePrefix ¶
func (*Table) ProcessGraphData ¶
func (*Table) SetDirectory ¶
func (*Table) SetFilePrefix ¶
func (*Table) SetGraph ¶
func (t *Table) SetGraph(req GraphRequest) error
func (*Table) SetGraphFilter ¶
func (*Table) SetGraphFromJson ¶
func (*Table) SetOutputType ¶
func (*Table) SetSaveFile ¶
func (*Table) WriteMarkDown ¶
func (*Table) WriteStruct ¶
func (*Table) WriteTable ¶
Click to show internal directories.
Click to hide internal directories.