Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clock ¶
Clock wraps the Now method. Introduced to allow replacing the global state with fixed clocks to facilitate testing. Now returns the current time.
func NewFixedClock ¶
func NewSystemClock ¶
func NewSystemClock() Clock
type IDGenerator ¶ added in v0.7.0
type IDGenerator interface { // GenerateID generates a new identifier. GenerateID() string }
IDGenerator defines contract for generating universally unique identifiers.
func NewGoogleUUIDGenerator ¶ added in v0.7.0
func NewGoogleUUIDGenerator() IDGenerator
NewGoogleUUIDGenerator constructs a new IDGenerator implemented with Google's UUID module.
func NewSimpleIDGenerator ¶ added in v0.7.0
func NewSimpleIDGenerator() IDGenerator
NewSimpleIDGenerator constructs a simple IDGenerator that starts at 1, increments up to 999999999999, and then rolls over.
Click to show internal directories.
Click to hide internal directories.