Documentation
¶
Index ¶
- Constants
- func ExecCommand(cmd string, params []string) (int, []byte, []byte, error)
- func GetCronNextTriggeredTime(spec, location string, startTime time.Time) (time.Time, error)
- func GetCronPeriodTriggeredTimes(spec string, location string, startTime, endTime time.Time) ([]time.Time, error)
- func GetEnvOrIniValue(iniFile *ini.File, section string, key string) string
- func GetOutBoundIP() (ip string, err error)
- func GetTimeLocation(location string) (*time.Location, error)
- func GetTimeNowInLoc(location string) (time.Time, error)
- func HttpResult(c *gin.Context, code int, err error, data interface{})
- func HttpResultWithTotalCounts(c *gin.Context, code int, err error, data interface{}, counts int64)
- func Response(c *gin.Context, e error, d interface{}, count int64)
- func SetDefaultBool(targetstr string, defaultVal bool) bool
- func SetDefaultDuration(targetstr string, defaultVal ...time.Duration) time.Duration
- func SetDefaultFloat64(targetstr string, defaultVal ...float64) float64
- func SetDefaultInt(targetstr string, defaultVal int) int
- func SetDefaultInt64(targetstr string, defaultVal int64) int64
- func SetDefaultString(targetstr string, defaultVal string) string
- type NetworkAddress
Constants ¶
View Source
const ( Month_TIME_LAYOUT = "2006-01" DEFAULT_TIME_LAYOUT = "2006-01-02" DEFAULT_DB_TIME_LAYOUT = "2006-01-02 15:04:05" DEFAULT_TIMESTAMP_TIME_LAYOUT = "20060102150405" )
Variables ¶
This section is empty.
Functions ¶
func GetEnvOrIniValue ¶
func GetOutBoundIP ¶
func SetDefaultBool ¶
func SetDefaultDuration ¶
func SetDefaultFloat64 ¶
func SetDefaultInt ¶
func SetDefaultInt64 ¶
func SetDefaultString ¶
Types ¶
type NetworkAddress ¶
func SplitHostPort ¶
func SplitHostPort(input string) (NetworkAddress, error)
SplitHostPort splits ip address/hostname string by host and port
func SplitHostPortDefault ¶
func SplitHostPortDefault(input, defaultHost, defaultPort string) (NetworkAddress, error)
SplitHostPortDefault splits ip address/hostname string by host and port. Defaults used if no match found
Click to show internal directories.
Click to hide internal directories.