handlers

package
v0.0.0-...-de2618e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfidence

func ApplyConfidence(session *sql.DB, tags []tag.Tag, url string) error

ApplyConfidence calculates the confidence to each tag using the facility coefficients this function can be reused by endpoints with odata for multiple facilities

func MapOfTags

func MapOfTags(tag *tag.Tag, selectFields map[string]bool) map[string]interface{}

MapOfTags creates a map for selected fields in query string

func UpdateForCycleCount

func UpdateForCycleCount(tags []tag.Tag)

Types

type Inventory

type Inventory struct {
	MasterDB *sql.DB
	MaxSize  int
	Url      string
}

Inventory represents the User API method handler set.

func (*Inventory) DeleteAllTags

func (inve *Inventory) DeleteAllTags(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

DeleteAllTags removes the tag's epc context value 204 StatusNoContent, 400 Bad Request, 500 Internal

func (*Inventory) DeleteEpcContext

func (inve *Inventory) DeleteEpcContext(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

DeleteEpcContext removes the tag's epc context value 200 OK, 400 Bad Request, 500 Internal

func (*Inventory) GetFacilities

func (inve *Inventory) GetFacilities(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

GetFacilities retrieves all Facilities from the database 200 OK, 400 Bad Request, 500 Internal

func (*Inventory) GetHandheldEvents

func (inve *Inventory) GetHandheldEvents(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

GetHandheldEvents retrieves all Handheld events from the database 200 OK, 400 Bad Request, 500 Internal

func (*Inventory) GetSearchByEpc

func (inve *Inventory) GetSearchByEpc(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

GetSearchByEpc returns a list of tags with their EPCs matching a pattern. Body parameters shall be provided in requestbody in JSON format.

func (*Inventory) GetSearchByProductID

func (inve *Inventory) GetSearchByProductID(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

GetSearchByProductID returns a list of unique EPCs matching the productId provided. Body parameters shall be provided in request body in JSON format.

func (*Inventory) GetTags

func (inve *Inventory) GetTags(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

GetTags retrieves all Tags from the database 200 OK, 400 Bad Request, 500 Internal Error nolint[: dupl[, gocyclo,...]]

func (*Inventory) Index

func (inve *Inventory) Index(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

Index is used for Docker Healthcheck commands to indicate whether the http server is up and running to take requests

func (*Inventory) PostCurrentInventory

func (inve *Inventory) PostCurrentInventory(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

PostCurrentInventory is used to send current inventory snapshot to the cloud connector

func (*Inventory) SetEpcContext

func (inve *Inventory) SetEpcContext(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

SetEpcContext updates the tag's epc context with the value in the request 200 OK, 400 Bad Request, 500 Internal nolint[: lll[, dupl, ...]]

func (*Inventory) UpdateCoefficients

func (inve *Inventory) UpdateCoefficients(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

UpdateCoefficients updates the coefficients by facility_id (name) in the facility collection 200 successful, 404 NotFound, 500 internal error nolint[: dupl[, lll, ...]]

func (*Inventory) UpdateQualifiedState

func (inve *Inventory) UpdateQualifiedState(ctx context.Context, writer http.ResponseWriter, request *http.Request) error

UpdateQualifiedState is for uploading inventory events such as those from a handheld RFID reader nolint[: lll[, dupl, ...]]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL