This directory contains example code demonstrating various features of the ooo library.
| Sample | Description |
|---|---|
| basic_server | Minimal server setup |
| static_routes_filters_audit | Static mode, filters, and API key authentication |
| storage_api | Direct storage read/write operations |
| io_operations | Typed I/O helpers (Get, Set, Push, GetList) |
| websocket_subscribe_list | Real-time subscription to list paths |
| websocket_subscribe_single | Real-time subscription to single items |
| remote_io_operations | Remote HTTP operations with retry support |
| custom_endpoints | Custom HTTP endpoints with typed schemas for UI |
| Sample | Description | Requires |
|---|---|---|
| persistent_storage_ko | Persistent storage with LevelDB | go get github.com/benitogf/ko |
| jwt_auth | JWT authentication | go get github.com/benitogf/auth github.com/benitogf/ko |
| limit_filter | Capped collections with auto-cleanup | (none) |
| limit_filter_with_validation | LimitFilter with strict schema validation | (none) |
These samples demonstrate integration with other packages in the ecosystem.
| Sample | Description | Requires |
|---|---|---|
| custom_endpoints_nopog | Custom endpoints with PostgreSQL storage | go get github.com/benitogf/nopog |
| pivot_synchronization | Multi-instance synchronization | go get github.com/benitogf/pivot |
| proxy | Proxy routes to remote ooo servers | (none) |
Each sample is a standalone Go program. To run a sample:
cd samples/basic_server
go run main.goFor ecosystem samples, install dependencies first:
# For persistent storage
go get github.com/benitogf/ko
# For JWT auth
go get github.com/benitogf/auth github.com/benitogf/ko