Documentation ¶
Index ¶
- func ContainsDotDot(v string) bool
- func ForceIPHTTPClient(ip, port string) *http.Client
- func ForceIPWebsocketDialer(ip, port string) *websocket.Dialer
- func IsMultipart(r *http.Request) bool
- func IsSlashRune(r rune) bool
- func JSONMarshal(t interface{}) ([]byte, error)
- func MarshalJSONErr(message, code string, args ...any) []byte
- func Redirect2HTTPS(w http.ResponseWriter, req *http.Request)
- func SendError(w http.ResponseWriter, message, code string, statusCode int)
- func SendErrorAndLog(w http.ResponseWriter, message, code string, statusCode int, origin string, ...)
- func SendInternalError(w http.ResponseWriter, origin string, err error)
- func SendSuccess(w http.ResponseWriter, resp interface{})
- func SplitHostPort(hostport string) (string, string)
- func SplitSlash(url string) []string
- func StripPort(hostport string) string
- func UniqueSecureID120() (string, error)
- func UniqueSecureID36() (string, error)
- func UniqueSecureID60() (string, error)
- func UploadEmbedFolderMultipart(client *http.Client, url, method string, relfilepaths []string, ...) (*http.Response, error)
- func UploadFileMultipart(client *http.Client, url string, path string) (*http.Response, error)
- func UploadFolderMultipart(client *http.Client, url, method string, folder string, fields ...string) (*http.Response, error)
- type JSONErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsDotDot ¶
func ForceIPHTTPClient ¶
func ForceIPWebsocketDialer ¶
func IsMultipart ¶
IsMultipart returns true if the given request is multipart forrm
func IsSlashRune ¶
func MarshalJSONErr ¶
func Redirect2HTTPS ¶
func Redirect2HTTPS(w http.ResponseWriter, req *http.Request)
func SendErrorAndLog ¶
func SendInternalError ¶
func SendInternalError(w http.ResponseWriter, origin string, err error)
func SendSuccess ¶
func SendSuccess(w http.ResponseWriter, resp interface{})
func SplitHostPort ¶
func SplitSlash ¶
func UniqueSecureID120 ¶
func UniqueSecureID36 ¶
func UniqueSecureID60 ¶
func UploadFileMultipart ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.