Documentation ¶
Index ¶
- func DeleteConfigFile(sessionData *types.Session)
- func ExecuteTemplate(wr io.Writer, data interface{}, sessionData *types.Session)
- func Float64ToStr(value float64, prec int) string
- func GetConfigData(viperData *types.ViperData, sessionData *types.Session) *types.Config
- func GetExchangeLatency(sessionData *types.Session) (latency int64, err error)
- func GetFunctionName() string
- func GetIP(r *http.Request) string
- func GetPort() (port string)
- func GetThreadID() string
- func IntToFloat64(value int) float64
- func IsFundsAvailable(configData *types.Config, sessionData *types.Session) bool
- func IsInTimeRange(startTimeString string, endTimeString string) bool
- func LoadConfigTemplate(viperData *types.ViperData, sessionData *types.Session) *types.Config
- func MustGetenv(k string) string
- func SaveConfigData(viperData *types.ViperData, r *http.Request, sessionData *types.Session)
- func SaveConfigGlobalData(viperData *types.ViperData, r *http.Request, sessionData *types.Session)
- func StrToFloat64(value string) (r float64)
- func StrToInt(value string) (r int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteConfigFile ¶
DeleteConfigFile Delete configuration file for ThreadID
func ExecuteTemplate ¶
ExecuteTemplate is responsible for executing any templates
func Float64ToStr ¶
Float64ToStr function
This public function convert float64 to string with variable precision
func GetConfigData ¶
GetConfigData Retrieve or create config file based on ThreadID
func GetExchangeLatency ¶
GetExchangeLatency retrieve the latency between the exchange and client
func GetIP ¶
GetIP gets a requests IP address by reading off the forwarded-for header (for proxies) and falls back to use the remote address.
func IsFundsAvailable ¶
IsFundsAvailable Validate available funds to buy
func IsInTimeRange ¶
IsInTimeRange Check if time is in a specific range
func LoadConfigTemplate ¶
LoadConfigTemplate Load the selected configuration template Three's a BUG where it only works before the first UPDATE
func MustGetenv ¶
MustGetenv is a helper function for getting environment variables. Displays a warning if the environment variable is not set.
func SaveConfigData ¶
SaveConfigData save viper configuration from html
func SaveConfigGlobalData ¶ added in v1.9.2
SaveConfigGlobalData save viper configuration from html
Types ¶
This section is empty.