Documentation ¶
Index ¶
- Constants
- Variables
- func AsSha256(o interface{}) string
- func AsSha256OfOrderedMap(o map[string]interface{}, orderedKey []string) string
- func CleanAndTrim(text string) string
- func ExecScript(ctx context.Context, model interface{}, sql string, dbCon *sqlx.DB, ...) (int64, error)
- func NumericHash(ac interface{}) int64
- func StructToSlice(st interface{}, ignoreFields []string) ([]interface{}, []string)
- type OverTransactionAdditionalQueries
Constants ¶
View Source
const ( //GlobalDBVersion ... GlobalDBVersion int = 1 TickerServerPort = "TICKER_SERVER_PORT" // TickerServerAddress = "TICKER_SERVER_ADDRESS" TickerDatabaseURL = "TICKER_DATABASE_URL" TickerConfigLevel = "TICKER_CONFIG_LEVEL" )
Variables ¶
View Source
var DefaultFieldsToIgnore = []string{"created", "updated", "deleted"}
View Source
var MT5_MIN_DATE = time.Now().UTC().Add(time.Hour * 24 * 18000 * -1).Unix()
Functions ¶
func AsSha256OfOrderedMap ¶
AsSha256OfOrderedMap hash function My tests showed this is unnecessary because apparently, the order of the key is the same if the content of the row is the same. So, two rows could have different field order, but it should be always the same for the specific row
func ExecScript ¶
func ExecScript(ctx context.Context, model interface{}, sql string, dbCon *sqlx.DB, ignoreFields []string) (int64, error)
ExecScript runs que SQL
func NumericHash ¶ added in v0.9.2
func NumericHash(ac interface{}) int64
func StructToSlice ¶
StructToSlice return field name and its values from a struct
Types ¶
type OverTransactionAdditionalQueries ¶
OverTransactionAdditionalQueries allow you to runs additional taks over the openned transaction
Click to show internal directories.
Click to hide internal directories.