Documentation ¶
Index ¶
- func AESDecrypt(cryted, key string) string
- func AESEncrypt(org, key string) string
- func BeginningOfDay(t time.Time) time.Time
- func BeginningOfLastDay(t time.Time) time.Time
- func BeginningOfLastMonth(t time.Time) time.Time
- func BeginningOfLastWeek(t time.Time) time.Time
- func BeginningOfMonth(t time.Time) time.Time
- func BeginningOfNextMonth(t time.Time) time.Time
- func BeginningOfWeek(t time.Time) time.Time
- func CalcDateSub(from, to time.Time) (days, hours, mins, secs int)
- func CreateZipFileContent(writer *zip.Writer, zipPath string, targetFilePath string) error
- func DateUTC(year, month, date int) time.Time
- func ExistsInt(arrayData []int, val int) bool
- func ExistsString(arrayData []string, val string) bool
- func FileExists(filename string) bool
- func FormatDateJST(date time.Time) string
- func FormatDateJSTByNullTime(date null.Time) string
- func FormatDateTimeJST(date time.Time) string
- func FormatDateTimeJSTByNullTime(date null.Time) string
- func FormatDateTimeOnlyNumber(date time.Time) string
- func GenUUID() string
- func GenerateRandomString(length int) string
- func GetAge(t null.Time) null.Int
- func GetEscapeString(str string) string
- func GetFowardMatchString(str string) string
- func GetMatchString(str string) string
- func IndexOfInt(arrayData []int, val int) int
- func IntArrayToString(arrayData []int, delimiter string) string
- func IsPasswordRuleEnabled(password string) bool
- func JSTLocation() *time.Location
- func JSTNow() time.Time
- func NullIntIfZero(i int) null.Int
- func NullStringIfEmpty(s string) null.String
- func NumberOfTheWeekInMonth(now time.Time) int
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func RandStringForShortenURL(n int) string
- func RandStringFriendly(n int) string
- func RemoveNumInArray(removeNum int, intArray []int) []int
- func ResolveHostIP() string
- func Round(f float64, places int) float64
- func SHA256Str(str string) string
- func SliceInt(offset int, limit int, intArray []int) []int
- func SortMapByValueForFloat(srcMap map[int]float64) []int
- func SortMapByValueForTime(srcMap map[int]time.Time) []int
- func StringToIntArray(str string) ([]int, error)
- func SumFloat(values []float64) float64
- func UniqInt(arrayData []int) []int
- func WrapArray(arrayData interface{}) map[string]Element
- func WrapArrayWithElemName(arrayData interface{}, elemName string) map[string]Element
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginningOfLastDay ¶
BeginningOfLastDay 前日の開始を返す.
func BeginningOfLastMonth ¶
BeginningOfLastMonth 先月の月初めを返す..
func BeginningOfLastWeek ¶
BeginningOfLastWeek 指定日時の前週の初めを返す.
func BeginningOfNextMonth ¶
BeginningOfNextMonth 来月の月初めを返す..
func CalcDateSub ¶
CalcDateSub 日時の差分をそれぞれ返却する.
func CreateZipFileContent ¶
CreateZipFileContent Zipファイルの中身を設定する
func ExistsString ¶
ExistsString returns the value exists in the array.
func FileExists ¶ added in v1.0.2
FileExists decect if file exists
func FormatDateJSTByNullTime ¶
FormatDateJSTByNullTime は null.Time を JST で日付フォーマットした日付を返す. null の場合は空文字を返す.
func FormatDateTimeJST ¶
FormatDateTimeJST は JST で日付をフォーマットする.
func FormatDateTimeJSTByNullTime ¶
FormatDateTimeJSTByNullTime は null.Time を JST で日付フォーマットした日付(時間を含む)を返す. null の場合は空文字を返す.
func FormatDateTimeOnlyNumber ¶
FormatDateTimeOnlyNumber は 日付をフォーマットする.
func GenerateRandomString ¶
GenerateRandomString ランダム文字列生成
func GetFowardMatchString ¶
GetFowardMatchString return foward match query string
func GetMatchString ¶
GetMatchString return match query string
func IndexOfInt ¶
IndexOfInt returns index of value in the array.
func IntArrayToString ¶
IntArrayToString 数値の配列を delimiter で結合した文字列で返却する.
func IsPasswordRuleEnabled ¶
IsPasswordRuleEnabled パスワードに半角小文字大文字英字と数字を含む8文字以上か
func NullIntIfZero ¶
NullIntIfZero returns null.String. if int is empty, returns null.Int having null value.
func NullStringIfEmpty ¶
NullStringIfEmpty returns null.String. if string is empty, returns null.String having null value.
func NumberOfTheWeekInMonth ¶
NumberOfTheWeekInMonth は月中の第何週かを返す.
func PKCS7Padding ¶
PKCS7Padding get PKCS7 Padding
func PKCS7UnPadding ¶
PKCS7UnPadding get PKCS7 Unpadding
func RandStringForShortenURL ¶
RandStringForShortenURL は短縮URL用のランダム文字を返す.
func RandStringFriendly ¶
RandStringFriendly は引き継ぎコードや問い合わせコードなど視認しやすいランダムコードを得る.
func RemoveNumInArray ¶
RemoveNumInArray 指定した数字を数値配列内から全て除去する.
func SortMapByValueForFloat ¶
SortMapByValueForFloat Map(key:int,value:float64)をvalue別に降順ソートし、その時に対応するkeyのリストを返す
func SortMapByValueForTime ¶
SortMapByValueForTime Map(key:int,value:time.Time)をvalue別に降順ソートし、その時に対応するkeyのリストを返す
func StringToIntArray ¶
StringToIntArray delimiter で結合された文字列を数値の配列にする.
func WrapArrayWithElemName ¶
WrapArrayWithElemName Array elements to object with field name.