utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: GPL-3.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CONTAINS = "CONTAINS"
	WILDCARD = "WILDCARD"
	EXACT    = "EXACT"
	NOT      = "NOT"
	REGEX    = "REGEX"
)

["CONTAINS", "WILDCARD", "EXACT", "NOT", "REGEX"]

Variables

This section is empty.

Functions

func GetMatchType

func GetMatchType(mt string) string

GetMatchType Gets the match type

func InitConfig

func InitConfig()

InitConfig ...

func InitConfigFile

func InitConfigFile(cnfFile string)

InitConfigFile initializes the config file

Types

type Config

type Config struct {
	DatabaseName        string `json:"databaseName"`
	JSONsFolderPath     string `json:"jsonsFolderPath"`
	FarxFilesFolderPath string `json:"farxFilesFolderPath"`
	Port                int    `json:"port"`
}

Config Application settings

var Configuration Config

Configuration ...

type HTTPRequestModel

type HTTPRequestModel struct {
	URL     string
	Method  string
	Headers map[string]string
	Cookies []*http.Cookie
	Query   map[string]string
	Form    map[string]string
}

HTTPRequestModel proxy model for http.Request while executing response template

func MapToHTTPRequestModel

func MapToHTTPRequestModel(req *http.Request) *HTTPRequestModel

MapToHTTPRequestModel Creates a HTTPRequestModel

Jump to

Keyboard shortcuts

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