Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultTimeout = 20 * time.Second // Default timeout for database requests, in seconds DefaultBusyTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func ValidIdentifier ¶
Validates an identifier, such as table or DB name.
Types ¶
type GetConnectionStringOpts ¶
type GetConnectionStringOpts struct { // Enabled foreign keys EnableForeignKeys bool }
GetConnectionStringOpts contains options for GetConnectionString
type SqliteAuthMetadata ¶
type SqliteAuthMetadata struct { ConnectionString string `mapstructure:"connectionString" mapstructurealiases:"url"` Timeout time.Duration `mapstructure:"timeout" mapstructurealiases:"timeoutInSeconds"` BusyTimeout time.Duration `mapstructure:"busyTimeout"` DisableWAL bool `mapstructure:"disableWAL"` // Disable WAL journaling. You should not use WAL if the database is stored on a network filesystem (or data corruption may happen). This is ignored if the database is in-memory. }
SqliteAuthMetadata contains the auth metadata for a SQLite component.
func (*SqliteAuthMetadata) GetConnectionString ¶
func (m *SqliteAuthMetadata) GetConnectionString(log logger.Logger, opts GetConnectionStringOpts) (string, error)
GetConnectionString returns the parsed connection string.
func (SqliteAuthMetadata) IsInMemoryDB ¶
func (m SqliteAuthMetadata) IsInMemoryDB() bool
IsInMemoryDB returns true if the connection string is for an in-memory database.
func (*SqliteAuthMetadata) Validate ¶
func (m *SqliteAuthMetadata) Validate() error
Validate the auth metadata and returns an error if it's not valid.
Click to show internal directories.
Click to hide internal directories.