Documentation ¶
Overview ¶
Package etag provides functions for parsing and generating globally unique ETags from a UUID and updated-at timestamp.
Tags generated by this package are designed to support optimistic concurrency control at the web server and database levels without requiring a full hash of the resource or any additional data to be persisted.
For Postgres, the resolution of the timestamp field is 1 microsecond, which is sufficient for all expected workloads.
All tags generated by this package are considered strong ETags, since identical tags necessarily correspond to identical resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ETag ¶
type ETag struct {
// contains filtered or unexported fields
}
ETag uniquely identifies a version of an entity.
type ParseETagError ¶
ParseETagError represents any failure to parse an ETag from a string.
func (*ParseETagError) Error ¶
func (e *ParseETagError) Error() string