Documentation ¶
Index ¶
- Constants
- func AccessSecretVersion(name string) (string, error)
- func CheckIfStringPrefixExistsInArray(arr []string, val string) bool
- func ConvertDateToUTCZero(t time.Time) time.Time
- func ConvertFloatToDecimal(value *float64) *decimal.Decimal
- func ConvertFloatToPgTypeNumeric(value *float64) *pgtype.DataType
- func EndDate(t time.Time) time.Time
- func EndOfMonthDate(t time.Time) time.Time
- func GetEnv() string
- func GoDotEnvVariable(key string) string
- func IndexOfInts(arr []int, val int) int
- func IndexOfStrings(arr []string, val string) int
- func LookupEnv(k string) string
- func MustGetenv(k string) string
- func OffsetDateByDay(t time.Time, offsetDay *int) time.Time
- func ParseStringToDate(s string, layout string) (time.Time, error)
- func RandomString(length int) string
- func RandomStringWithCharset(length int, charset string) string
- func RangeDate(start, end time.Time) func() time.Time
- func RangeDateMonthly(start, end time.Time) func() time.Time
- func RangeDateOffsetByDate(start, end time.Time, offSetDays *int) func() time.Time
- func RespondWithError(w http.ResponseWriter, code int, message string)
- func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
- func SleepLog(msg string, totalDuration time.Duration)
- func SliceAtoi(sa []string) ([]int, error)
- func SplitToString(a []int, sep string) string
- func TimeDiff(TimeA time.Time, TimeB time.Time) time.Time
Constants ¶
View Source
const ( SYSTEM_NAME = "SYSTEM" LIVE_INTERVAL_STRUCTURED_VALUE_ID = 58 DAILY_STRUCTURED_VALUE_ID = 5 FIAT_STRUCTURED_VALUE_ID = 9 ASSET_PAIR_STRUCTURED_VALUE_ID = 12 USD_ID = 34 LIVE_DATA_MARKET_DATA_TYPE_STRUCTURED_VALUE_ID = 7 END_OF_DAY_MARKET_DATA_TYPE_STRUCTURED_VALUE_ID = 8 COINGECKO_SOURCE_ID = 3 JOB_STATUS_STRUCTURED_VALUE_TYPE_ID = 14 SUCCESS_STRUCTURED_VALUE_ID = 52 RUNNING_STRUCTURED_VALUE_ID = 53 WARNING_STRUCTURED_VALUE_ID = 54 FAILED_STRUCTURED_VALUE_ID = 55 JOB_CATEGORY_STRUCTURED_VALUE_TYPE_ID = 15 LIVE_JOB_CATEGORY_STRUCTURED_VALUE_ID = 56 EOD_JOB_CATEGORY_STRUCTURED_VALUE_ID = 57 BIG_INT_EXP = 18 STRATEGY_STRUCTURED_VALUE_TYPE_ID = 16 FREQUENCY_STRUCTURED_VALUE_TYPE_ID = 17 STEP_ACTION_TYPE_STRUCTURED_VALUE_TYPE_ID = 18 HARVESTING_FREQUENCY_STRUCTURED_VALUE_ID = 73 STRATEGY_MARKET_DATA_IMPORT_JOB_TYPE_STRUCTURED_VALUE_ID = 74 STRATEGY_SNAPSHOT_MARKET_DATA_TYPE_STRUCTURED_VALUE_ID = 75 STRATEGY_EXEUCTION_JOB_TYPE_STRUCTURED_VALUE_ID = 76 )
View Source
const ( LayoutISO = "2006-01-02" LayoutUS = "January 2, 2006" LayoutPostgres = "2006-01-02 15:04:05" LayoutCoingecko = "02-01-2006" LayoutRFC3339 = "2016-06-20T12:41:45.140Z" TimeFormat = "15:04:05" )
Variables ¶
This section is empty.
Functions ¶
func AccessSecretVersion ¶
accessSecretVersion accesses the payload for the given secret version if one exists. The version can be a version number as a string (e.g. "5") or an alias (e.g. "latest").
func ConvertFloatToDecimal ¶
func GoDotEnvVariable ¶
use godot package to load/read the .env file and return the value of the key
func IndexOfInts ¶
func IndexOfStrings ¶
func MustGetenv ¶
func RandomString ¶
func RandomStringWithCharset ¶
func RangeDateOffsetByDate ¶
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, code int, message string)
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
func SplitToString ¶ added in v1.0.25
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.