Documentation ¶
Index ¶
- Constants
- Variables
- func Base64RawURLDecode(msg string) string
- func Base64RawURLDecodeCustom(msg string) string
- func Base64RawURLEncode(msg string) string
- func Base64RawURLEncodeCustom(msg string) string
- func Base64decode(msg string) string
- func Base64decodeCustom(msg string) string
- func Base64encode(msg string) string
- func Base64encodeCustom(msg string) string
- func Base64urldecode(msg string) string
- func Base64urldecodeCustom(msg string) string
- func Base64urlencode(msg string) string
- func Base64urlencodeCustom(msg string) string
- func DateZToWIBID(utc string, lang Lang) string
- func DateZToWIBIDWithDay(utc string, lang Lang) string
- func DecryptAes(key []byte, securemess string) (decodedmess string, err error)
- func EncryptAes(key []byte, message string) (encmess string, err error)
- func GetAllIP() string
- func GetCurDateTimeZ() string
- func GetCurDateTimeZAdd(unit AddDateUnitName, value int) string
- func GetDateTimeAdd(t time.Time, unit AddDateUnitName, value int) (time.Time, error)
- func GetDateTimeZAdd(t time.Time, unit AddDateUnitName, value int) (string, error)
- func GetTimeFromUnix(unixTime int64) time.Time
- func GetTimeFromUnixString(unixTime string) (time.Time, error)
- func GetTimeStamp(ts ...time.Time) int64
- func GetTimeStampString(ts ...time.Time) string
- func GetUID() string
- func HMACSha256(secret, stringToSign string) string
- func Md5(msg string) string
- func ParseDateTimeZ(value string) (time.Time, error)
- func Random(min, max int) int
- func Round(num float64) int
- func Sha256String(s string) string
- func Sha512String(s string) string
- func ToFixed(num float64, precision int) float64
- func TripleDesDecrypt(crypted, key []byte) ([]byte, error)
- func TripleDesDecryptString(cryptedString, keyString string) ([]byte, error)
- func TripleDesEncrypt(data, key []byte) ([]byte, error)
- func TripleDesEncryptString(data, keyString string) ([]byte, error)
- type AddDateUnitName
- type Lang
Constants ¶
const ( // UTCDateLayout constant UTCDateLayout = "2006-01-02T15:04:05Z07:00" FieldLabelWIB = "WIB" WIBLocation = "Asia/Jakarta" UTCWIBOffsetSec = 25200 LangID Lang = "id" LangEN Lang = "en" )
Variables ¶
var DayID = []string{"Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"}
var MonthID = []string{"Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"}
Functions ¶
func Base64RawURLDecodeCustom ¶
Base64RawURLDecodeCustom function
func Base64RawURLEncodeCustom ¶
Base64RawURLEncodeCustom function
func Base64urldecodeCustom ¶
Base64urldecodeCustom function
func Base64urlencodeCustom ¶
Base64urlencodeCustom function
func DateZToWIBID ¶
DateZToWIBID function @utc should be "2020-01-23T20:00:30Z" @return "7 Maret 2015, 18:06 WIB"
func DateZToWIBIDWithDay ¶
DateZToWIBIDWithDay function @utc should be "2020-01-23T20:00:30Z" @return "Sabtu, 7 Maret 2015, 18:06 WIB"
func DecryptAes ¶
DecryptAes function
func EncryptAes ¶
EncryptAes function
func GetCurDateTimeZAdd ¶
func GetCurDateTimeZAdd(unit AddDateUnitName, value int) string
GetCurDateTimeZAdd function
func GetDateTimeAdd ¶
GetDateTimeAdd function
func GetDateTimeZAdd ¶
GetDateTimeZAdd function
func GetTimeFromUnix ¶
GetTimeFromUnix function parameter is milliseconds int64
func GetTimeFromUnixString ¶
GetTimeFromUnixString function parameter is milliseconds string
func GetTimeStamp ¶
GetTimeStamp function return milliseconds int64
func GetTimeStampString ¶
GetTimeStampString function return milliseconds string
func TripleDesDecrypt ¶
TripleDesDecrypt function (3DES)
func TripleDesDecryptString ¶
TripleDesDecryptString function (3DES)
func TripleDesEncrypt ¶
TripleDesEncrypt function (3DES)
func TripleDesEncryptString ¶
TripleDesEncryptString function (3DES)
Types ¶
type AddDateUnitName ¶
type AddDateUnitName string
AddDateUnitName type
const ( // AddYears constant AddYears AddDateUnitName = "years" // AddMonths constant AddMonths AddDateUnitName = "months" // AddDays constant AddDays AddDateUnitName = "days" // AddHours constant AddHours AddDateUnitName = "hours" // AddMinutes constant AddMinutes AddDateUnitName = "minutes" // AddSeconds constant AddSeconds AddDateUnitName = "seconds" )