Documentation ¶
Index ¶
- func CopyJSON(input interface{}, out interface{})
- func EndTime() int
- func EndTimeByTime(ti int) int
- func FirstToLower(str string) string
- func FirstToUpper(str string) string
- func Float64ToInt(f float64) int
- func Float64ToInt64(data float64) int64
- func Gb2312ToUtf8(src string) string
- func GetBeforeDay(year int, month int, day int) int
- func GetBeforeMonth(year int, month int, day int) int
- func GetBeforeTime(year int, month int, day int) time.Time
- func GetBeforeWeek(year int, month int, day int) int
- func GetBeforeYear(year int, month int, day int) int
- func GetDay() int
- func GetDayByTimeInt(t int) int
- func GetDayByTimeLong(t int64) int
- func GetHour() int
- func GetHourByTimeInt(t int) int
- func GetHourByTimeLong(t int64) int
- func GetMinute() int
- func GetMinuteByTimeInt(t int) int
- func GetMinuteByTimeLong(t int64) int
- func GetMondayTime(ti int) int
- func GetMonth() int
- func GetMonthByTimeInt(t int) int
- func GetMonthByTimeLong(t int64) int
- func GetMonthFirstDay() int
- func GetMonthFirstDayByMonth(year, month int) int
- func GetMonthLastDay() int
- func GetMonthLastDayByMonth(year, month int) int
- func GetPreviousYearMonth() (int, int)
- func GetPreviousYearMonthBy(year int, month int) (int, int)
- func GetRootDomain(ul string) (root string)
- func GetSecond() int
- func GetSecondByTimeInt(t int) int
- func GetSecondByTimeLong(t int64) int
- func GetStartQuarter() int
- func GetTimeByDay(day int) int
- func GetWeek() int
- func GetWeekByTimeInt(t int) int
- func GetWeekByTimeLong(t int64) int
- func GetWeekStr() string
- func GetWeekStrByWeekInt(w int) string
- func GetYear() int
- func GetYearByTimeInt(t int) int
- func GetYearByTimeLong(t int64) int
- func GetYesterday() int
- func GetYesterdayInt() int
- func GzipData(data []byte) []byte
- func HumpName(name string) string
- func InInt64Array(need int64, needArr []int64) bool
- func InIntArray(need int, needArr []int) bool
- func InStringArray(need string, needArr []string) bool
- func Int64ArrayToArrayString(list []int64) []string
- func Int64ArrayToInterfaceArray(data []int64) []interface{}
- func InterfaceArrayToArrayInt64(list []interface{}) []int64
- func InterfaceArrayToArrayString(list []interface{}) []string
- func InterfaceToInt(data interface{}) int
- func InterfaceToInt64(data interface{}) int64
- func InterfaceToString(data interface{}) string
- func IsFloat(s string) bool
- func IsInt(s string) bool
- func JsonArrayStringToStringArray(in string) []string
- func JsonObjectToString(data interface{}) string
- func MapToJSON(list Rows) string
- func Now() string
- func ObjectToString(data interface{}) string
- func Rand(min int, max int, i int) int
- func RandChar(length int) string
- func RandCharNoNumber(length int) string
- func RandCharNoNumberEx(length int, r int) string
- func RandFloat(min float64, max float64) float64
- func RandIntArray(list []int)
- func RandLChar(length int) string
- func RandNumber(length int) string
- func RandUChar(length int) string
- func Reg(reg string, content string, index int) string
- func RegReplace(reg, newStr, content string) string
- func ReplaceIndex(s, old, new string, n int) string
- func ResolveAddress(addr []string) string
- func Round(x float32) int
- func Serialize(data interface{}) []byte
- func SerializeNoFix(data interface{}) []byte
- func StartAndEndDayTime(ti int) []int
- func StartAndEndMonthTime(ti int) []int
- func StartAndEndWeekTime(ti int) []int
- func StartAndEndYearTime(ti int) []int
- func StrToFloat32(str string) float32
- func StrToFloat64(str string) float64
- func StrToInt(str string) int
- func StrToInt64(str string) int64
- func StrToTime(date string) int
- func StrToTimeFormat(date string, format string) int
- func StrToTimeFormatByLocal(date string, format, localName string) int
- func StrToUInt(str string) uint
- func StringArrayToInt64Array(data []string) []int64
- func StringArrayToInterfaceArray(data []string) []interface{}
- func StringToJsonObject(str string, data interface{}) bool
- func StringToObject(str string, data interface{}) bool
- func StringToXmlObject(str string, data interface{}) bool
- func SubString(str string, start int, end int) string
- func Time() int
- func TimeByTime(t time.Time) int
- func TimeFormat(format string) string
- func TimeLong() int64
- func TimeLongToFormat(t int64, format string) string
- func TimeLongToStr(t int64) string
- func TimeToFormat(t int, format string) string
- func TimeToStr(t int) string
- func U00(str string) string
- func U00Byte(str []byte) []byte
- func UTCTime() string
- func UnSerialize(data []byte, rdata interface{}) bool
- func UnSerializeNoFix(data []byte, rdata interface{}) bool
- func UnderLineName(name string) string
- func UniqueCode(id int64, minLen int) string
- func Utf8ToGb2312(src string) string
- func XmlObjectToString(data interface{}) string
- func ZeroTime() int
- func ZeroTimeByLocal(localName string) int
- func ZeroTimeByTime(ti int) int
- func ZeroTimeByTimeByLocal(ti int, localName string) int
- type Column
- type Columns
- type Data
- func (d *Data) ArrayByte() []byte
- func (d *Data) ArrayInt64() []int64
- func (d *Data) ArrayRow() []Row
- func (d *Data) ArrayString() []string
- func (d *Data) Float32() float32
- func (d *Data) Float64() float64
- func (d *Data) Get() interface{}
- func (d *Data) Int() int
- func (d *Data) Int64() int64
- func (d *Data) Row() Row
- func (d *Data) Rows() Rows
- func (d *Data) Set(value interface{}) *Data
- func (d *Data) SqlRow() SqlRow
- func (d *Data) SqlRows() SqlRows
- func (d *Data) String() string
- func (d *Data) WhetherArrayByte() ([]byte, bool)
- func (d *Data) WhetherArrayInt64() ([]int64, bool)
- func (d *Data) WhetherArrayRow() ([]Row, bool)
- func (d *Data) WhetherArrayRows() (Rows, bool)
- func (d *Data) WhetherArrayString() ([]string, bool)
- func (d *Data) WhetherFloat32() (float32, bool)
- func (d *Data) WhetherFloat64() (float64, bool)
- func (d *Data) WhetherInt() (int, bool)
- func (d *Data) WhetherInt64() (int64, bool)
- func (d *Data) WhetherRow() (Row, bool)
- type InRow
- type IntRow
- type IntStringMap
- type Row
- type Rows
- type SqlIn
- type SqlRaw
- type SqlRow
- type SqlRows
- type StringMap
- type WordRankResult
- type WordRankResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstToLower ¶
FirstToLower 首字母小写 参数str:输入字符串 返回值:首字母小写字符串
func FirstToUpper ¶
FirstToUpper 将首字母转化为大写 参数str:输入字符串 返回值:首字母大写字符串
func GetPreviousYearMonthBy ¶
获得指定日期的前一天的年月
func Int64ArrayToArrayString ¶
interface转ArrayString
func Int64ArrayToInterfaceArray ¶
func Int64ArrayToInterfaceArray(data []int64) []interface{}
Int64ArrayToInterfaceArray int64转[]interface{}
func InterfaceArrayToArrayInt64 ¶
func InterfaceArrayToArrayInt64(list []interface{}) []int64
interface转ArrayString
func InterfaceArrayToArrayString ¶
func InterfaceArrayToArrayString(list []interface{}) []string
interface转ArrayString
func JsonArrayStringToStringArray ¶
JsonArrayStringToStringArray json数组字符串转字符串数组
func JsonObjectToString ¶
func JsonObjectToString(data interface{}) string
JsonObjectToString 将对象转成json字符串
func RandCharNoNumber ¶
获取指定长度的字符 参数length:要获取字符的长度 返回随机指定长度的字符串
func RandCharNoNumberEx ¶
获取指定长度的字符 参数length:要获取字符的长度 返回随机指定长度的字符串
func RegReplace ¶
正则替换 参数reg:正则表达式 参数new_str:替换成字符串 参数content:待匹配字符串 返回值:替换后的字符串
func StrToTimeFormatByLocal ¶
将字符串转时间戳按格式
func StringArrayToInt64Array ¶
StringArrayToInt64Array string转[]int64
func StringArrayToInterfaceArray ¶
func StringArrayToInterfaceArray(data []string) []interface{}
StringArrayToInterfaceArray string转[]interface{}
func StringToJsonObject ¶
StringToJsonObject json字符串转json对象
func StringToObject ¶
StringToObject json字符串转对象
func StringToXmlObject ¶
StringToXmlObject xml字符串转对象
func UnSerialize ¶
反序列化数据 参数data:序列化数据 参数rdata:反序列化后的数据
func UnSerializeNoFix ¶
反序列化数据 参数data:序列化数据 参数rdata:反序列化后的数据
func XmlObjectToString ¶
func XmlObjectToString(data interface{}) string
XmlObjectToString 将xml对象转字符串
func ZeroTimeByTimeByLocal ¶
获得时间戳对应的凌晨0点时间戳
Types ¶
type Column ¶
type Column struct { Name string `json:"name"` //字段名 Type string `json:"type"` //字段类型 DataType string `json:"dataType"` //字段类型 Length int `json:"length"` //字段长度 Scale int `json:"scale"` //小数点 Extra string `json:"extra"` //扩展 Key string `json:"key"` //主键为PRI IsNull string `json:"isNull"` //是否为空 NO不为空 YES为空 Default string `json:"default"` //默认值 Comment string `json:"comment"` //备注 CharacterSetName string `json:"characterSetName"` //字段字符编码 CollationName string `json:"collationName"` //字段字符编码 }
Column 表字段信息
type Data ¶
type Data struct {
Value interface{}
}
Data 数据
func (*Data) WhetherArrayByte ¶
WhetherArrayByte 输出[]byte字节数组
func (*Data) WhetherArrayInt64 ¶
WhetherArrayInt64 输出[]int64字符串数组
func (*Data) WhetherArrayRow ¶
WhetherArrayRow 输出[]Row数据数组
func (*Data) WhetherArrayRows ¶
WhetherArrayRow 输出[]Row数据数组
func (*Data) WhetherArrayString ¶
WhetherArrayString 输出[]string字符串数组
type Row ¶
Row 数据
func InterfaceArrayToArrayRow ¶
func InterfaceArrayToArrayRow(list []interface{}) []Row
interface转ArrayRow
func MapInterfaceArrayToRow ¶
map[string]interface {}转Row
type Rows ¶
type Rows []Row //Row 数组数据
func InterfaceArrayToArrayRows ¶
func InterfaceArrayToArrayRows(list []interface{}) Rows
interface转Rows
type WordRankResult ¶
type WordRankResult struct { Text string `json:"text"` Count int `json:"count"` Rank float32 `json:"rank"` }
WordRankResult 词频返回
type WordRankResults ¶
type WordRankResults []WordRankResult
func (WordRankResults) Len ¶
func (s WordRankResults) Len() int
func (WordRankResults) Less ¶
func (s WordRankResults) Less(i, j int) bool
func (WordRankResults) Swap ¶
func (s WordRankResults) Swap(i, j int)