utils

package
v0.0.0-...-49af19c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MODULE = "Utils"

Variables

View Source
var (
	STATUS = map[int]string{
		http.StatusContinue:                      "continue",
		http.StatusSwitchingProtocols:            "switching protocols",
		http.StatusProcessing:                    "processing",
		http.StatusEarlyHints:                    "early hints",
		http.StatusOK:                            "ok",
		http.StatusCreated:                       "created",
		http.StatusAccepted:                      "accepted",
		http.StatusNonAuthoritativeInfo:          "non authorative info",
		http.StatusNoContent:                     "no content",
		http.StatusResetContent:                  "reset content",
		http.StatusPartialContent:                "partial content",
		http.StatusMultiStatus:                   "multi status",
		http.StatusAlreadyReported:               "already reported",
		http.StatusIMUsed:                        "im used",
		http.StatusMultipleChoices:               "multiple choices",
		http.StatusMovedPermanently:              "moved permanently",
		http.StatusFound:                         "found",
		http.StatusSeeOther:                      "see other",
		http.StatusNotModified:                   "not modified",
		http.StatusUseProxy:                      "use proxy",
		http.StatusTemporaryRedirect:             "temporary redirect",
		http.StatusPermanentRedirect:             "permanent redirect",
		http.StatusBadRequest:                    "bad request",
		http.StatusUnauthorized:                  "unauthorized",
		http.StatusPaymentRequired:               "payment required",
		http.StatusForbidden:                     "forbidden",
		http.StatusNotFound:                      "not found",
		http.StatusMethodNotAllowed:              "method not allowed",
		http.StatusNotAcceptable:                 "not acceptable",
		http.StatusProxyAuthRequired:             "proxy auth required",
		http.StatusRequestTimeout:                "request timeout",
		http.StatusConflict:                      "conflict",
		http.StatusGone:                          "gone",
		http.StatusLengthRequired:                "length required",
		http.StatusPreconditionFailed:            "precondition failed",
		http.StatusRequestEntityTooLarge:         "request entity too large",
		http.StatusRequestURITooLong:             "request uri too large",
		http.StatusUnsupportedMediaType:          "unsuported media type",
		http.StatusRequestedRangeNotSatisfiable:  "request rang not satisfiable",
		http.StatusExpectationFailed:             "expectation failed",
		http.StatusTeapot:                        "I'm a tea pot",
		http.StatusMisdirectedRequest:            "misdirected request",
		http.StatusUnprocessableEntity:           "unprocessable entity",
		http.StatusLocked:                        "locked",
		http.StatusFailedDependency:              "failed dependency",
		http.StatusTooEarly:                      "too early",
		http.StatusUpgradeRequired:               "upgrade required",
		http.StatusPreconditionRequired:          "precondition required",
		http.StatusTooManyRequests:               "too many requests",
		http.StatusRequestHeaderFieldsTooLarge:   "request header fields too large",
		http.StatusUnavailableForLegalReasons:    "unavailable for legal reasons",
		http.StatusInternalServerError:           "internal server error",
		http.StatusNotImplemented:                "not implemented",
		http.StatusBadGateway:                    "bad gateway",
		http.StatusServiceUnavailable:            "service unavailable",
		http.StatusGatewayTimeout:                "gateway timeout",
		http.StatusHTTPVersionNotSupported:       "http version not supported",
		http.StatusVariantAlsoNegotiates:         "varian also negotiates",
		http.StatusInsufficientStorage:           "insufficient storage",
		http.StatusLoopDetected:                  "loop detected",
		http.StatusNotExtended:                   "not extended",
		http.StatusNetworkAuthenticationRequired: "network authentication required",
	}
)

Functions

func DirectoryExists

func DirectoryExists(path string) bool

func Download

func Download(url string, dest string, log *admin_log.Log) error

func FileExists

func FileExists(path string) bool

func TarGz

func TarGz(source string, dest string) error

func UntarGz

func UntarGz(source string, dest string) error

func Unzip

func Unzip(source string, dest string, log *admin_log.Log) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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