Documentation ¶
Index ¶
- Constants
- func CheckMobileAgent(agent string) (isMobile bool)
- func ClientSelfGet(client *http.Client, url string) (string, error)
- func ClientSelfPost(client *http.Client, url string, jsonData string) (string, error)
- func Client_Get(url string) (string, int, error)
- func Client_Post(url, jsonData string, session string) (string, error)
- func Client_Post_Time(url string, jsonData string, timeout time.Duration) (string, error)
- func Client_Put(url string, jsonData string) (string, error)
- func CutoffHTMLByPercentage(content string, percentage float64) (string, error)
- func ExtToContentType(extName string) string
- func GetContenAbstract(content string) (abstract string)
- func GetHtmlAbstract(content string) (abstract string)
- func GetHtmlContent(content string) (abstract string)
- func GetMIME(extension string) (mime string)
- func GetRemoteAddr(r *http.Request) string
- func GetURLFromContent(content string) string
- func MarkdownAutoNewline(str string) string
- func MarkdownRenderer(content string) string
- func ParseContentByImg(valueHtml string) ([]string, error)
- func StatusMessage(status int) string
- func TrimHtml(src string) string
Constants ¶
View Source
const ( ApplicationJson = "application/json" ContentEncoding = "Content-Encoding" ContentSecurity = "X-Content-Security" ContentType = "Content-Type" KeyField = "key" SecretField = "secret" TypeField = "type" CryptionType = 1 )
View Source
const ( CodeSignaturePass = iota CodeSignatureInvalidHeader CodeSignatureWrongTime CodeSignatureInvalidToken )
View Source
const MIMEOctetStream = "application/octet-stream"
Variables ¶
This section is empty.
Functions ¶
func CheckMobileAgent ¶
func ClientSelfPost ¶
func Client_Post_Time ¶
func CutoffHTMLByPercentage ¶
func ExtToContentType ¶
func GetContenAbstract ¶
func GetHtmlAbstract ¶
func GetHtmlContent ¶
func GetRemoteAddr ¶
Returns the peer address, supports X-Forward-For
func GetURLFromContent ¶
func MarkdownAutoNewline ¶
func MarkdownRenderer ¶
func ParseContentByImg ¶
func StatusMessage ¶
StatusMessage returns the correct message for the provided HTTP statuscode
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.