util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YearSecs  = 31536000
	MonthSecs = 2592000
	DaySecs   = 86400
	HourSecs  = 3600
	MinSecs   = 60
	OneSec    = 1
)
View Source
const (
	AUTHORIZATION = "Authorization"
	BASIC         = "Basic"
)

Variables

This section is empty.

Functions

func AddSeconds

func AddSeconds(secs int64) string

func CalculateSecs

func CalculateSecs(s string) int64

func Call

func Call(funcName interface{}, params []interface{}) []reflect.Value

func CallFunc

func CallFunc(funcName interface{}, params ...interface{}) []reflect.Value

func CallRefs

func CallRefs(funcName interface{}, params []interface{}) []reflect.Value

func ConvertDate

func ConvertDate(date time.Time, days int, format string) string

func ConvertMonth

func ConvertMonth(date string) string

func ConvertSeconds

func ConvertSeconds(seconds int64, days int) string

func ConvertSecondsFormat

func ConvertSecondsFormat(secs int64, days int, format string) string

func ConvertTime

func ConvertTime(date time.Time, days int, format string) string

func ConvertTimeDigit

func ConvertTimeDigit(date time.Time, days int) string

func ConvertUrl

func ConvertUrl(reqUrl string, headers http.Header) string

func CreateFile

func CreateFile(name string, data []byte, paths ...string) string

func DateOffset

func DateOffset(date string) int

func DateOffsetString

func DateOffsetString(date string) string

func GetCustomDays

func GetCustomDays(date string, cs int) string

func GetCustomDaysFormat

func GetCustomDaysFormat(date string, cs int, format string) string

func GetDate

func GetDate(days int) string

func GetDateFormat

func GetDateFormat(days int, format string) string

func GetDirList

func GetDirList(path string) ([]string, error)

func GetFiles

func GetFiles(path, wildcard string) []string

func GetHour

func GetHour() int

func GetLastMonth

func GetLastMonth(date string) string

func GetLastMonthFormat

func GetLastMonthFormat(date, format string) string

func GetLastWeek

func GetLastWeek(date string) string

func GetLastWeekFormat

func GetLastWeekFormat(date string, format string) string

func GetMillisecond

func GetMillisecond() string

func GetSeconds

func GetSeconds() string

func GetTime

func GetTime(days int) string

func GetTimeDigit

func GetTimeDigit(days int) string

func GetTimeFormat

func GetTimeFormat(days int, format string) string

func GetTimestamp

func GetTimestamp(days int) string

func GetYesterday

func GetYesterday(date string) string

func GetYesterdayFormat

func GetYesterdayFormat(date string, format string) string

func Millisecond

func Millisecond() int64

func RequestHttp

func RequestHttp(reqUrl, method string, a, h, msg []byte) ([]byte, int, http.Header)

func RunHttpServer

func RunHttpServer(handler http.HandlerFunc, httpPort, readTimeout, writeTimeout int, quit chan int)

func Seconds

func Seconds() int64

func Timestamp

func Timestamp(days int) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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