Documentation ¶
Index ¶
- Constants
- func CalculateMessageRate(tdiff, msgcount int64) (result string)
- func ChannelsUploadImage(channels []string, fname, fpath, ftype string, api_i interface{})
- func FileExists(fpath string) (exists bool)
- func FormatTDiff(ts int64) (int64, int64, int64, int64)
- func GetLimitPage(search_string string, limit_default, page_default int) (limit, page int)
- func GetRequestedFeature(full_command string, usage ...string) (requestedFeature, command, message string)
- func GetStripEnv(envvar string) (result string)
- func IsInArray(str string, arr []string) (result bool)
- func MD5Hash(message string) (result string)
- func SHA1Hash(message string) (result string)
- func SHA256Hash(message string) (result string)
- func SHA512Hash(message string) (result string)
- func UnformatURL(url string) (newurl string)
- type Utils
- func (cu *Utils) DownloadToTmp(url string) (fname string, mimetype string, is_image bool, err error)
- func (cu *Utils) GetMIMEType(fname string) (mimetype, extension string, is_image bool, err error)
- func (cu *Utils) GetURLBytes(url string) (result []byte, err error)
- func (cu *Utils) GetURLUnmarshal(url string, result interface{}) (err error)
- func (cu *Utils) HTTPClient(req_type, url, content_type string, body *strings.Reader) (result []byte, err error)
- func (cu *Utils) NewLog(prefix string) (logger *log.Logger)
- func (cu *Utils) PostURLBytes(url, content_type string, body *strings.Reader) (result []byte, err error)
- func (cu *Utils) PostURLFormUnmarshal(url string, data url.Values, result interface{}) (err error)
- func (cu *Utils) PostURLUnmarshal(url, content_type string, body *strings.Reader, result interface{}) (err error)
- func (cu *Utils) SetLogger(logger *log.Logger)
- func (cu *Utils) SetLoggerPrefix(prefix string) (logger *log.Logger)
Constants ¶
View Source
const User_Agent = "Mozilla/5.0 (https://github.com/tb0hdan/torpedo; tb0hdan@gmail.com) Go-http-client/1.1"
Variables ¶
This section is empty.
Functions ¶
func CalculateMessageRate ¶
func ChannelsUploadImage ¶
func FileExists ¶
func GetLimitPage ¶
func GetRequestedFeature ¶
func GetStripEnv ¶
func SHA256Hash ¶
func SHA512Hash ¶
func UnformatURL ¶
Types ¶
type Utils ¶
type Utils struct {
// contains filtered or unexported fields
}
func (*Utils) DownloadToTmp ¶
func (*Utils) GetMIMEType ¶
func (*Utils) GetURLUnmarshal ¶
func (*Utils) HTTPClient ¶
func (*Utils) PostURLBytes ¶
func (*Utils) PostURLFormUnmarshal ¶
func (*Utils) PostURLUnmarshal ¶
Click to show internal directories.
Click to hide internal directories.