Documentation ¶
Index ¶
- Variables
- func CompressGzip(body []byte) ([]byte, error)
- func Contains(first, second []string) bool
- func ContainsOnly(first, second []string) bool
- func CopyMap(originalMap map[string]string) map[string]string
- func DecompressGzip(body []byte) ([]byte, error)
- func FetchFromRequestBody(queryType, query, toMatch string) interface{}
- func GetBoolOrDefault(data map[string]interface{}, key string, defaultValue bool) bool
- func GetContentTypeFromHeaders(headers map[string][]string) string
- func GetMinifier() *minify.M
- func GetRequestBody(request *http.Request) (string, error)
- func GetResponseBody(response *http.Response) (string, error)
- func GetResponseHeaders(response *http.Response) map[string][]string
- func GetStringArray(data interface{}) ([]string, bool)
- func GetUnixTimeQueryParam(request *http.Request, paramName string) *time.Time
- func Identical(first, second []string) bool
- func IsURL(str string) bool
- func JSONMarshal(t interface{}) ([]byte, error)
- func JsonPathExecution(matchString, toMatch string) (string, error)
- func MinifyJson(toMinify string) (string, error)
- func MinifyXml(toMinify string) (string, error)
- func NeedsEncoding(headers map[string][]string, body string) bool
- func NewLogFileHook(config LogFileConfig) (logrus.Hook, error)
- func PointerToString(value *string) string
- func PrepareJsonPathQuery(query string) string
- func RandStringFromTimestamp(length int) string
- func RandomBoolean() bool
- func RandomFloat() float64
- func RandomFloatRange(min, max float64) float64
- func RandomInteger() int
- func RandomIntegerRange(min, max int) int
- func RandomString() string
- func RandomStringWithLength(length int) string
- func ResolveAndValidatePath(absBasePath, relativePath string) (string, error)
- func SortQueryString(query string) string
- func StringToPointer(value string) *string
- func XpathExecution(matchString, toMatch string) (exec.Result, error)
- type HashSet
- type LogFileConfig
- type LogFileHook
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // mime types which will not be base 64 encoded when exporting as JSON SupportedMimeTypes = [...]string{"text", "plain", "css", "html", "json", "xml", "js", "javascript"} )
Functions ¶
func CompressGzip ¶ added in v1.3.3
func ContainsOnly ¶ added in v1.5.0
func DecompressGzip ¶ added in v1.3.3
func FetchFromRequestBody ¶ added in v1.8.0
func FetchFromRequestBody(queryType, query, toMatch string) interface{}
func GetBoolOrDefault ¶ added in v1.5.0
func GetContentTypeFromHeaders ¶ added in v0.11.0
func GetMinifier ¶ added in v0.11.0
func GetMinifier() *minify.M
func GetRequestBody ¶ added in v0.10.0
GetRequestBody will read the http.Request body io.ReadCloser and will also set the buffer to the original value as the buffer will be empty after reading it. It also decompress if any Content-Encoding is applied
func GetResponseBody ¶ added in v0.10.0
GetResponseBody will read the http.Response body io.ReadCloser and will also set the buffer to the original value as the buffer will be empty after reading it.
func GetResponseHeaders ¶ added in v1.0.0
func GetStringArray ¶ added in v1.5.0
func GetUnixTimeQueryParam ¶ added in v0.15.1
func JSONMarshal ¶ added in v0.14.1
func JsonPathExecution ¶ added in v1.8.0
func MinifyJson ¶ added in v0.11.0
func NeedsEncoding ¶ added in v1.6.0
func NewLogFileHook ¶ added in v1.2.0
func NewLogFileHook(config LogFileConfig) (logrus.Hook, error)
func PointerToString ¶
func PrepareJsonPathQuery ¶ added in v1.8.0
func RandStringFromTimestamp ¶ added in v1.8.0
func RandomBoolean ¶ added in v0.17.1
func RandomBoolean() bool
func RandomFloat ¶ added in v0.17.1
func RandomFloat() float64
func RandomFloatRange ¶ added in v0.17.1
func RandomInteger ¶ added in v0.17.1
func RandomInteger() int
func RandomIntegerRange ¶ added in v0.17.1
func RandomString ¶ added in v0.17.1
func RandomString() string
func RandomStringWithLength ¶ added in v0.17.1
func ResolveAndValidatePath ¶ added in v1.10.3
Resolves a relative path from an absolute basePath, and fails if the relative path starts with ".."
func SortQueryString ¶ added in v0.10.1
SortQueryString will sort a http query string alphanumerically by key and then by value.
func StringToPointer ¶
Types ¶
type HashSet ¶ added in v1.8.0
type HashSet map[interface{}]struct{}
func NewHashSet ¶ added in v1.8.0
func NewHashSet() HashSet
type LogFileConfig ¶ added in v1.2.0
type LogFileHook ¶ added in v1.2.0
type LogFileHook struct { Config LogFileConfig // contains filtered or unexported fields }
func (*LogFileHook) Fire ¶ added in v1.2.0
func (hook *LogFileHook) Fire(entry *logrus.Entry) (err error)
func (*LogFileHook) Levels ¶ added in v1.2.0
func (hook *LogFileHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.