Documentation ¶
Index ¶
- func CreateFacilityMap(dbs *sql.DB) (map[string]Facility, error)
- func Delete(dbs *sql.DB, name string) error
- func Insert(dbs *sql.DB, facilities *[]Facility, coefficients Coefficients) error
- func UpdateCoefficients(dbs *sql.DB, facility Facility) error
- type Coefficients
- type CountType
- type Facility
- type RequestBody
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFacilityMap ¶
CreateFacilityMap builds a map[string] based of array of facilities for search efficiency
Types ¶
type Coefficients ¶
type Coefficients struct { // Percent of inventory that is sold daily DailyInventoryPercentage float64 `json:"dailyinventorypercentage" db:"dailyinventorypercentage"` // Probability of an unreadable tag becoming readable again each day (i.e. moved or retagged) ProbUnreadToRead float64 `json:"probunreadtoread" db:"probunreadtoread"` // Probability of a tag in the store being read by the overhead sensor each day ProbInStoreRead float64 `json:"probinstoreread" db:"probinstoreread"` // Probability of an exit error (missed 'departed' event) occurring ProbExitError float64 `json:"probexiterror" db:"probexiterror"` }
Coefficients represents a set of attributes to calculate confidence
type CountType ¶
type CountType struct {
Count *int `json:"count"`
}
CountType represents a wrapper for count and inlinecount
type Facility ¶
type Facility struct { // Facility name Name string `json:"name" db:"name"` // The coefficients used in the probabilistic inventory algorithm Coefficients Coefficients `json:"coefficients" db:"coefficients"` }
Facility represents a facility model
type RequestBody ¶
type RequestBody struct { FacilityID string `json:"facility_id"` DailyInventoryPercentage float64 `json:"dailyinventorypercentage"` ProbUnreadToRead float64 `json:"probunreadtoread"` ProbInStoreRead float64 `json:"probinstoreread"` ProbExitError float64 `json:"probexiterror"` }
RequestBody represents a struct for the requestBody to Update facility collection
Click to show internal directories.
Click to hide internal directories.