ims

package
v1.1.5-retractions Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 7 Imported by: 67

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TryIfModifiedSinceQuery

func TryIfModifiedSinceQuery(tx *sqlx.Tx, h http.Header, queryValues map[string]interface{}, query string) (bool, time.Time)

TryIfModifiedSinceQuery for components that DO NOT implement the CRUDER interface(s). Checks to see the max time that an entity was changed, and then returns a boolean (which tells us whether or not to run the main query for the endpoint) along with the max time If the returned boolean is false, there is no need to run the main query for the GET API endpoint, and we return a 304 status

Types

type LatestTimestamp

type LatestTimestamp struct {
	LatestTime *tc.TimeNoMod `json:"latestTime" db:"max"`
}

LatestTimestamp to keep track of the max of "last updated" times in tables.

Jump to

Keyboard shortcuts

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