Versions in this module Expand all Collapse all v0 v0.0.2 May 17, 2022 Changes in this version + const Int64Max + var FifteenSeconds = 15 * time.Second + var FiveSeconds = 5 * time.Second + var KafkaUMHTopicCompiledRegex = regexp.MustCompile(KafkaUMHTopicRegex) + var KafkaUMHTopicRegex = `^ia\.((raw\.(\d|-|\w|_|\.)+)|(rawImage\.(\d|-|\w|_)+\.(\d|-|\w|_)+)|((\d|-|\w|_)+\.(\d|-|\w|_)+\.(\d|-|\w|_)+\.((count|scrapCount|barcode|activity|detectedAnomaly|addShift|addOrder|addProduct|startOrder|endOrder|productImage|productTag|productTagString|addParentToChild|state|cycleTimeTrigger|uniqueProduct|scrapUniqueProduct|recommendations)|(processValue(\.(\d|-|\w|_)+)*))))$` + var Marshal = func(v interface{}) (io.Reader, error) + var OneSecond = 1 * time.Second + var TenSeconds = 10 * time.Second + var Unmarshal = func(r io.Reader, v interface{}) error + func AsHash(o interface{}) string + func AsXXHash(inputs ...[]byte) []byte + func Divmod(numerator, denominator int64) (quotient, remainder int64) + func EnvIsTrue(envVariable string) bool + func GetAssetIDFromCache(customerID string, location string, assetID string) (DBassetID uint32, cacheHit bool) + func GetAverageStateTimeFromCache(key string) (data []interface{}, cacheHit bool) + func GetBackoffTime(retries int64, slotTime time.Duration, maximum time.Duration) (backoff time.Duration) + func GetCalculatateLowSpeedStatesFromCache(from time.Time, to time.Time, assetID uint32) (processedStateArray []datamodel.StateEntry, cacheHit bool) + func GetCustomerConfigurationFromCache(customerID string) (data datamodel.CustomerConfiguration, cacheHit bool) + func GetDistinctProcessValuesFromCache(customerID string, location string, assetID string) (data []string, cacheHit bool) + func GetMemcached(key string) (value interface{}, found bool) + func GetProcessStatesFromCache(key string) (processedStateArray []datamodel.StateEntry, cacheHit bool) + func GetProductIDFromCache(productName int32, DBassetID uint32) (DBProductId uint32, cacheHit bool) + func GetRawCountsFromCache(assetID uint32, from time.Time, to time.Time) (data []datamodel.CountEntry, cacheHit bool) + func GetRawShiftsFromCache(assetID uint32, from time.Time, to time.Time, ...) (data []datamodel.ShiftEntry, cacheHit bool) + func GetStatesRawFromCache(assetID uint32, from time.Time, to time.Time, ...) (data []datamodel.StateEntry, cacheHit bool) + func GetTiered(key string) (cached bool, value interface{}) + func GetUniqueProductIDFromCache(aid string, DBassetID uint32) (uid uint32, cacheHit bool) + func InitCache(redisURI string, redisURI2 string, redisURI3 string, redisPassword string, ...) + func InitMemcache() + func IsInSliceFloat64(slice []float64, val float64) bool + func IsInSliceInt32(slice []int32, val int32) bool + func IsKafkaTopicValid(topic string) bool + func IsRedisAvailable() bool + func IsValidStruct(testStruct interface{}, allowedNilFields []string) (success bool) + func Load(path string, v interface{}) error + func LogObject(functionName string, objectName string, now time.Time, v interface{}) + func SanitizeByteArray(unsafebytearray []byte) (safestring string) + func SanitizeString(unsafestring string) (safestring string) + func SanitizeStringArray(unsafestringarray []string) (safestrings []string) + func Save(path string, v interface{}) error + func SaveIoddFile(vendorId int64, deviceId int, relativeDirectoryPath string) (err error) + func SetMemcached(key string, value interface{}) + func SetMemcachedLong(key string, value interface{}, d time.Duration) + func SetTiered(key string, value interface{}, redisExpiration time.Duration) + func SetTieredLongTerm(key string, value interface{}) + func SetTieredShortTerm(key string, value interface{}) + func SleepBackedOff(retries int64, slotTime time.Duration, maximum time.Duration) + func StoreAssetIDToCache(customerID string, location string, assetID string, DBassetID uint32) + func StoreAverageStateTimeToCache(key string, data []interface{}) + func StoreCalculatateLowSpeedStatesToCache(from time.Time, to time.Time, assetID uint32, ...) + func StoreCustomerConfigurationToCache(customerID string, data datamodel.CustomerConfiguration) + func StoreDistinctProcessValuesToCache(customerID string, location string, assetID string, data []string) + func StoreProcessStatesToCache(key string, processedStateArray []datamodel.StateEntry) + func StoreProductIDToCache(productName int32, DBassetID uint32, DBProductId uint32) + func StoreRawCountsToCache(assetID uint32, from time.Time, to time.Time, data []datamodel.CountEntry) + func StoreRawShiftsToCache(assetID uint32, from time.Time, to time.Time, ...) + func StoreRawStatesToCache(assetID uint32, from time.Time, to time.Time, ...) + func StoreUniqueProductIDToCache(aid string, DBassetID uint32, uid uint32) + func Uint128ToBytes(a xxh3.Uint128) (b []byte) + func UniqueInt(input []int) []int + type Content struct + DeviceID int64 + HasMoreVersions bool + IndicationOfSource string + IoLinkRev string + IoddID int64 + IoddStatus string + ProductID string + ProductName string + ProductVariantID int64 + UploadDate int64 + VendorID int64 + VendorName string + VersionString string + type IoDDFile struct + Context Content + File []byte + Name string + func GetIoddFile(vendorId int64, deviceId int) (files []IoDDFile, err error) + type Ioddfinder struct + Content []Content + First bool + Last bool + Number int64 + NumberOfElements int64 + Size int64 + Sort []interface{} + TotalElements int64 + TotalPages int64 + func UnmarshalIoddfinder(data []byte) (Ioddfinder, error) + func (r *Ioddfinder) Marshal() ([]byte, error) + type TopicInformation struct + AssetId string + CustomerId string + ExtendedTopics []string + Location string + MacAddressOfCamera *string + Topic string + TransmitterId *string + func GetTopicInformationCached(topic string) *TopicInformation + type Xy struct + X []float64 + Y []float64 + func (d Xy) Len() int + func (d Xy) XY(i int) (x, y float64)