Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SliceContainsString ¶
SliceContainsString returns true if the specified slice of strings contains the give value, false otherwise.
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 ¶
type IDGenerator interface { // GenerateID generates a new identifier. GenerateID() string }
IDGenerator defines contract for generating universally unique identifiers.
func NewGoogleUUIDGenerator ¶
func NewGoogleUUIDGenerator() IDGenerator
NewGoogleUUIDGenerator constructs a new IDGenerator implemented with Google's UUID module.
func NewSimpleIDGenerator ¶
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.