Documentation
¶
Overview ¶
* @Author: magsv * @Date: 2016-02-15 10:20:00 * @Last Modified by: magsv * @Last Modified time: 2018-11-08 12:04:15
Index ¶
- Constants
- func AppendTimeAndDateToFile(filepath string) string
- func CreateAllFolders(path string) error
- func CreateUUID() string
- func CreateWorkbookFromDataSet(filepath string, datasets []DataSet, oneFilePerSheet bool, ...) error
- func DatasetToCsv(dataset DataSet, outputFile string, discriminator string) error
- func DatasetsToCsv(datasets []DataSet, outputFile string, discriminator string) error
- func DatasetsToJson(datasets []DataSet) ([]byte, error)
- func FormatTime2QueryDayString(tObj time.Time) string
- func FormatTime2QueryMonthString(tObj time.Time) string
- func FormatTime2QueryYearString(tObj time.Time) string
- func GetFileName(filePath string) string
- func GetFileNameAndExtension(filePath string) (string, string)
- func GetFilesWithExtension(folder string, extension string) ([]string, error)
- func GetFolderPathForFile(filePath string) string
- func GetTimeZone(tObj *time.Time) string
- func InitializeFolders(outputFolder string, logFile string) error
- func MoveFiles(files []string, move2Folder string) error
- func ReadFile(filePath string) ([]byte, error)
- func RollDays(days int) (time.Time, time.Time)
- func RollMonths(months int) (time.Time, time.Time)
- func TimeToString(tObj time.Time, outputFormat string) string
- func Write2File(filePath string, data []byte) error
- func XSDDateString2Time(dateString string) (time.Time, error)
- func XSDDateTimeString2Time(dateTimeString string) (time.Time, error)
- type ColumnData
- type ColumnDataJson
- type Config
- type DataSet
- type DataSetJson
- type ParamType
- type RowData
- type RowDataJson
Constants ¶
const NullFloatValue = -999.99
const Rolldays_default = -999
const Rollmonths_default = -999
Variables ¶
This section is empty.
Functions ¶
func AppendTimeAndDateToFile ¶
appends a timestamp to a filename with the given filepath
func CreateAllFolders ¶
func CreateUUID ¶
func CreateUUID() string
func DatasetToCsv ¶
func DatasetsToCsv ¶
func DatasetsToJson ¶
Converts a list of datasets to json
func FormatTime2QueryDayString ¶
function used to take a time object and format it to a string format in the form of yyyy-mm-dd
func FormatTime2QueryMonthString ¶
function used to take a time object and format it to a string format in the form of mm
func FormatTime2QueryYearString ¶
function used to take a time object and format it to a string format in the form of yyyy
func GetFileName ¶
func GetFileNameAndExtension ¶
returns filename without extension and extension
func GetFilesWithExtension ¶
func GetFolderPathForFile ¶
func GetTimeZone ¶
func InitializeFolders ¶
func RollDays ¶
function will take the current time and substract the given number of days and return a start and end time
func RollMonths ¶
function will take the current time and substract the given number of month and return a start and end time
func Write2File ¶
Types ¶
type ColumnData ¶
type ColumnData struct { IntVal int `json:",omitempty"` FloatVal float64 `json:",omitempty"` StrVal string `json:",omitempty"` TimeValue time.Time `json:",omitempty"` IsEmptyColumn bool `json:",omitempty"` IsInt bool `json:",omitempty"` IsFloat bool `json:",omitempty"` IsStr bool `json:",omitempty"` IsTime bool `json:",omitempty"` }
type ColumnDataJson ¶
type ColumnDataJson struct { Name string Value interface{} }
type DataSetJson ¶
type DataSetJson struct { Name string HeadersName []string Rows []RowDataJson }
type RowData ¶
type RowData struct {
Columns []ColumnData
}
func (*RowData) AddEmptyColumn ¶
func (row *RowData) AddEmptyColumn()
func (*RowData) AddFloatValue ¶
func (*RowData) AddIntValue ¶
func (*RowData) AddStrValue ¶
func (*RowData) AddTimeValue ¶
type RowDataJson ¶
type RowDataJson struct {
Columns []ColumnDataJson
}