Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfValidLink ¶
CheckIfValidLink checks an URL if it is a valid link. So first, it checks if it starts with 'http'. If httpsOnly is set, it will be checked if the link starts with https. Then, a http request is executed to the link. If this fails or responds with an status code >= 400, the link is invalid and an error will be returned. The link is qualified as valid if the returned error is nil.
func CheckIfValidShort ¶
CheckIfValidShort checks if the short link is contained in the reserved string or if the short link does not single-result match the allowedRx. The short link is qualified as valid if the returned error is nil.
func GetRandString ¶
GetRandString returnes a random stirng of the defined length.
Types ¶
This section is empty.