Documentation
¶
Overview ¶
Package apiinit contains internal implementation for InitializeRuntime
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeRuntime ¶
func InitializeRuntime(runtimeConfig *apptypes.RuntimeConfig) (*apptypes.MobsqlRuntime, error)
InitializeRuntime must be called before all other functions for mobsql and it creates the [MobsqlRuntime]. This holds the database connection and calling this function ensures some bootstrapping DB seeding etc. occurs.
Internally this function does 4 primary things:
- Opens the SQLite database - setting pragmas etc according
- Runs schema creation logic (e.g. create tables)
- Fetches from HTTP the Mobility Database CSV file & imports to _mdb table (cached)
- Returns the prepared 'runtime', returning MobsqlRuntime{} which all other APIs operate based on (which contains the opened DB)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.