Documentation
¶
Overview ¶
Package storage contains common definitions to be used across service storage interfaces
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SQLDriver = definitions.GetEnvWithDefault("SQL_DRIVER", "sqlite3") DatabaseSource = definitions.GetEnvWithDefault("DATABASE_SOURCE", ":memory:") )
Functions ¶
func IsTKLessThan ¶
func IsTKLessThan(a TypeAndKey, b TypeAndKey) bool
Types ¶
type IDGenerator ¶
type IDGenerator interface { // New returns a new unique ID New() string }
IDGenerator is an interface which wraps the creation of unique IDs
type IsolationLevel ¶
type IsolationLevel int
const ( LevelDefault IsolationLevel = iota LevelReadUncommitted LevelReadCommitted LevelWriteCommitted LevelRepeatableRead LevelSnapshot LevelSerializable LevelLinearizable )
type TxOptions ¶
type TxOptions struct { Isolation IsolationLevel ReadOnly bool }
TxOptions specifies options for transactions
type TypeAndKey ¶
func (TypeAndKey) String ¶
func (tk TypeAndKey) String() string
type UUIDGenerator ¶
type UUIDGenerator struct{}
UUIDGenerator is an implementation of IDGenerator which uses uuidv4
func (*UUIDGenerator) New ¶
func (*UUIDGenerator) New() string
Click to show internal directories.
Click to hide internal directories.