{"modulePath":"github.com/apache/answer","version":"v1.7.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package checker\n\n## Constants\n\n```go\nconst (\n\tLevelC\n\tLevelB\n\tLevelA\n\tLevelS\n)\n```\n\n```go\nconst (\n\tQuestionLinkTypeURL = 1\n\tQuestionLinkTypeID  = 2\n)\n```\n\n```go\nconst (\n\tPasswordCannotContainSpaces = \"error.password.space_invalid\"\n)\n```\n\n## Functions\n\n```go\nfunc CheckPassword(password string) error\n```\nCheckPassword checks the password strength\n\n```go\nfunc DecodeAndCheckImageFile(localFilePath string, maxImageMegapixel int) bool\n```\nDecodeAndCheckImageFile currently answers support image type is \\`image/jpeg, image/jpg, image/png, image/gif, image/webp\\`\n\n```go\nfunc EmailInAllowEmailDomain(email string, allowEmailDomains []string) bool\n```\n\n```go\nfunc FilterEmptyString(strs []string) []string\n```\nFilterEmptyString filter empty string from string slice\n\n```go\nfunc IsChinese(str string) bool\n```\n\n```go\nfunc IsInvalidUsername(username string) bool\n```\n\n```go\nfunc IsNotZeroString(s string) bool\n```\nIsNotZeroString check s is not empty string and is not \"0\"\n\n```go\nfunc IsQuestionsIgnorePath(questionID string) bool\n```\nIsQuestionsIgnorePath checks whether the questionID is in ignore path\n\n```go\nfunc IsReservedUsername(username string) bool\n```\nIsReservedUsername checks whether the username is reserved\n\n```go\nfunc IsURL(str string) bool\n```\n\n```go\nfunc IsUnAuthorizedExtension(fileName string, allowedExtensions []string) bool\n```\nIsUnAuthorizedExtension check whether the file extension is not in the allowedExtensions WANING Only checks the file extension is not reliable, but \\`http.DetectContentType\\` and \\`mimetype\\` are not reliable for all file types.\n\n```go\nfunc IsUsersIgnorePath(username string) bool\n```\nIsUsersIgnorePath checks whether the username is in ignore path\n\n## Types\n\n```go\ntype PathIgnore struct {\n\tUsers     []string `yaml:\"users\"`\n\tQuestions []string `yaml:\"questions\"`\n}\n```\n\n```go\ntype QuestionLink struct {\n\tLinkType   int\n\tQuestionID string\n\tAnswerID   string\n}\n```\n\n```go\nfunc GetQuestionLink(content string) []QuestionLink\n```\n\n","path":"github.com/apache/answer/pkg/checker","name":"checker","synopsis":"","isRedistributable":true}
