Documentation ¶
Overview ¶
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.19 or later
REQUIRE: go 1.22 or later (depends on Go generics, available since go 1.18 but stable only since go 1.19)
Index ¶
- Constants
- Variables
- func AddCSlashes(s string, c string) string
- func AppGetNamespace() (string, error)
- func AppGetRunInBackground() bool
- func AppGetSecurityKey() (string, error)
- func AppSetNamespace(ns string) bool
- func AppSetRunInBackground() bool
- func AppSetSecurityKey(key string) bool
- func ArrMapKeyExists[C comparable, A any](v C, arr map[C]A) bool
- func ArrMapStrFlip(m map[string]string) map[string]string
- func Auth2FACookieIsEnabled() bool
- func Auth2FACookieNameGet() string
- func Auth2FACookieNameSet(cookieName string) bool
- func AuthAnyIsEnabled() bool
- func AuthApikeyIsEnabled() bool
- func AuthApikeyModeSet(mode bool) bool
- func AuthBasicIsEnabled() bool
- func AuthBasicModeSet(mode bool) bool
- func AuthBearerIsEnabled() bool
- func AuthBearerModeSet(mode bool) bool
- func AuthCookieIsEnabled() bool
- func AuthCookieNameGet() string
- func AuthCookieNameSet(cookieName string) bool
- func AuthGetMetaData(authData AuthDataStruct, key string) (string, error)
- func AuthGetUserDefaultPrivKey(username string) string
- func AuthGetUserDefaultSecurityKey(username string) string
- func AuthIsValid2FACode(code string) bool
- func AuthIsValidExtArea(area string) bool
- func AuthIsValidExtUserName(user string) bool
- func AuthIsValidPassword(pass string) bool
- func AuthIsValidPrivKey(key string) bool
- func AuthIsValidPubKey(key string) bool
- func AuthIsValidSecurityKey(key string) bool
- func AuthIsValidTokenOpaque(token string) bool
- func AuthIsValidUserEmail(email string) bool
- func AuthIsValidUserName(user string) bool
- func AuthMethodGetNameById(methodId uint8) string
- func AuthPassHashAlgoGetNameById(algo uint8) string
- func AuthSafeCompare(val1 string, val2 string) bool
- func AuthSafeListPrivsRestr(list string) string
- func AuthSafeTestPrivsRestr(list string, entry string) bool
- func AuthTokenIsEnabled() bool
- func AuthTokenModeSet(mode bool) bool
- func AuthUserTokenBasicSepareParts(usernameWithTokenSuffix string, passAsTokenHash string) (string, string, error)
- func AuthUserTokenDefaultSepareParts(token string) (string, string, error)
- func BExplode(delimiter []byte, src []byte) [][]byte
- func BExplodeWithLimit(delimiter []byte, src []byte, limit int) [][]byte
- func BImplode(glue []byte, pieces [][]byte) []byte
- func Base64BytDecode(data []byte) []byte
- func Base64BytEncode(data []byte) []byte
- func Base64BytToBase64s(data []byte) []byte
- func Base64BytToBase64u(data []byte) []byte
- func Base64Decode(data string) string
- func Base64Encode(data string) string
- func Base64ToBase64s(data string) string
- func Base64ToBase64u(data string) string
- func Base64sBytDecode(data []byte) []byte
- func Base64sBytEncode(data []byte) []byte
- func Base64sBytToBase64(data []byte) []byte
- func Base64sDecode(data string) string
- func Base64sEncode(data string) string
- func Base64sToBase64(data string) string
- func Base64uBytToBase64(data []byte) []byte
- func Base64uToBase64(data string) string
- func BaseDecode(data string, fromBase string) []byte
- func BaseEncode(data []byte, toBase string) string
- func Bin2BytHex(src []byte) []byte
- func Bin2Hex(str string) string
- func BlowfishDecryptCBC(str string, key string) string
- func BlowfishEncryptCBC(str string, key string, randomize bool) string
- func BytContains(src []byte, part []byte) bool
- func BytEndsWith(src []byte, part []byte) bool
- func BytIContains(src []byte, part []byte) bool
- func BytIEndsWith(src []byte, part []byte) bool
- func BytIPos(haystack []byte, needle []byte, binary bool) int
- func BytIReplaceAll(s []byte, part []byte, replacement []byte) []byte
- func BytIReplaceWithLimit(s []byte, part []byte, replacement []byte, limit int) []byte
- func BytIStartsWith(src []byte, part []byte) bool
- func BytLen(src []byte) int
- func BytPos(haystack []byte, needle []byte, binary bool) int
- func BytRIPos(haystack []byte, needle []byte, binary bool) int
- func BytRPos(haystack []byte, needle []byte, binary bool) int
- func BytRegexCallbackReplaceAll(rexpr string, src []byte, replFx func(mgroups [][]byte) []byte) []byte
- func BytRegexCallbackReplaceWithLimit(rexpr string, src []byte, replFx func(mgroups [][]byte) []byte, limit int) []byte
- func BytRegexFindAllMatches(rexp string, s []byte, maxRecursion uint32) ([][][]byte, error)
- func BytRegexFindFirstMatch(rexp string, s []byte) ([][]byte, error)
- func BytRegexMatch(rexpr string, s []byte) bool
- func BytRegexReplaceAll(rexpr string, s []byte, repl []byte) []byte
- func BytRegexReplaceFirst(rexpr string, s []byte, repl []byte) []byte
- func BytRepeat(src []byte, count int) []byte
- func BytReplaceAll(src []byte, part []byte, replacement []byte) []byte
- func BytReplaceWithLimit(src []byte, part []byte, replacement []byte, limit int) []byte
- func BytStartsWith(src []byte, part []byte) bool
- func BytSubstr(s []byte, start int, stop int) []byte
- func BytToLower(src []byte) []byte
- func BytToUpper(src []byte) []byte
- func BytToValidUTF8Fix(src []byte) []byte
- func BytTr(src []byte, replace map[string][]byte) []byte
- func BytTrim(src []byte, cutset string) []byte
- func BytTrimLeft(src []byte, cutset string) []byte
- func BytTrimLeftWhitespaces(s []byte) []byte
- func BytTrimRight(src []byte, cutset string) []byte
- func BytTrimRightWhitespaces(s []byte) []byte
- func BytTrimWhitespaces(s []byte) []byte
- func BytesConcatenate(src1 []byte, src2 []byte) []byte
- func BytesEqual(src1 []byte, src2 []byte) bool
- func BytesIEqual(src1 []byte, src2 []byte) bool
- func BytesToExaBytes(b uint64) uint64
- func BytesToGigaBytes(b uint64) uint64
- func BytesToKiloBytes(b uint64) uint64
- func BytesToMegaBytes(b uint64) uint64
- func BytesToPetaBytes(b uint64) uint64
- func BytesToTeraBytes(b uint64) uint64
- func Chr(o uint8) string
- func CipherDecryptCBC(algo string, str string, key string, iv string, tweak string) (string, error)
- func CipherEncryptCBC(algo string, str string, key string, iv string, tweak string) (string, error)
- func ClearPrintTerminal()
- func ConformSerializedJsObjectForm(jsonStr string, dataKey string) (map[string]interface{}, error)
- func ConvertBoolToStr(i bool) string
- func ConvertBoolsToStr(i bool) string
- func ConvertFloat32ToStr(f float32) string
- func ConvertFloat64ToStr(f float64) string
- func ConvertInt16ToStr(i int16) string
- func ConvertInt32ToStr(i int32) string
- func ConvertInt64ToStr(i int64) string
- func ConvertInt8ToStr(i int8) string
- func ConvertIntToStr(i int) string
- func ConvertJsonNumberToFloat64(data interface{}) (float64, error)
- func ConvertJsonNumberToInt64(data interface{}) (int64, error)
- func ConvertJsonNumberToStr(data interface{}) string
- func ConvertUInt16ToStr(i uint16) string
- func ConvertUInt32ToStr(i uint32) string
- func ConvertUInt64ToStr(i uint64) string
- func ConvertUInt8ToStr(i uint8) string
- func ConvertUIntToStr(i uint) string
- func Crc32b(str string) string
- func Crc32bB36(str string) string
- func CurrentFunctionName() string
- func CurrentOSArch() string
- func CurrentOSName() string
- func CurrentRuntimeVersion() string
- func DataArchive(str string) string
- func DataRRot13(s string) string
- func DataRot13(s string) string
- func DataUnArchive(str string) string
- func DateFromStr(dateIsoStr string, withTime bool, withTzOffset bool, isUTC bool) string
- func DateFromTime(t time.Time) string
- func DateFromUnixTimeLocal(timestamp int64) string
- func DateFromUnixTimeUtc(timestamp int64) string
- func DateIsoFromTime(t time.Time) string
- func DateIsoFromUnixTimeLocal(timestamp int64) string
- func DateIsoFromUnixTimeUtc(timestamp int64) string
- func DateNoTimeFromTime(t time.Time) string
- func DateNoTimeFromUnixTimeLocal(timestamp int64) string
- func DateNoTimeFromUnixTimeUtc(timestamp int64) string
- func DateNowIsoLocal() string
- func DateNowIsoUtc() string
- func DateNowLocal() string
- func DateNowNoTimeLocal() string
- func DateNowNoTimeUtc() string
- func DateNowUtc() string
- func DateTimeGetLocation() string
- func DateTimeSetLocation(loc string) bool
- func DateTimeStructLocal(dateIsoStr string) uxmDateTimeStruct
- func DateTimeStructUtc(dateIsoStr string) uxmDateTimeStruct
- func EscapeCss(s string) string
- func EscapeHtml(s string) string
- func EscapeJs(in string) string
- func EscapeUrl(s string) string
- func EscapeXml(s string, extraEscapings bool) string
- func ExecCmd(captureStdout string, captureStderr string, additionalEnv string, ...) (isSuccess bool, outStd string, errStd string)
- func ExecTimedCmd(stopTimeout uint, captureStdout string, captureStderr string, ...) (isSuccess bool, outStd string, errStd string)
- func Explode(delimiter string, text string) []string
- func ExplodeWithLimit(delimiter string, text string, limit int) []string
- func FatalError(logMessages ...any)
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(n int) (string, error)
- func GenerateSSHKeyPairEd25519(comment string, password string) (error, string, string)
- func GetBaseDomainFromDomain(domain string) (string, error)
- func GetCookieDefaultDomain() string
- func GetCookieDefaultSameSitePolicy() string
- func GetCurrentUserHomeDir() (string, error)
- func GetHttpBaseUrlFromRequest(r *http.Request) string
- func GetHttpBrowserPathFromRequest(r *http.Request) (path string)
- func GetHttpDomainAndPortFromRequest(r *http.Request) (domain string, portNum string, err error)
- func GetHttpPathFromRequest(r *http.Request) (path string)
- func GetHttpProtocolFromRequest(r *http.Request) (proto string)
- func GetHttpProxyBasePath() string
- func GetHttpProxyRealClientIpHeaderKey() string
- func GetHttpProxyRealServerHostPortHeaderKey() string
- func GetHttpProxyRealServerProtoHeaderKey() string
- func GetHttpQueryStringFromRequest(r *http.Request) (query string)
- func GetHttpRealClientIpFromRequestHeaders(r *http.Request) (isOk bool, clientRealIp string, rawVal string, headerKey string)
- func GetHttpRemoteAddrIpAndPortFromRequest(r *http.Request) (ipAddr string, portNum string)
- func GetHttpUrlFromRequest(r *http.Request, withUrlQuery bool) string
- func GetHttpUserAgentFromRequest(r *http.Request) (ua string)
- func GetUserAgentBrowserClassOs(signature string) (bw string, cls string, os string, mb bool)
- func GzDecode(str string) string
- func GzDeflate(str string, level int) string
- func GzEncode(str string, level int) string
- func GzInflate(str string) string
- func HTMLCodeFixSanitize(htmlCode string) (string, error)
- func HTMLCodeFixValidate(htmlCode string) (string, error)
- func HTMLCodeStripTags(htmlCode string) string
- func HTMLDecodeEntities(htmlCode string) string
- func HandleAbortCtrlC(delay uint32)
- func HashHmac(algo string, key string, str string, b64 bool) (string, error)
- func Hex2Bin(str string) string
- func Hex2BytBin(src []byte) []byte
- func HttpSessionUUIDCookieIsEnabled() bool
- func HttpSessionUUIDCookieNameGet() string
- func HttpSessionUUIDCookieNameSet(cookieName string) bool
- func Implode(glue string, pieces []string) string
- func InListArr[C comparable](v C, arr []C) bool
- func IniContentParse(iniContent string, iniKeys []string) (iniMap map[string]string, errMsg error)
- func IsInteger(s string, allowNegatives bool) bool
- func IsNetValidHostName(s string) bool
- func IsNetValidIpAddr(s string) bool
- func IsNetValidPortNum(p int64) bool
- func IsNetValidPortStr(s string) bool
- func IsNumeric(s string, extended bool) bool
- func IsPathAlikeWithSafeFixedPath(path string, fixTrailingSlashes bool) bool
- func IsValidHttpHeaderKey(hdrKey string) bool
- func JsonArrDecode(data string) ([]interface{}, error)
- func JsonEncode(data interface{}, prettyprint bool, htmlsafe bool) (string, error)
- func JsonGetValueByKeyPath(json string, path string) gjson.Result
- func JsonGetValueByKeysPath(json string, keys ...string) (*fastjson.Value, error)
- func JsonNoErrChkEncode(data interface{}, prettyprint bool, htmlsafe bool) string
- func JsonObjDecode(data string) (map[string]interface{}, error)
- func JsonScalarDecodeToStr(data string) (string, error)
- func JsonStrDecode(data string) (string, error)
- func KillCmd(cmd *exec.Cmd) error
- func LogToConsole(level string, withColorsOnConsole bool)
- func LogToFile(level string, pathForLogs string, theFormat string, alsoOnConsole bool, ...)
- func LogToStdErr(level string)
- func LogUseLocalTime()
- func LogUseUtcTime()
- func MarkdownSmartToHTMLRender(mkdwDoc string, urlRelativePrefix string, useUnveil bool, ...) (string, error)
- func MarkdownToHTMLRender(mkdwDoc string) (string, error)
- func MarkersTplEscapeSyntaxContent(tpl string, isMainHtml bool) string
- func MarkersTplEscapeTpl(tpl string) string
- func MarkersTplPrepareNosyntaxContent(tpl string) string
- func MarkersTplPrepareNosyntaxHtml(tpl string, isMainHtml bool) string
- func MarkersTplRender(template string, arrobj map[string]string, isEncoded bool, revertSyntax bool, ...) string
- func MarkersTplRevertNosyntaxContent(tpl string) string
- func Md5(str string) string
- func Md5B64(str string) string
- func MdByt5(src []byte) []byte
- func MdByt5B64(src []byte) []byte
- func MemoryStats() runtime.MemStats
- func NanoTimeRandInt63N(min int64, max int64) uint64
- func NanoTimeRandIntN(min int, max int) uint
- func NewError(err string) error
- func Nl2Br(s string) string
- func NullableStrFromStr(s string) *string
- func NullableStrToStr(s *string) string
- func Ord(c string) int
- func PanicHandler()
- func ParseBoolStrAsBool(s string) bool
- func ParseBoolStrAsStdBoolStr(s string) string
- func ParseFloatStrAsDecimalStr(s string, d uint8) string
- func ParseStrAsFloat64(s string) float64
- func ParseStrAsFloat64StrFixedPrecision(s string) string
- func ParseStrAsInt64(s string) int64
- func ParseStrAsUInt64(s string) uint64
- func PathAddDirLastSlash(dirPath string) string
- func PathBaseExtension(filePath string) string
- func PathBaseName(filePath string) string
- func PathBaseNoExtName(filePath string) string
- func PathDirName(filePath string) string
- func PathExists(thePath string) bool
- func PathGetAbsoluteFromRelative(thePath string) string
- func PathGetCurrentExecutableDir() string
- func PathGetCurrentExecutableName() string
- func PathGetCurrentExecutablePathAndName() string
- func PathIsAbsolute(filePath string) bool
- func PathIsBackwardUnsafe(filePath string) bool
- func PathIsDir(thePath string) bool
- func PathIsEmptyOrRoot(filePath string) bool
- func PathIsFile(thePath string) bool
- func PathIsSafeValidFileName(fileName string) bool
- func PathIsSafeValidPath(filePath string) bool
- func PathIsSafeValidSafeFileName(fileName string) bool
- func PathIsSafeValidSafePath(filePath string) bool
- func Pbkdf2DerivedKey(algo string, key string, salt string, klen uint16, iterations uint16, b92 bool) (string, error)
- func Pbkdf2PreDerivedKey(key string) (string, error)
- func PlaceholdersTplRender(template string, arrpobj map[string]string, isEncoded bool, revertSyntax bool) string
- func Poly1305(key string, str string, b64 bool) (string, error)
- func PrettyPrintBytes(b uint64) string
- func RawUrlDecode(s string) string
- func RawUrlEncode(s string) string
- func RenderMainHtmlMarkersFileTpl(mtplFile string, arrobj map[string]string, arrpobj map[string]string) (string, error)
- func RenderMainHtmlMarkersTpl(template string, arrobj map[string]string, arrpobj map[string]string) string
- func RenderMarkersFileTpl(mtplFile string, arrobj map[string]string) (string, error)
- func RenderMarkersTpl(template string, arrobj map[string]string) string
- func SafeChecksumHashSmart(plainTextData string, customSalt string) (string, error)
- func SafePassHashBcrypt(plainPass string, cost uint8) (string, error)
- func SafePassHashBcryptVerify(hashedPass string, plainPass string) bool
- func SafePassHashSmart(plainPass string, theSalt string, useArgon2id bool) (string, error)
- func SafePassHashSmartVerify(hashedPass string, plainPass string, theSalt string, useArgon2id bool) bool
- func SafePathDirCreate(dirPath string, allowRecursive bool, allowAbsolutePath bool) (isSuccess bool, errMsg error)
- func SafePathDirDelete(dirPath string, allowAbsolutePath bool) (isSuccess bool, errMsg error)
- func SafePathDirRename(dirPath string, dirNewPath string, allowAbsolutePath bool) (isSuccess bool, errMsg error)
- func SafePathDirScan(dirPath string, recursive bool, allowAbsolutePath bool) (isSuccess bool, errMsg error, arrDirs []string, arrFiles []string)
- func SafePathEmbedDirScan(efs *embed.FS, dirPath string, recursive bool) (isSuccess bool, err error, arrDirs []string, arrFiles []string)
- func SafePathFileCopy(filePath string, fileNewPath string, allowAbsolutePath bool) (isSuccess bool, errMsg error)
- func SafePathFileDelete(filePath string, allowAbsolutePath bool) (isSuccess bool, errMsg error)
- func SafePathFileGetSize(filePath string, allowAbsolutePath bool) (fileSize int64, errMsg error)
- func SafePathFileMd5(filePath string, allowAbsolutePath bool) (hashSum string, errMsg error)
- func SafePathFileRead(filePath string, allowAbsolutePath bool) (fileContent string, errMsg error)
- func SafePathFileRename(filePath string, fileNewPath string, allowAbsolutePath bool) (isSuccess bool, errMsg error)
- func SafePathFileSha(mode string, filePath string, allowAbsolutePath bool) (hashSum string, errMsg error)
- func SafePathFileWrite(filePath string, wrMode string, allowAbsolutePath bool, fileContent string) (isSuccess bool, errMsg error)
- func SafePathFixClean(p string) string
- func SafePathFixSeparator(p string) string
- func SafePathGetMTime(thePath string, allowAbsolutePath bool) (mTime int64, errMsg error)
- func SafePathIniFileReadAndParse(iniFilePath string, allowAbsolutePath bool, iniKeys []string) (iniMap map[string]string, errMsg error)
- func SafePathMarkdownFileToHTMLRender(mdFilePath string, allowAbsolutePath bool) (string, error)
- func SafePathMarkdownSmartFileToHTMLRender(mdFilePath string, allowAbsolutePath bool, urlRelativePrefix string, ...) (string, error)
- func SafePathYamlFileReadAndParse(yamlFilePath string, allowAbsolutePath bool) (yamlMap map[string]interface{}, errMsg error)
- func SendSmtpEmail(smtpConf SmtpConfig, mailMsgStruct MailMessageStruct) error
- func SetCookieDefaultDomain(domain string) bool
- func SetCookieDefaultSameSitePolicy(policy string) bool
- func SetHttpProxyBasePath(pfx string) bool
- func SetHttpProxyRealClientIpHeaderKey(hdrKey string) bool
- func SetHttpProxyRealServerHostPortHeaderKey(hdrKey string) bool
- func SetHttpProxyRealServerProtoHeaderKey(hdrKey string) bool
- func Sh3a224(str string) string
- func Sh3a224B64(str string) string
- func Sh3a256(str string) string
- func Sh3a256B64(str string) string
- func Sh3a384(str string) string
- func Sh3a384B64(str string) string
- func Sh3a512(str string) string
- func Sh3a512B64(str string) string
- func Sh3aByt224(src []byte) []byte
- func Sh3aByt224B64(src []byte) []byte
- func Sh3aByt256(src []byte) []byte
- func Sh3aByt256B64(src []byte) []byte
- func Sh3aByt384(src []byte) []byte
- func Sh3aByt384B64(src []byte) []byte
- func Sh3aByt512(src []byte) []byte
- func Sh3aByt512B64(src []byte) []byte
- func Sha1(str string) string
- func Sha1B64(str string) string
- func Sha224(str string) string
- func Sha224B64(str string) string
- func Sha256(str string) string
- func Sha256B64(str string) string
- func Sha384(str string) string
- func Sha384B64(str string) string
- func Sha512(str string) string
- func Sha512B64(str string) string
- func ShaByt1(src []byte) []byte
- func ShaByt1B64(src []byte) []byte
- func ShaByt224(src []byte) []byte
- func ShaByt224B64(src []byte) []byte
- func ShaByt256(src []byte) []byte
- func ShaByt256B64(src []byte) []byte
- func ShaByt384(src []byte) []byte
- func ShaByt384B64(src []byte) []byte
- func ShaByt512(src []byte) []byte
- func ShaByt512B64(src []byte) []byte
- func SmartArrToList(arr []string, sepSpaces bool) string
- func SmartListToArr(list string, noSpaces bool) []string
- func SmtpSetDefaultConfig(mxDomain string, host string, port uint16, tlsMode string, authType string, ...) error
- func StartCmd(additionalEnv string, inputStdin string, theExe string, theArgs ...string) (isSuccess bool, errMsg error, stdoutRdr io.ReadCloser, stderrRdr io.ReadCloser, ...)
- func StrChunkSplit(body string, chunklen uint, end string) string
- func StrContains(str string, part string) bool
- func StrCreateHtmId(s string) string
- func StrCreateJsVarName(s string) string
- func StrCreateSlug(s string) string
- func StrCreateStdVarName(s string) string
- func StrDeaccent(s string) string
- func StrEndsWith(str string, part string) bool
- func StrIContains(str string, part string) bool
- func StrIEndsWith(str string, part string) bool
- func StrIPos(haystack string, needle string, binary bool) int
- func StrIReplaceAll(s string, part string, replacement string) string
- func StrIReplaceWithLimit(s string, part string, replacement string, limit int) string
- func StrIStartsWith(str string, part string) bool
- func StrLen(str string) int
- func StrMBSubstr(s string, start int, stop int) string
- func StrNormalizeSpaces(s string) string
- func StrPad2LenLeft(s string, padStr string, overallLen int) string
- func StrPad2LenRight(s string, padStr string, overallLen int) string
- func StrPos(haystack string, needle string, binary bool) int
- func StrRIPos(haystack string, needle string, binary bool) int
- func StrRPos(haystack string, needle string, binary bool) int
- func StrRegex2FindAllMatches(mode string, rexp string, s string, maxRecursion uint32, maxTimeOut uint8) ([][]string, error)
- func StrRegex2FindFirstMatch(mode string, rexp string, s string, maxTimeOut uint8) ([]string, error)
- func StrRegexCallbackReplaceAll(rexpr string, str string, replFx func(mgroups []string) string) string
- func StrRegexCallbackReplaceWithLimit(rexpr string, str string, replFx func(mgroups []string) string, limit int) string
- func StrRegexFindAllMatches(rexp string, s string, maxRecursion uint32) ([][]string, error)
- func StrRegexFindFirstMatch(rexp string, s string) ([]string, error)
- func StrRegexMatch(rexpr string, s string) bool
- func StrRegexReplaceAll(rexpr string, s string, repl string) string
- func StrRegexReplaceFirst(rexpr string, s string, repl string) string
- func StrRepeat(str string, count int) string
- func StrReplaceAll(s string, part string, replacement string) string
- func StrReplaceWithLimit(s string, part string, replacement string, limit int) string
- func StrRev(s string) string
- func StrSpnChr(s string, c rune, ofs uint32, length uint32) uint32
- func StrStartsWith(str string, part string) bool
- func StrSubstr(s string, start int, stop int) string
- func StrToLower(str string) string
- func StrToUpper(str string) string
- func StrToValidUTF8Fix(s string) string
- func StrTr(str string, replace map[string]string) string
- func StrTrim(s string, cutset string) string
- func StrTrimLeft(s string, cutset string) string
- func StrTrimLeftWhitespaces(s string) string
- func StrTrimRight(s string, cutset string) string
- func StrTrimRightWhitespaces(s string) string
- func StrTrimWhitespaces(s string) string
- func StrUcFirst(s string) string
- func StrUcWords(s string) string
- func StrUnicodeLen(str string) int
- func StrWordCount(str string) []string
- func TextCutByLimit(s string, length int) string
- func ThreefishDecryptCBC(str string, key string, useArgon2id bool) string
- func ThreefishDecryptTwofishBlowfishCBC(str string, key string, useArgon2id bool) string
- func ThreefishEncryptCBC(str string, key string, useArgon2id bool, randomize bool) string
- func ThreefishEncryptTwofishBlowfishCBC(str string, key string, useArgon2id bool, randomize bool) string
- func TimeNowLocal() int64
- func TimeNowUtc() int64
- func TimeUnixNanoMathRandHandler() *mrand.Rand
- func TwofishDecryptBlowfishCBC(str string, key string) string
- func TwofishDecryptCBC(str string, key string) string
- func TwofishEncryptBlowfishCBC(str string, key string, randomize bool) string
- func TwofishEncryptCBC(str string, key string, randomize bool) string
- func UInt64ToHex(num uint64) string
- func UnEscapeHtml(s string) string
- func ValidateCookieName(cookieName string) bool
- func ValidateIPAddrList(ipList string) error
- func WaitCmd(cmd *exec.Cmd) error
- func XmlConvertToJson(xmlData string) (string, error)
- func XmlEncode(data interface{}, prettyprint bool, includeHeader bool) (string, error)
- func XmlNoErrChkEncode(data interface{}, prettyprint bool, includeHeader bool) string
- func YamlDataCompose(yamlMap map[string]interface{}) (yamlData string, errMsg error)
- func YamlDataParse(yamlData string) (yamlMap map[string]interface{}, errMsg error)
- type AuthDataProvider
- func (p *AuthDataProvider) Init(name string) error
- func (p *AuthDataProvider) IsInitialized() (bool, error)
- func (p *AuthDataProvider) ParseAndValidateAuthTokenRecord(authUserName string, authUserToken string, ...) (AuthUserToken, error)
- func (p *AuthDataProvider) ParseAndValidateAuthUserRecord(authUserName string, arrUserRecord map[string]interface{}) (AuthUserRecord, error)
- func (p *AuthDataProvider) SetError(err error) bool
- type AuthDataStruct
- func AuthDataInit(ok bool, errMsg string, method uint8, area string, realm string, userID string, ...) AuthDataStruct
- func AuthUserPassDefaultCheck(authRealm string, user string, pass string, authMode uint8, ...) (bool, AuthDataStruct)
- func AuthUserTokenDefaultCheck(authRealm string, user string, token string, authMode uint8, ...) (bool, AuthDataStruct)
- type AuthProvider
- type AuthUserRecord
- type AuthUserToken
- type MailMessageStruct
- type SMarkdownParser
- type SmtpConfig
Constants ¶
const ( SEPARATOR_SFZ_CHECKSUM_V1 string = "#CHECKSUM-SHA1#" // compatibility, v1 SEPARATOR_SFZ_CHECKSUM_V2 string = "#CKSUM256#" // compatibility, v2 SEPARATOR_SFZ_CHECKSUM_V3 string = "#CKSUM384V3#" // current, v3 SIGNATURE_SFZ_DATA_ARCH_V1 string = "PHP.SF.151129/B64.ZLibRaw.HEX" // compatibility, v1, unarchive only SIGNATURE_SFZ_DATA_ARCH_V2 string = "SFZ.20210818/B64.ZLibRaw.hex" // compatibility, v2, unarchive only SIGNATURE_SFZ_DATA_ARCH_V3 string = "[SFZ.20231031/B64.ZLibRaw.hex]" // current, v3 ; archive + unarchive )
const ( // {{{SYNC-AUTH-PASS-ALGOS}}} ALGO_PASS_NONE uint8 = 0 ALGO_PASS_PLAIN uint8 = 1 ALGO_PASS_SMART_SAFE_SF_PASS uint8 = 77 ALGO_PASS_SMART_SAFE_ARGON_PASS uint8 = 78 ALGO_PASS_SMART_SAFE_BCRYPT uint8 = 123 ALGO_PASS_SMART_SAFE_OPQ_TOKEN uint8 = 204 // Opaque Token ALGO_PASS_SMART_SAFE_WEB_TOKEN uint8 = 216 // Web (Signed) Token / JWT ALGO_PASS_CUSTOM_TOKEN uint8 = 244 // other, custom implementations of token logic ALGO_PASS_CUSTOM_HASH_PASS uint8 = 255 // other, custom implementations of pass hashing // {{{SYNC-AUTH-MODES}}} HTTP_AUTH_MODE_NONE uint8 = 0 HTTP_AUTH_MODE_BASIC uint8 = 1 HTTP_AUTH_MODE_TOKEN uint8 = 28 HTTP_AUTH_MODE_BEARER uint8 = 29 HTTP_AUTH_MODE_COOKIE uint8 = 129 HTTP_AUTH_MODE_APIKEY uint8 = 229 HTTP_AUTH_MODE_RAW uint8 = 255 // used for 3rd party HTTP_AUTH_DEFAULT_AREA string = "[DEFAULT]" // this is a special area, surrounded by [] ; any other areas must allow just: A-Z 0-9 - HTTP_AUTH_DEFAULT_PRIV string = "<default>" // must include only (one) the default privilege for a valid user, not admin ; NOT FOR external JWT Auth HTTP_AUTH_ADMIN_PRIV string = "<admin>" // must include only (one) the admin privilege for a valid user, admin ; NOT FOR external JWT Auth HTTP_AUTH_DEFAULT_RESTR string = "<none>" // must include only (one) the default restriction for a valid user, not admin ; NOT FOR external JWT Auth REGEX_SAFE_AUTH_AREA string = `^[A-Z0-9\-\.]{4,48}` // this must not allow [] to conflict with the default area ; {{{SYNC-AUTH-EXT-AREA-REGEX}}} REGEX_VALID_PRIV_RESTR_KEY string = `^([a-z]{1}[a-z0-9\-\:]{0,20}[a-z0-9]{1})$` // valid name for one privilege key from list of privileges ; a valid privilege key can have 2..22 characters and can contain only: `a-z`, `0-9`, `:` and `-` ; must start with `a-z` only ; must not end with `:` or `-` REGEX_SAFE_HTTP_USER_NAME string = `^[a-z0-9\.]{5,25}$` // Safe HTTP Auth UserName Regex ; intended as a safe user ID for all cases REGEX_SAFE_AUTH_EMAIL_ADDRESS string = `^[_a-z0-9\-\.]{1,41}@[a-z0-9\-\.]{3,30}$` // Safe Auth Email regex ; internet email@(subdomain.)domain.name ; max 72 ; practical REGEX_SAFE_AUTH_USER_NAME string = `^[_a-z0-9\-\.@]{5,72}$` // Safe Auth Username Regex ; cover boths above REGEX_SAFE_AUTH_OPAQUE_TOKEN string = `^[a-zA-Z0-9\-]{44,126}$` // Safe (Opaque) Token Regex ; {{{SYNC-MAX-AUTH-TOKEN-LENGTH}}} REGEX_SAFE_AUTH_2FA_CODE string = `^[0-9]{6,8}$` // Safe 2FA Regex 6..8 digits OPAQUE_TOKEN_FULL_NAME string = "Opaque:UUID" HTTP_AUTH_USER_TOKEN string = "@TOKEN@" // used for http client to add header: `Authorization: Token ****` where `****` is the opaque token HTTP_AUTH_USER_BEARER string = "@BEARER@" // used for http client to add header: `Authorization: Bearer ****` where `****` is the jwt signed token HTTP_AUTH_USER_APIKEY string = "@APIKEY@" // used for http client to add header: `Authorization: Apikey ****` where `****` is the external jwt signed token for non-existing accounts HTTP_AUTH_USER_RAW string = "@RAW@" // used for http client to add custom header like: `Authorization: %Custom% ****` where `%Custom% ****` is the password ; ex: `Authorization: OAuth ****` )
const ( SIGNATURE_3FISH_1K_V1_DEFAULT string = "3f1kD.v1!" // 3F ; current, v1 1024 (default) ; encrypt + decrypt SIGNATURE_3FISH_1K_V1_ARGON2ID string = "3f1kA.v1!" // 3F ; current, v1 1024 (argon2id) ; encrypt + decrypt SIGNATURE_3FISH_1K_V1_2FBF_D string = "3ffb2kD.v1!" // 3F ; current, v1 1024 (default+twofish/256+blowfish/448) ; encrypt + decrypt SIGNATURE_3FISH_1K_V1_2FBF_A string = "3ffb2kA.v1!" // 3F ; current, v1 1024 (argon2id+twofish/256+blowfish/448) ; encrypt + decrypt SIGNATURE_2FISH_V1_DEFAULT string = "2f256.v1!" // 2F ; current, v1 256 (default) ; encrypt + decrypt SIGNATURE_2FISH_V1_BF_DEFAULT string = "2fb88.v1!" // 2F ; current, v1 256 (default+blowfish/448) ; encrypt + decrypt ; Blowfish 56 (448) + TwoFish 32 (256) = 88 (704) SIGNATURE_BFISH_V3 string = "bf448.v3!" // BF ; current, v3 448 ; encrypt + decrypt SIGNATURE_BFISH_V2 string = "bf448.v2!" // BF ; compatibility, v2 448 ; decrypt only SIGNATURE_BFISH_V1 string = "bf384.v1!" // BF ; compatibility, v1 384 ; decrypt only SEPARATOR_CRYPTO_CHECKSUM_V3 string = "#CKSUM512V3#" // current, v3 ; threefish, twofish, blowfish (v3) SEPARATOR_CRYPTO_CHECKSUM_V2 string = "#CKSUM256#" // compatibility, v2 ; blowfish v2 only SEPARATOR_CRYPTO_CHECKSUM_V1 string = "#CHECKSUM-SHA1#" // compatibility, v1 ; blowfish v1 only REGEX_SAFE_CRYPTO_PACKAGE_STR string = `^[a-zA-Z0-9\-_\.;\!]+$` // must allow characters and exclamation sign from the signature: B64s ; ! SALT_PREFIX string = "Smart Framework" // fixed salt prefix SALT_SEPARATOR string = "#" // fixed salt separator SALT_SUFFIX string = "スマート フレームワーク" // fixed salt suffix DERIVE_MIN_KLEN uint16 = 3 // Key Derive Min Length DERIVE_MAX_KLEN uint16 = 4096 // Key Derive Min Length DERIVE_PREKEY_LEN uint16 = 80 // Key Derive Pre-Key Length DERIVE_CENTITER_EK uint16 = 87 // Key Derive EK Iterations DERIVE_CENTITER_EV uint16 = 78 // Key Derive EV Iterations DERIVE_CENTITER_PW uint16 = 77 // Key Derive PW Iterations DERIVE_CENTITER_TK uint16 = 88 // Key Derive TK Iterations PASSWORD_PLAIN_MIN_LENGTH uint8 = 7 // Password Plain Min Lentgth PASSWORD_PLAIN_MAX_LENGTH uint8 = 55 // Password Plain Max Lentgth PASSWORD_HASH_LENGTH uint8 = 128 // fixed length ; {{{SYNC-AUTHADM-PASS-LENGTH}}} ; if lower then padd to right with * ; {{{SYNC-AUTHADM-PASS-PADD}}} PASSWORD_BHASH_LENGTH uint8 = 60 // fixed length ; bhash passwords PASSWORD_PREFIX_VERSION string = "$fPv3.7!" // {{{SYNC-AUTHADM-PASS-PREFIX}}} PASSWORD_PREFIX_A2ID_VERSION string = "a2idP37!" // go lang only (no PHP), curent v3, argon2id password ; must be the same length as PASSWORD_PREFIX_VERSION )
const ( //-- Time Zones TIME_ZONE_UTC string = "UTC" // UTC Time Zone Code //-- Time Zone Modes TZ_MODE_UTC string = TIME_ZONE_UTC // Time Zone Mode UTC TZ_MODE_LOCAL string = "LOCAL" // Time Zone Mode LOCAL //-- FIXED DATE CONSTANTS REFERENCE VALUES ... SYNCED WITH GO DATE STANDARDS ! DATE_TIME_DEFAULT_LOCAL_TIMEZONE string = TIME_ZONE_UTC // Default Local Time Zone: UTC DATE_TIME_FMT_ISO_NOTIME_GO_EPOCH string = "2006-01-02" // GO EPOCH: NO TIME, NO TZ OFFSET DATE_TIME_FMT_ISO_STD_GO_EPOCH string = "2006-01-02 15:04:05" // GO EPOCH: WITH TIME, NO TZ OFFSET DATE_TIME_FMT_ISO_TZOFS_GO_EPOCH string = "2006-01-02 15:04:05 -0700" // GO EPOCH: WITH TIME, WITH TZ OFFSET DATE_TIME_FMT_RFC1123_GO_EPOCH string = "Mon, 02 Jan 2006 15:04:05" // GO EPOCH: RFC1123 DATE_TIME_FMT_CONDENSED string = "20060102150405" // GO EPOCH: WITH TIME, NO TZ OFFSET, CONDENSED )
const ( REGEX_SAFE_HEX_STR string = `^[0-9a-f]+$` // as the go have internal, all lowercase REGEX_SAFE_B64_STR string = `^[a-zA-Z0-9\+\/\=]+$` REGEX_SAFE_B64S_STR string = `^[a-zA-Z0-9\-_\.]+$` )
const ( CHOWN_DIRS os.FileMode = 0755 CHOWN_FILES os.FileMode = 0644 //-- Cross Platform Safe Paths ; The following are disallowed in Windows paths: `< > : " / \ | ? *` ; also disallow SPACE because of the web context REGEX_SAFE_PATH_NAME string = `^[_a-zA-Z0-9\-\.@#\/` + "`" + `~\!\$%&\(\)\^\{\}'` + `\[\],;\+` + `]+$` // SAFETY: SAFE Cross Platform Character Set for FileSystems: Smart + MsDOS + Linux/Unix + Windows (intersect) REGEX_SAFE_FILE_NAME string = `^[_a-zA-Z0-9\-\.@#` + "`" + `~\!\$%&\(\)\^\{\}'` + `\[\],;\+` + `]+$` // SAFETY: SAFE Cross Platform Character Set for FileSystems: Smart + MsDOS + Linux/Unix + Windows (intersect) ; like above, just missing slash / //-- Web Ultra-Safe Paths (Smart) REGEX_SMART_SAFE_PATH_NAME string = `^[_a-zA-Z0-9\-\.@#\/]+$` // SAFETY: SUPPORT ONLY THESE CHARACTERS IN FILE SYSTEM PATHS ... REGEX_SMART_SAFE_FILE_NAME string = `^[_a-zA-Z0-9\-\.@#]+$` // SAFETY: SUPPORT ONLY THESE CHARACTERS IN FILE SYSTEM FILE AND DIR NAMES ... ; like above, just missing slash / MAX_PATH_LENGTH int = 1024 // path can be up to 4096 characters, safe is 1024 to be cross platform MAX_FILENAME_LENGTH int = 255 // file can be up to 512 characters, safe is 255 to be cross platform FILE_WRITE_MODE_DEFAULT string = "w" // write FILE_WRITE_MODE_APPEND string = "a" // append INVALID_ABSOLUTE_PATH string = "/tmp/go-invalid-path/err-absolute-path/" INVALID_HOMEDIR_PATH string = "/tmp/go-invalid-path/err-user-home-dir/" )
const ( SMTP_TLS_STARTTLS string = "STARTTLS" SMTP_TLS_OPTIONAL_STARTTLS string = "STARTTLS/OPTIONAL" SMTP_SSL_TLS string = "SSL" SMTP_NO_TLS_NO_SSL string = "NOTLS/NOSSL" MAIL_ENCODING_B64 string = "B64" MAIL_ENCODING_QP string = "QP" MAIL_ENCODING_8BIT string = "8BIT" )
const ( MAX_DOC_SIZE_VALIDATE_HTML uint64 = SIZE_BYTES_16M * 4 // {{{SYNC-HTML-VALIDATOR-MAX-SIZE}}} ; 64MB MAX_DOC_SIZE_MARKDOWN uint64 = SIZE_BYTES_16M // {{{SYNC-MARKDOWN-MAX-SIZE}}} ; 16MB REGEX_HTML_LITERAL_ENTITY string = `(?i)&([a-z]+);` REGEX_HTML_NUMERIC_ENTITY string = `(?i)&\#(x?[a-f0-9]+);` REGEX_HTML_ANY_ENTITY string = `(?i)&\#?(x?[a-z0-9]+);` )
const ( REGEX_SAFE_VAR_NAME string = `^[_a-zA-Z0-9]+$` // Safe VarName Regex REGEX_SMART_SAFE_BASE_PATH string = `^[_a-z0-9\-\/]+$` // CONFORMANCE: SUPPORT ONLY THESE CHARACTERS IN HTML BASE PATHS REGEX_SMART_SAFE_NET_HOSTNAME string = `^[_a-z0-9\-\.]+$` // SAFETY: SUPPORT ONLY THESE CHARACTERS IN NET HOST NAMES AS RFC ; if a hostname have upper characters must be converted to all lower characters ; if a hostname have unicode characters must be converted using punnycode ... REGEX_SMART_SAFE_HTTP_HEADER_KEY string = `^[A-Za-z0-9\-]+$` // SAFETY: SUPPORT ONLY THESE CHARACTERS IN HEADER KEY VALUES REGEX_SMART_SAFE_EMAIL_ADDRESS string = `^[_a-zA-Z0-9\-\.\+~]{1,63}@[a-z0-9\-\.]{3,63}$` // internet email@(subdomain.)domain.name REGEX_SMART_SAFE_NET_USERNAME string = `^[_a-zA-Z0-9\-\.\+~@]{3,127}$` // general characters accepted in a username MAX_HOSTNAME_FULL_LENGTH int = 253 // The entire hostname, including the delimiting dots, has a maximum of 253 ASCII characters MAX_HOSTNAME_SEGMENT_LENGTH int = 63 // For example, "en.wikipedia.org" is a hostname. Each label must be 1 to 63 octets long HTTP_PROTO_PREFIX_HTTP string = "http://" HTTP_PROTO_PREFIX_HTTPS string = "https://" DATA_URL_EMPTY_PREFIX string = "data:," DATA_URL_CSS_PREFIX string = "data:text/css," DATA_URL_JS_PREFIX string = "data:application/javascript," DATA_URL_SVG_IMAGE_PREFIX string = "data:image/svg+xml," DEFAULT_FAKE_IP_CLIENT string = "0.0.0.0" DEFAULT_FAKE_HOSTPORT_SERVER string = "256.256.256.256:65535" DEFAULT_BROWSER_UA string = "NetSurf/3.11 (Sf/Go)" )
const ( REGEX_STR_IS_NUMERIC_UINTEGER = `[0-9]+` REGEX_STR_IS_NUMERIC_INTEGER = `[0-9\-]+` REGEX_STR_IS_NUMERIC_DEFAULT = `[0-9\.\-]+` REGEX_STR_IS_NUMERIC_EXTENDED = `[0-9\.\-, ]+` // includes decimal separators: , or space )
const ( REGEXP2_DEFAULT_MAX_RECURSION uint32 = 1000000 // Default REGEXP2 Recursion Limit: 1 million REGEXP2_DEFAULT_MAX_TIMEOUT uint8 = 1 // Default REGEXP2 Max Timeout 1 Second(s) )
const ( CMD_EXEC_HAMMER_SIGNATURE string = "[»»»»»»»[SmartGo:{!HAMMER!}:Abort:(Exit):KILL.SIGNAL]«««««««]" // INTERNAL FLAG FOR CMD FORCE EXIT HAMMER CMD_EXEC_TIMED_MAX_TIMEOUT uint = 86400 )
const ( SPECIAL_TRIM string = "\n\r\x00\x0B" // {{{SYNC-TPL-FIX-TRIM-PARTS}}} UNDEF_VAR_NAME string = "Undef____V_a_r" MTPL_FILE_EXTENSION string = ".mtpl.htm" MAX_DOC_SIZE_TPL uint64 = SIZE_BYTES_16M // {{{SYNC-TPL-MAX-SIZE}}} ; 16MB )
const ( VERSION string = "v.20250118.2358" NAME string = "SmartGo" DESCRIPTION string = "Smart.Framework.Go" COPYRIGHT string = "(c) 2021-present unix-world.org" CHARSET string = "UTF-8" // DO NOT CHANGE !! This is mandatory ... INVALID_CHARACTER string = "\uFFFD" // Invalid UTF-8 character that will be used for UTF-8 Valid Fix: � NULL_BYTE string = "\x00" // THE NULL BYTE character \x00 or \000 BACK_SPACE string = "\b" // The Backspace Character \b ASCII_BELL string = "\a" // The ASCII Bell Character \a FORM_FEED string = "\f" // The Form Feed Character \f or \x0C VERTICAL_TAB string = "\v" // The Vertical Tab character \v or \x0B HORIZONTAL_TAB string = "\t" // The Horizontal Tab character \t LINE_FEED string = "\n" // The Line Feed character \n CARRIAGE_RETURN string = "\r" // The Carriage Return character \r TRIM_WHITESPACES string = " \t\n\r\x00\x0B" // Ultra Wide Compatibility (Javascript / PHP) REGEX_ASCII_ANDSPACE_CHARACTERS string = `^[[:graph:] \t\r\n]+$` // match all ASCII safe printable characters ; allow extra: space, tab, line feed, carriage return REGEX_ASCII_NOSPACE_CHARACTERS string = `^[[:graph:]]+$` // match all ASCII safe printable characters except spaces )
const (
LOG_MAX_MSG_LEN uint16 = 65535 // max log message length
)
const (
REGEX_SAFE_APP_NAMESPACE string = `^[_a-z0-9\-\.]+$` // Safe App Namespace Regex
)
const (
REGEX_SMART_SAFE_NUMBER_FLOAT string = `^[0-9\-\.]+$` // SAFETY: SUPPORT ONLY THESE CHARACTERS IN SAFE FLOAT (ex: JSON)
)
const (
SIZE_BYTES_16M uint64 = 16777216 // Reference Unit
)
Variables ¶
var (
DEBUG bool = false
)
Functions ¶
func AddCSlashes ¶
func AppGetNamespace ¶
func AppGetRunInBackground ¶
func AppGetRunInBackground() bool
func AppGetSecurityKey ¶
func AppSetNamespace ¶
func AppSetRunInBackground ¶
func AppSetRunInBackground() bool
func AppSetSecurityKey ¶
func ArrMapKeyExists ¶
func ArrMapKeyExists[C comparable, A any](v C, arr map[C]A) bool
func Auth2FACookieIsEnabled ¶
func Auth2FACookieIsEnabled() bool
func Auth2FACookieNameGet ¶
func Auth2FACookieNameGet() string
func Auth2FACookieNameSet ¶
func AuthAnyIsEnabled ¶
func AuthAnyIsEnabled() bool
func AuthApikeyIsEnabled ¶
func AuthApikeyIsEnabled() bool
func AuthApikeyModeSet ¶
func AuthBasicIsEnabled ¶
func AuthBasicIsEnabled() bool
func AuthBasicModeSet ¶
func AuthBearerIsEnabled ¶
func AuthBearerIsEnabled() bool
func AuthBearerModeSet ¶
func AuthCookieIsEnabled ¶
func AuthCookieIsEnabled() bool
func AuthCookieNameGet ¶
func AuthCookieNameGet() string
func AuthCookieNameSet ¶
func AuthGetMetaData ¶
func AuthGetMetaData(authData AuthDataStruct, key string) (string, error)
func AuthIsValid2FACode ¶
func AuthIsValidExtArea ¶
func AuthIsValidExtUserName ¶
func AuthIsValidPassword ¶
func AuthIsValidPrivKey ¶
func AuthIsValidPubKey ¶
func AuthIsValidSecurityKey ¶
func AuthIsValidTokenOpaque ¶
func AuthIsValidUserEmail ¶
func AuthIsValidUserName ¶
func AuthMethodGetNameById ¶
func AuthSafeCompare ¶
func AuthSafeListPrivsRestr ¶
conforms list `<one>, <two>` to a safe one
func AuthSafeTestPrivsRestr ¶
test if priv or restr `one` is in list `<one>,<two>`
func AuthTokenIsEnabled ¶
func AuthTokenIsEnabled() bool
func AuthTokenModeSet ¶
func Base64BytDecode ¶
func Base64BytEncode ¶
func Base64BytToBase64s ¶
func Base64BytToBase64u ¶
func Base64Decode ¶
func Base64Encode ¶
func Base64ToBase64s ¶
func Base64ToBase64u ¶
func Base64sBytDecode ¶
func Base64sBytEncode ¶
func Base64sBytToBase64 ¶
func Base64sDecode ¶
func Base64sEncode ¶
func Base64sToBase64 ¶
func Base64uBytToBase64 ¶
func Base64uToBase64 ¶
func BaseDecode ¶
func BaseEncode ¶
func Bin2BytHex ¶
func BlowfishDecryptCBC ¶
func BytContains ¶
func BytEndsWith ¶
func BytIContains ¶
func BytIEndsWith ¶
func BytIPos ¶
case insensitive, find position of first occurrence of a byte slice in another byte slice ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func BytIReplaceAll ¶
case insensitive replacer
func BytIReplaceWithLimit ¶
case insensitive replacer
func BytIStartsWith ¶
func BytPos ¶
case sensitive, find position of first occurrence of a byte slice in another byte slice ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func BytRIPos ¶
case insensitive, find position of last occurrence of a byte slice in another byte slice ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func BytRPos ¶
case sensitive, find position of last occurrence of a byte slice in another byte slice ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func BytRegexFindAllMatches ¶
func BytRegexMatch ¶
func BytReplaceAll ¶
case sensitive replacer
func BytReplaceWithLimit ¶
case sensitive replacer
func BytStartsWith ¶
func BytToLower ¶
func BytToUpper ¶
func BytToValidUTF8Fix ¶
func BytTrimLeft ¶
func BytTrimLeftWhitespaces ¶
func BytTrimRight ¶
func BytTrimRightWhitespaces ¶
func BytTrimWhitespaces ¶
func BytesConcatenate ¶
func BytesEqual ¶
func BytesIEqual ¶
func BytesToExaBytes ¶
func BytesToGigaBytes ¶
func BytesToKiloBytes ¶
func BytesToMegaBytes ¶
func BytesToPetaBytes ¶
func BytesToTeraBytes ¶
func CipherDecryptCBC ¶
IMPORTANT: the output must be trimmed for the padding added when encrypted ; expects B64 data, so trim is OK !
func CipherEncryptCBC ¶
IMPORTANT: the input will be padded ; expects B64 data !
func ClearPrintTerminal ¶
func ClearPrintTerminal()
set terminal theme Dark (bg:black ; fg:white) : print("\033[0;37;40m")
func ConvertBoolToStr ¶
func ConvertBoolsToStr ¶
func ConvertFloat32ToStr ¶
func ConvertFloat64ToStr ¶
func ConvertInt16ToStr ¶
func ConvertInt32ToStr ¶
func ConvertInt64ToStr ¶
func ConvertInt8ToStr ¶
func ConvertIntToStr ¶
func ConvertJsonNumberToStr ¶
func ConvertJsonNumberToStr(data interface{}) string
func ConvertUInt16ToStr ¶
func ConvertUInt32ToStr ¶
func ConvertUInt64ToStr ¶
func ConvertUInt8ToStr ¶
func ConvertUIntToStr ¶
func CurrentFunctionName ¶
func CurrentFunctionName() string
func CurrentOSArch ¶
func CurrentOSArch() string
func CurrentOSName ¶
func CurrentOSName() string
func CurrentRuntimeVersion ¶
func CurrentRuntimeVersion() string
func DataArchive ¶
func DataRRot13 ¶
func DataUnArchive ¶
func DateFromStr ¶
func DateFromTime ¶
func DateFromUnixTimeLocal ¶
func DateFromUnixTimeUtc ¶
func DateIsoFromTime ¶
func DateIsoFromUnixTimeUtc ¶
func DateNoTimeFromTime ¶
func DateNowIsoLocal ¶
func DateNowIsoLocal() string
func DateNowIsoUtc ¶
func DateNowIsoUtc() string
func DateNowLocal ¶
func DateNowLocal() string
func DateNowNoTimeLocal ¶
func DateNowNoTimeLocal() string
func DateNowNoTimeUtc ¶
func DateNowNoTimeUtc() string
func DateNowUtc ¶
func DateNowUtc() string
func DateTimeGetLocation ¶
func DateTimeGetLocation() string
func DateTimeSetLocation ¶
func DateTimeStructLocal ¶
func DateTimeStructLocal(dateIsoStr string) uxmDateTimeStruct
func DateTimeStructUtc ¶
func DateTimeStructUtc(dateIsoStr string) uxmDateTimeStruct
func EscapeHtml ¶
func ExecCmd ¶
func ExecCmd(captureStdout string, captureStderr string, additionalEnv string, inputStdin string, theExe string, theArgs ...string) (isSuccess bool, outStd string, errStd string)
execute command and after it finalizes it returns the output
func ExecTimedCmd ¶
func ExecTimedCmd(stopTimeout uint, captureStdout string, captureStderr string, additionalEnv string, inputStdin string, theExe string, theArgs ...string) (isSuccess bool, outStd string, errStd string)
execute a command with timeout and after it finalizes or timeouts it returns the output
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶
GenerateRandomString returns a securely generated random string [1..65535]. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateSSHKeyPairEd25519 ¶
return: err, pubKeyPEM, privKeyPEM
func GetBaseDomainFromDomain ¶
func GetCookieDefaultDomain ¶
func GetCookieDefaultDomain() string
func GetCookieDefaultSameSitePolicy ¶
func GetCookieDefaultSameSitePolicy() string
func GetCurrentUserHomeDir ¶
func GetHttpDomainAndPortFromRequest ¶
domain can be: domain or IPv4 / IPv6
func GetHttpPathFromRequest ¶
returns: `/` or `/path/extra` or `/path/extra/`
func GetHttpProtocolFromRequest ¶
returns: `http://` or `https://`
func GetHttpProxyBasePath ¶
func GetHttpProxyBasePath() string
func GetHttpProxyRealClientIpHeaderKey ¶
func GetHttpProxyRealClientIpHeaderKey() string
func GetHttpProxyRealServerHostPortHeaderKey ¶
func GetHttpProxyRealServerHostPortHeaderKey() string
func GetHttpProxyRealServerProtoHeaderKey ¶
func GetHttpProxyRealServerProtoHeaderKey() string
func GetHttpQueryStringFromRequest ¶
returns: “ or `?` or `?a` or `?a=` or `?a=b` or `?a=b&` or `?a=b&c` or `?a=b&c=` or `?a=b&c=d`
func HTMLCodeFixSanitize ¶
func HTMLCodeFixValidate ¶
func HTMLCodeStripTags ¶
func HTMLDecodeEntities ¶
func HandleAbortCtrlC ¶
func HandleAbortCtrlC(delay uint32)
func Hex2BytBin ¶
func HttpSessionUUIDCookieIsEnabled ¶
func HttpSessionUUIDCookieIsEnabled() bool
func HttpSessionUUIDCookieNameGet ¶
func HttpSessionUUIDCookieNameGet() string
func InListArr ¶
func InListArr[C comparable](v C, arr []C) bool
func IniContentParse ¶
func IsNetValidHostName ¶
func IsNetValidIpAddr ¶
func IsNetValidPortNum ¶
func IsNetValidPortStr ¶
func IsValidHttpHeaderKey ¶
func JsonArrDecode ¶
func JsonEncode ¶
func JsonGetValueByKeysPath ¶
func JsonNoErrChkEncode ¶
func JsonObjDecode ¶
func JsonScalarDecodeToStr ¶
func JsonStrDecode ¶
func LogToConsole ¶
func LogToStdErr ¶
func LogToStdErr(level string)
func LogUseLocalTime ¶
func LogUseLocalTime()
func LogUseUtcTime ¶
func LogUseUtcTime()
func MarkdownToHTMLRender ¶
func MarkersTplEscapeTpl ¶
func MarkersTplRender ¶
func MemoryStats ¶
func NanoTimeRandInt63N ¶
func NanoTimeRandIntN ¶
func NullableStrFromStr ¶
func NullableStrToStr ¶
func ParseBoolStrAsBool ¶
func ParseStrAsFloat64 ¶
func ParseStrAsInt64 ¶
func ParseStrAsUInt64 ¶
func PathAddDirLastSlash ¶
func PathBaseExtension ¶
func PathBaseName ¶
func PathBaseNoExtName ¶
func PathDirName ¶
func PathExists ¶
func PathGetCurrentExecutableDir ¶
func PathGetCurrentExecutableDir() string
func PathGetCurrentExecutableName ¶
func PathGetCurrentExecutableName() string
func PathGetCurrentExecutablePathAndName ¶
func PathGetCurrentExecutablePathAndName() string
func PathIsAbsolute ¶
func PathIsBackwardUnsafe ¶
func PathIsEmptyOrRoot ¶
func PathIsFile ¶
func PathIsSafeValidFileName ¶
func PathIsSafeValidPath ¶
func PathIsSafeValidSafePath ¶
func Pbkdf2DerivedKey ¶
func Pbkdf2PreDerivedKey ¶
func PlaceholdersTplRender ¶
func PrettyPrintBytes ¶
func RawUrlDecode ¶
func RawUrlEncode ¶
func RenderMarkersFileTpl ¶
func SafeChecksumHashSmart ¶
func SafePassHashSmart ¶
func SafePassHashSmartVerify ¶
func SafePathDirCreate ¶
func SafePathDirDelete ¶
func SafePathDirRename ¶
func SafePathDirScan ¶
func SafePathEmbedDirScan ¶
func SafePathEmbedDirScan(efs *embed.FS, dirPath string, recursive bool) (isSuccess bool, err error, arrDirs []string, arrFiles []string)
ex call (req. go ambed fs assets): SafePathEmbedDirScan(&assets, "assets/", true)
func SafePathFileCopy ¶
func SafePathFileDelete ¶
func SafePathFileGetSize ¶
func SafePathFileMd5 ¶
func SafePathFileRead ¶
func SafePathFileRename ¶
func SafePathFileSha ¶
func SafePathFileWrite ¶
func SafePathFixClean ¶
func SafePathFixSeparator ¶
this is a safer replacement for filepath.ToSlash(p), because is not OS Context Aware
func SafePathGetMTime ¶
func SendSmtpEmail ¶
func SendSmtpEmail(smtpConf SmtpConfig, mailMsgStruct MailMessageStruct) error
func SetCookieDefaultDomain ¶
func SetHttpProxyBasePath ¶
func Sh3a224B64 ¶
func Sh3a256B64 ¶
func Sh3a384B64 ¶
func Sh3a512B64 ¶
func Sh3aByt224 ¶
func Sh3aByt224B64 ¶
func Sh3aByt256 ¶
func Sh3aByt256B64 ¶
func Sh3aByt384 ¶
func Sh3aByt384B64 ¶
func Sh3aByt512 ¶
func Sh3aByt512B64 ¶
func ShaByt1B64 ¶
func ShaByt224B64 ¶
func ShaByt256B64 ¶
func ShaByt384B64 ¶
func ShaByt512B64 ¶
func SmartArrToList ¶
converts arr['one', 'two'] to list `<one>, <two>`
func SmartListToArr ¶
converts list `<one>, <two>` to arr['one', 'two']
func SmtpSetDefaultConfig ¶
func StartCmd ¶
func StartCmd(additionalEnv string, inputStdin string, theExe string, theArgs ...string) (isSuccess bool, errMsg error, stdoutRdr io.ReadCloser, stderrRdr io.ReadCloser, cmd *exec.Cmd)
starts a command to be used with WaitCmd() -> KillCmd()
func StrChunkSplit ¶
ChunkSplit chunk_split()
func StrContains ¶
func StrCreateHtmId ¶
func StrCreateJsVarName ¶
func StrCreateSlug ¶
func StrCreateStdVarName ¶
func StrDeaccent ¶
func StrEndsWith ¶
func StrIContains ¶
func StrIEndsWith ¶
func StrIPos ¶
case insensitive, find position of first occurrence of string in a string ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func StrIReplaceAll ¶
case insensitive replacer
func StrIReplaceWithLimit ¶
case insensitive replacer
func StrIStartsWith ¶
func StrNormalizeSpaces ¶
func StrPos ¶
case sensitive, find position of first occurrence of string in a string return -1 if can not find the substring or the position of needle in haystack
func StrRIPos ¶
case insensitive, find position of last occurrence of string in a string ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func StrRPos ¶
case sensitive, find position of last occurrence of string in a string ; PHP compatible return -1 if can not find the substring or the position of needle in haystack
func StrRegex2FindAllMatches ¶
func StrRegex2FindFirstMatch ¶
func StrRegexFindAllMatches ¶
func StrRegexMatch ¶
func StrReplaceAll ¶
case sensitive replacer
func StrReplaceWithLimit ¶
case sensitive replacer
func StrStartsWith ¶
func StrToLower ¶
func StrToUpper ¶
func StrToValidUTF8Fix ¶
func StrTrimLeft ¶
func StrTrimLeftWhitespaces ¶
func StrTrimRight ¶
func StrTrimRightWhitespaces ¶
func StrTrimWhitespaces ¶
func StrUcFirst ¶
func StrUcWords ¶
func TextCutByLimit ¶
func ThreefishDecryptCBC ¶
func ThreefishEncryptCBC ¶
func TimeNowLocal ¶
func TimeNowLocal() int64
func TimeNowUtc ¶
func TimeNowUtc() int64
func TwofishDecryptCBC ¶
func UInt64ToHex ¶
func ValidateCookieName ¶
func ValidateIPAddrList ¶
func WaitCmd ¶
wait for a command started with StartCmd() to finalize ; may be defered or executed async in order to call KillCmd after it
func XmlConvertToJson ¶
func XmlNoErrChkEncode ¶
func YamlDataCompose ¶
func YamlDataParse ¶
Types ¶
type AuthDataProvider ¶
type AuthDataProvider struct {
// contains filtered or unexported fields
}
func (*AuthDataProvider) Init ¶
func (p *AuthDataProvider) Init(name string) error
func (*AuthDataProvider) IsInitialized ¶
func (p *AuthDataProvider) IsInitialized() (bool, error)
func (*AuthDataProvider) ParseAndValidateAuthTokenRecord ¶
func (p *AuthDataProvider) ParseAndValidateAuthTokenRecord(authUserName string, authUserToken string, arrTokenRecord map[string]interface{}) (AuthUserToken, error)
func (*AuthDataProvider) ParseAndValidateAuthUserRecord ¶
func (p *AuthDataProvider) ParseAndValidateAuthUserRecord(authUserName string, arrUserRecord map[string]interface{}) (AuthUserRecord, error)
func (*AuthDataProvider) SetError ¶
func (p *AuthDataProvider) SetError(err error) bool
type AuthDataStruct ¶
type AuthDataStruct struct { OK bool `json:"ok"` // TRUE | FALSE ErrMsg string `json:"errMsg"` // error message (if any) or empty string Method uint8 `json:"method"` // see: HTTP_AUTH_MODE_* Area string `json:"area"` // Auth Area Realm string `json:"realm"` // Auth Realm UserID string `json:"userId"` // User ID (if no specific ID can be the same as User Name) ; it may be different than UserName ; UserID is intended only for internal use in contrast with UserName which is public UserName string `json:"userName"` // User Name PassHash string `json:"-"` // Password Hash PassAlgo uint8 `json:"-"` // Password Hash Algo ; 0 for SafePassHashSmart ; 1..255 for the rest RawAuthData string `json:"-"` // Auth Raw Data, reserved for special usage, ex: auth cookie pre-auth TokenData string `json:"-"` // Auth Token Data (Ex: JWT Token) TokenAlgo string `json:"-"` // Token Algo (Ex: `JWT:Ed448`) SecurityKey string `json:"-"` // Security Key PubKey string `json:"pubKey"` // Public Key PrivKey string `json:"-"` // Private Key Privileges string `json:"privileges"` // Privileges: <priv1>,<priv2>,... Restrictions string `json:"restrictions"` // Restrictions: <restr1>,<restr2>,... EmailAddr string `json:"emailAddr"` // User Email Address FullName string `json:"fullName"` // Full Name Quota int64 `json:"quota"` // Quota: -1 no quota ; 0 unlimited ; > 1 MB MetaData map[string]string `json:"metaData"` // MetaData ... Associative Array {"key1":"Val1", "key2":"Val2", ...} }
PRIVATE
func AuthDataInit ¶
func AuthDataInit(ok bool, errMsg string, method uint8, area string, realm string, userID string, userName string, passHash string, passAlgo uint8, tokenData string, tokenAlgo string, emailAddr string, fullName string, privileges string, restrictions string, privKey string, pubKey string, secKey string, quota int64, metaData map[string]string) AuthDataStruct
func AuthUserPassDefaultCheck ¶
func AuthUserPassDefaultCheck(authRealm string, user string, pass string, authMode uint8, requiredUsername string, requiredPassword string, passHashAlgo uint8, emailAddr string, fullName string, privileges string, restrictions string, privKey string, pubKey string, secKey string, quota int64, metaData map[string]string) (bool, AuthDataStruct)
func AuthUserTokenDefaultCheck ¶
func AuthUserTokenDefaultCheck(authRealm string, user string, token string, authMode uint8, requiredUsername string, requiredToken string, emailAddr string, fullName string, privileges string, restrictions string, privKey string, pubKey string, secKey string, quota int64, metaData map[string]string) (bool, AuthDataStruct)
type AuthProvider ¶
type AuthProvider interface { IsInitialized() (bool, error) SetError(err error) bool Init(name string) error ParseAndValidateAuthUserRecord(authUserName string, arrUserRecord map[string]interface{}) (AuthUserRecord, error) ParseAndValidateAuthTokenRecord(authUserName string, authUserToken string, arrTokenRecord map[string]interface{}) (AuthUserToken, error) }
type AuthUserRecord ¶
type AuthUserToken ¶
type MailMessageStruct ¶
type SMarkdownParser ¶
type SMarkdownParser struct {
// contains filtered or unexported fields
}
func NewSMarkdown ¶
func (*SMarkdownParser) Parse ¶
func (m *SMarkdownParser) Parse(mkdw string) string
type SmtpConfig ¶
type SmtpConfig struct { MxDomain string Host string Port uint16 TlsMode string AuthType string AuthUser string AuthPass string }
func SmtpGetDefaultConfig ¶
func SmtpGetDefaultConfig() *SmtpConfig
Source Files ¶
- smartgo-app.go
- smartgo-archivers.go
- smartgo-auth-model.go
- smartgo-auth.go
- smartgo-bytes.go
- smartgo-crypto-encipher.go
- smartgo-crypto-hash.go
- smartgo-crypto-ssh.go
- smartgo-date-time.go
- smartgo-enc-dec.go
- smartgo-esc.go
- smartgo-fs.go
- smartgo-ini.go
- smartgo-json.go
- smartgo-logger.go
- smartgo-mailer.go
- smartgo-markup.go
- smartgo-net.go
- smartgo-numbers.go
- smartgo-smarkdown.go
- smartgo-strings.go
- smartgo-sys.go
- smartgo-text-html.go
- smartgo-tpl.go
- smartgo-um-conv.go
- smartgo-xml.go
- smartgo-yaml.go
- smartgo.go
Directories ¶
Path | Synopsis |
---|---|
colorstring
module
|
|
crypto
|
|
bcrypt
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
|
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm. |
blowfish
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
|
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm. |
dhkx
REQUIRE: go 1.16 or later
|
REQUIRE: go 1.16 or later |
eddsa/ed448
Package ed448 implements Ed448 signature scheme as described in RFC-8032.
|
Package ed448 implements Ed448 signature scheme as described in RFC-8032. |
eddsa/edx25519
Package edx25519 implements Ed25519 signature scheme as described in RFC-8032.
|
Package edx25519 implements Ed25519 signature scheme as described in RFC-8032. |
eddsa/edx448
Package edx448 implements Ed448 signature scheme as described in RFC-8032.
|
Package edx448 implements Ed448 signature scheme as described in RFC-8032. |
eddsa/internal/ecc/goldilocks
Package goldilocks provides elliptic curve operations over the goldilocks curve.
|
Package goldilocks provides elliptic curve operations over the goldilocks curve. |
eddsa/internal/math
Package math provides some utility functions for big integers.
|
Package math provides some utility functions for big integers. |
eddsa/internal/math/fp25519
Package fp25519 provides prime field arithmetic over GF(2^255-19).
|
Package fp25519 provides prime field arithmetic over GF(2^255-19). |
eddsa/internal/math/fp448
Package fp448 provides prime field arithmetic over GF(2^448-2^224-1).
|
Package fp448 provides prime field arithmetic over GF(2^448-2^224-1). |
eddsa/internal/math/mlsbset
Package mlsbset provides a constant-time exponentiation method with precomputation.
|
Package mlsbset provides a constant-time exponentiation method with precomputation. |
pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
|
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0. |
sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |
threefish
Package threefish implements the Threefish tweakable block cipher.
|
Package threefish implements the Threefish tweakable block cipher. |
twofish
Package twofish implements Bruce Schneier's Twofish encryption algorithm.
|
Package twofish implements Bruce Schneier's Twofish encryption algorithm. |
data-structs
|
|
fastjson
Package fastjson provides fast JSON parsing.
|
Package fastjson provides fast JSON parsing. |
tidwall/gjson
Package gjson provides searching for json strings.
|
Package gjson provides searching for json strings. |
tidwall/match
Package match provides a simple pattern matcher with unicode support.
|
Package match provides a simple pattern matcher with unicode support. |
tidwall/secret
Package secret provides simple utilities for encrypting and decrypting data.
|
Package secret provides simple utilities for encrypting and decrypting data. |
tidwall/sjson
Package sjson provides setting json values.
|
Package sjson provides setting json values. |
yaml
Package yaml implements YAML support for the Go language.
|
Package yaml implements YAML support for the Go language. |
REQUIRE: go 1.19 or later
|
REQUIRE: go 1.19 or later |
lib-pq
Package pq is a pure Go Postgres driver for the database/sql package.
|
Package pq is a pure Go Postgres driver for the database/sql package. |
lib-pq/oid
Package oid contains OID constants as defined by the Postgres server.
|
Package oid contains OID constants as defined by the Postgres server. |
lib-pq/scram
Package scram implements a SCRAM-{SHA-1,etc} client per RFC5802.
|
Package scram implements a SCRAM-{SHA-1,etc} client per RFC5802. |
mysql
Package mysql provides a MySQL driver for Go's database/sql package.
|
Package mysql provides a MySQL driver for Go's database/sql package. |
redcon-srv
Package redcon implements a Redis compatible server framework
|
Package redcon implements a Redis compatible server framework |
redigo/redis
Package redis is a client for the Redis database.
|
Package redis is a client for the Redis database. |
redigo/redisx
Package redisx contains experimental features for Redigo.
|
Package redisx contains experimental features for Redigo. |
sqlite3
Package sqlite3 provides interface to SQLite3 databases.
|
Package sqlite3 provides interface to SQLite3 databases. |
dynamic-struct
module
|
|
fastjson
module
|
|
gui
|
|
logutils
module
|
|
markup
|
|
markdown
Package markdown implements markdown parser and HTML renderer.
|
Package markdown implements markdown parser and HTML renderer. |
markdown/ast
Package ast defines tree representation of a parsed markdown document.
|
Package ast defines tree representation of a parsed markdown document. |
markdown/html
Package html implements HTML renderer of parsed markdown document.
|
Package html implements HTML renderer of parsed markdown document. |
markdown/parser
Package parser implements parser for markdown text that generates AST (abstract syntax tree).
|
Package parser implements parser for markdown text that generates AST (abstract syntax tree). |
svg-qrcode
Package qrcode implements a QR Code encoder.
|
Package qrcode implements a QR Code encoder. |
svg-qrcode/bitset
Package bitset implements an append only bit array.
|
Package bitset implements an append only bit array. |
svg-qrcode/reedsolomon
Package reedsolomon provides error correction encoding for QR Code 2005.
|
Package reedsolomon provides error correction encoding for QR Code 2005. |
regexp2
module
|
|
textproc
|
|
difflib
Package difflib is a partial port of Python difflib module.
|
Package difflib is a partial port of Python difflib module. |
natsort
Package natural defines a natural "less" to compare two strings while interpreting natural numbers.
|
Package natural defines a natural "less" to compare two strings while interpreting natural numbers. |
regexp2
Package regexp2 is a regexp package that has an interface similar to Go's framework regexp engine but uses a more feature full regex engine behind the scenes.
|
Package regexp2 is a regexp package that has an interface similar to Go's framework regexp engine but uses a more feature full regex engine behind the scenes. |
threefish
module
|
|
ui
|
|
utils
|
|
log-utils
Package logutils augments the standard log package with levels
|
Package logutils augments the standard log package with levels |
mail
Package gomail provides a simple interface to compose emails and to mail them efficiently.
|
Package gomail provides a simple interface to compose emails and to mail them efficiently. |
uuid
module
|
|
web
|
|
assets/srv-assets
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower)
|
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower) |
assets/web-assets
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower versions)
|
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower versions) |
httputils
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower)
|
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower) |
webdav
Package webdav provides a WebDAV server implementation.
|
Package webdav provides a WebDAV server implementation. |
webdav/internal/xml
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
|
Package xml implements a simple XML 1.0 parser that understands XML name spaces. |
websrv
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower)
|
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower) |
web-socket
|
|
websocket
Package websocket implements the WebSocket protocol defined in RFC 6455.
|
Package websocket implements the WebSocket protocol defined in RFC 6455. |
websocket/examples/autobahn
Command server is a test server for the Autobahn WebSockets Test Suite.
|
Command server is a test server for the Autobahn WebSockets Test Suite. |
ws-msgpak-srv-cli
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower)
|
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower) |
webview
module
|
|
webview2
module
|