util

package
v0.0.0-...-b2d66a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APPLICATION_SETTINGS = settings.GetSettings()
)
View Source
var (
	Log = logging.MustGetLogger("default")
)

Functions

func APIResponse

func APIResponse(w web.ResponseWriter, r *web.Request, params interface{})

func CheckSignature

func CheckSignature(encryptedMessage, secretText, publicKey string) (bool, error)

func DeleteImagesWithPrefix

func DeleteImagesWithPrefix(prefix string) error

func DirectGET

func DirectGET(url string) (string, error)

func DirectPOST

func DirectPOST(url string, params url.Values) (string, error)

func EncryptText

func EncryptText(encryptionText, publicKey string) (string, error)

func Fingerprint

func Fingerprint(publicKey string) string

func GenerateUuid

func GenerateUuid() string

func GetFileAbsolutePath

func GetFileAbsolutePath(relativePath string) string

func HumanizeTime

func HumanizeTime(t time.Time, lang string) string

func HumanizeTimeRU

func HumanizeTimeRU(t time.Time) string

func InitLogging

func InitLogging()

func PasswordHashV1

func PasswordHashV1(username string, passphrase string) string

func RedirectOrAPIResponse

func RedirectOrAPIResponse(w web.ResponseWriter, r *web.Request, redirectUrl string, params interface{})

func RenderTemplate

func RenderTemplate(w web.ResponseWriter, template string, params interface{})

func ResizeImage

func ResizeImage(infilename, outfilename string, size string) error

func Round

func Round(f float64) float64

func RoundPlus

func RoundPlus(f float64, places int) float64

func SaveImage

func SaveImage(r *web.Request, field string, maxWidth uint, uuid string) error

func ServeImage

func ServeImage(filename, size string, w web.ResponseWriter, r *web.Request) error

func TorGET

func TorGET(url string) (string, error)

func TorJSONPOST

func TorJSONPOST(url string, data interface{}) (string, error)

func TorPOST

func TorPOST(url string, params url.Values) (string, error)

func TorRawPOST

func TorRawPOST(url string, params string) (string, error)

func ValidatePGPPublicKey

func ValidatePGPPublicKey(key string) error

Types

type Context

type Context struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL