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 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
Click to show internal directories.
Click to hide internal directories.