Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andrey-vk/wdbgp
/ functions
Functions
1,274 in github.com/andrey-vk/wdbgp
⨍
Functions
1,274
◇
Types & classes
158
Function
TestUserBGPPasswordToggle
============================================================================= TestUserBGPPasswordToggle — 4-way BGP password enable/disable logic ====
internal/web/handlers_api_users_test.go:1637
Function
TestUserByIPFallsBackWhenBestMatchIsDisabled
TestUserByIPFallsBackWhenBestMatchIsDisabled — a disabled user's leftover network must never shadow an enabled user's overlapping-but-broader network.
internal/store/users_by_ip_test.go:92
Function
TestUserByIPIgnoresLoginModeNetworks
(t *testing.T)
internal/store/users_by_ip_test.go:9
Function
TestUserByIPStillPrefersMoreSpecificActiveNetwork
(t *testing.T)
internal/store/users_by_ip_test.go:42
Function
TestUserCannotChangeCatalogModeWithoutPermission
(t *testing.T)
internal/store/catalog_test.go:101
Function
TestUserLoginSessionCookieSentinel
============================================================================= TestUserLoginSessionCookieSentinel — session_max_age=0 must produce a br
internal/web/handlers_api_user_test.go:218
Function
TestUserLogoutCookiesSecureBehindProxy
(t *testing.T)
internal/web/handlers_api_user_test.go:184
Function
TestUserMeReturnsLowercaseFilterKeys
============================================================================= TestUserMeReturnsLowercaseFilterKeys — apiUserMe embeds store.RouteFilte
internal/web/handlers_api_user_test.go:373
Function
TestUserSaveFiltersRejectsInvalidCIDR
============================================================================= TestUserSaveFiltersRejectsInvalidCIDR — apiUserSaveFilters must not pers
internal/web/handlers_api_user_test.go:332
Function
TestUserSaveSelectionsPreservesHidden
============================================================================= TestUserSaveSelectionsPreservesHidden — when a feed is disabled, its cat
internal/web/handlers_api_user_test.go:425
Function
TestUserSwitchModeSurfacesReconcileFailure
============================================================================= TestUserSwitchModeSurfacesReconcileFailure — apiUserSwitchMode must not
internal/web/handlers_api_user_test.go:276
Function
TestUsersCRUD
============================================================================= TestUsersCRUD — create, read, update, delete lifecycle =================
internal/web/handlers_api_users_test.go:71
Function
TestUsersCreateAnyModeAllowsEmptyNetworks
============================================================================= TestUsersCreateAnyModeAllowsEmptyNetworks — web_auth="any" authenticates
internal/web/handlers_api_users_test.go:346
Function
TestUsersCreateBothModeRequiresNetworks
TestUsersCreateBothModeRequiresNetworks confirms "both" is not accidentally exempted alongside "any" — it genuinely needs IP match.
internal/web/handlers_api_users_test.go:361
Function
TestUsersCreateRejectsDisabledCatalogModeID
(t *testing.T)
internal/web/handlers_api_users_test.go:456
Function
TestUsersCreateRejectsNonexistentCatalogModeID
============================================================================= TestUsersCreate/UpdateRejects*CatalogModeID — apiUsersCreate/apiUsersUpd
internal/web/handlers_api_users_test.go:443
Function
TestUsersCreateValidation
============================================================================= TestUsersCreateValidation — required fields ============================
internal/web/handlers_api_users_test.go:296
Function
TestUsersCreateWithNetworks
============================================================================= TestUsersCreateWithNetworks — POST with networks array =================
internal/web/handlers_api_users_test.go:248
Function
TestUsersCreateWithPassword
============================================================================= TestUsersCreateWithPassword — POST with bgp_password ===================
internal/web/handlers_api_users_test.go:193
Function
TestUsersCredentialsLifecycle
============================================================================= TestUsersCredentialsLifecycle — credential management ==================
internal/web/handlers_api_users_test.go:636
Function
TestUsersListEmpty
============================================================================= TestUsersListEmpty — GET /api/admin/users with empty DB ================
internal/web/handlers_api_users_test.go:46
Function
TestUsersNotFound
============================================================================= TestUsersNotFound — 404 cases ==========================================
internal/web/handlers_api_users_test.go:840
Function
TestUsersPartialUpdateDoubleToggleNoPassword
============================================================================= TestUsersPartialUpdateDoubleToggleNoPassword — toggle enabled twice on u
internal/web/handlers_api_users_test.go:1310
Function
TestUsersPartialUpdateDoubleToggleWithPassword
============================================================================= TestUsersPartialUpdateDoubleToggleWithPassword — toggle enabled twice on
internal/web/handlers_api_users_test.go:1246
Function
TestUsersPartialUpdateEnabledOnly
============================================================================= TestUsersPartialUpdateEnabledOnly — PUT with only enabled field ========
internal/web/handlers_api_users_test.go:877
Function
TestUsersPartialUpdateEnabledToggle
============================================================================= TestUsersPartialUpdateEnabledToggle — PUT {"enabled": false} only ======
internal/web/handlers_api_users_test.go:1154
Function
TestUsersPartialUpdateEnabledToggleWithPassword
============================================================================= TestUsersPartialUpdateEnabledToggleWithPassword — PUT {"enabled": false}
internal/web/handlers_api_users_test.go:1206
Function
TestUsersPartialUpdateFilterOneSidePreservesTheOther
TestUsersPartialUpdateFilterOneSidePreservesTheOther guards against a bug where PUT with only filter_allow (or only filter_deny) silently wiped the om
internal/web/handlers_api_users_test.go:1015
Function
TestUsersPartialUpdateFiltersOnly
============================================================================= TestUsersPartialUpdateFiltersOnly — PUT with only filter fields ========
internal/web/handlers_api_users_test.go:976
Function
TestUsersPartialUpdateInvalidEmptyName
============================================================================= TestUsersPartialUpdateInvalidEmptyName — PUT name="" returns 400 =======
internal/web/handlers_api_users_test.go:1125
Function
TestUsersPartialUpdateNameOnly
============================================================================= TestUsersPartialUpdateNameOnly — PUT with only name field ==============
internal/web/handlers_api_users_test.go:925
Function
TestUsersPartialUpdatePasswordOnly
============================================================================= TestUsersPartialUpdatePasswordOnly — PUT with only password fields =====
internal/web/handlers_api_users_test.go:1080
Function
TestUsersPeerState
============================================================================= TestUsersPeerState — peer state endpoint ===============================
internal/web/handlers_api_users_test.go:720
Function
TestUsersStatuses
============================================================================= TestUsersStatuses — batch peer-status endpoint =========================
internal/web/handlers_api_users_test.go:813
Function
TestUsersUpdateAnyModeAllowsEmptyNetworks
TestUsersUpdateAnyModeAllowsEmptyNetworks confirms the update path doesn't wrongly demand a network for "any" either.
internal/web/handlers_api_users_test.go:407
Function
TestUsersUpdateNetworkModeRequiresNetworks
TestUsersUpdateNetworkModeRequiresNetworks guards a gap where apiUsersUpdate never enforced this at all — a user could be switched to web_auth="networ
internal/web/handlers_api_users_test.go:378
Function
TestUsersUpdatePasswordToggle
============================================================================= TestUsersUpdatePasswordToggle — password_enabled =======================
internal/web/handlers_api_users_test.go:559
Function
TestUsersUpdateRejectsDisabledCatalogModeID
(t *testing.T)
internal/web/handlers_api_users_test.go:477
Function
TestUsersUpdateWithoutModeChangeSucceedsEvenIfCurrentModeDisabled
TestUsersUpdateWithoutModeChangeSucceedsEvenIfCurrentModeDisabled — an update that doesn't touch catalog_mode_id at all must not be rejected just beca
internal/web/handlers_api_users_test.go:515
Function
TestValidCSRFRequest
============================================================================= TestValidCSRFRequest — double-submit cookie check: safe methods are alwa
internal/web/middleware_test.go:159
Function
TestValidateDBPath
TestValidateDBPath guards against a WDBGP_DB whose parent directory exists but isn't usable (not a directory, or not writable) — a nonexistent parent
internal/settings/settings_test.go:1031
Function
TestValidateHost
TestValidateHost guards against WDBGP_HOST=<host>:<port> — a natural typo since the port is actually configured separately via WDBGP_PORT — being sile
internal/settings/settings_test.go:995
Function
TransientError
TransientError creates a transient error.
internal/errors/errors.go:123
Method
TryLockFeed
TryLockFeed attempts to acquire the per-feed mutex without blocking. Returns the mutex and true if the lock was acquired, nil and false if another syn
internal/feeds/feeds.go:119
Method
TypeCode
()
internal/bgp/wire_types.go:75
Method
TypeCode
TypeCode returns the path attribute type code for ORIGIN (1).
internal/bgp/wire_types.go:125
Method
TypeCode
TypeCode returns the path attribute type code for NEXT_HOP (3).
internal/bgp/wire_types.go:130
Method
TypeCode
TypeCode returns the path attribute type code for MP_REACH_NLRI (14).
internal/bgp/wire_types.go:135
Method
TypeCode
TypeCode returns the path attribute type code for MP_UNREACH_NLRI (15).
internal/bgp/wire_types.go:140
Method
TypeCode
TypeCode returns the path attribute type code for AS_PATH (2).
internal/bgp/wire_types.go:145
Method
TypeCode
TypeCode returns the path attribute type code for Large Communities (32).
internal/bgp/wire_types.go:150
Method
UnlockFeed
UnlockFeed releases the per-feed mutex previously acquired by TryLockFeed.
internal/feeds/feeds.go:133
Method
Unwrap
Unwrap returns the wrapped error.
internal/errors/errors.go:39
Method
UpdatePeer
(context.Context, store.User)
internal/web/server_test.go:92
Method
UserByName
UserByName returns a user by name for testing convenience.
internal/store/store_auth_settings_test.go:900
Function
UserError
UserError creates a user error.
internal/errors/errors.go:118
Function
V001
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/001_initial_schema.go:8
Function
V002
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/002_ipv6_feeds.go:8
Function
V003
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/003_lookup_indexes.go:8
Function
V004
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/004_deduplicate_feeds.go:8
Function
V005
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/005_route_filters.go:8
Function
V006
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/006_filter_mode.go:8
Function
V007
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/007_drop_legacy_opencck.go:8
Function
V008
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/008_drop_orphan_selections.go:8
Function
V009
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/009_catalog_modes.go:8
Function
V010
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/010_switch_ipranges.go:8
Function
V011
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/011_feed_adapters.go:8
Function
V012
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/012_query_indexes.go:8
Function
V013
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/013_catalog_communities.go:9
Function
V014
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/014_web_auth.go:8
Function
V015
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/015_app_settings.go:8
Function
V016
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/016_credentials_unique.go:8
Function
V017
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/017_sync_interval.go:8
Function
V018
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/018_feed_data.go:8
Function
V019
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/019_singbox_srs.go:8
Function
V020
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/020_adapter_m2m.go:8
Function
V020NoTxSQL
V020NoTxSQL removes peer_ip UNIQUE constraint (issue #17). Must run outside migration transaction because SQLite doesn't support ALTER TABLE DROP CONS
internal/store/migrations/020_adapter_m2m.go:77
Function
V023
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/023_active_dial.go:8
Function
V024
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/024_adapter_fork.go:8
Function
V025
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/025_feed_hosts.go:10
Function
V026
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/026_metric_snapshots.go:8
Function
V027
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/027_adapter_is_builtin.go:8
Function
V028
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/028_drop_adapter_allowed_hosts.go:10
Function
V029
(ctx context.Context, tx *sql.Tx)
internal/store/migrations/029_filter_settings.go:9
Function
V030
V030 is a one-time, alpha-stage data cleanup: it removes overlapping networks between different users whose web_auth is network/both/any (login-mode u
internal/store/migrations/030_dedupe_overlapping_networks.go:37
Function
V031
V031 drops feed_adapters.key. It was originally the join column back to the Go-source-hardcoded builtInAdapters map (see internal/store/ feed_adapters
internal/store/migrations/031_drop_adapter_key.go:24
Function
V031NoTxSQL
V031NoTxSQL performs the feed_adapters rebuild. Must run outside the migration transaction so PRAGMA foreign_keys actually takes effect. Runs as a si
internal/store/migrations/031_drop_adapter_key.go:46
Function
V032
V032 normalizes the catalog schema around numeric keys: - categories(id, name) and services(id, category_id, name) dictionaries replace the category/
internal/store/migrations/032_normalize_catalog.go:27
Function
V032NoTxSQL
V032NoTxSQL performs the catalog normalization. Runs outside the migration transaction and must be idempotent: it can be killed at any statement bound
internal/store/migrations/032_normalize_catalog.go:43
Function
V033
V033 moves the user tables to binary IP storage and integer enums: - users: peer_ip and next_hop become 4/16-byte address BLOBs; filter_mode and web_
internal/store/migrations/033_binary_users.go:30
Function
V033NoTxSQL
V033NoTxSQL performs the rebuilds. Idempotent via the same per-table state machine as migration 32: old column present → rebuild; table missing → fini
internal/store/migrations/033_binary_users.go:40
Function
V034
V034 finishes the numeric-schema cleanup on the remaining tables: - catalog_modes.key is dropped — same rationale as feed_adapters.key in migration 3
internal/store/migrations/034_epoch_timestamps_drop_mode_key.go:23
Function
V034NoTxSQL
V034NoTxSQL performs the rebuilds, idempotent via the migration 32/33 per-table state machine.
internal/store/migrations/034_epoch_timestamps_drop_mode_key.go:29
Function
V035
V035 replaces feed_snapshots.prefixes — a JSON TEXT map of feed_id→prefix count — with a proper child table: feed_snapshot_counts(snapshot_id, feed_
internal/store/migrations/035_feed_snapshot_counts.go:20
Function
V035NoTxSQL
V035NoTxSQL performs the conversion, idempotent via the usual per-table state machine. The JSON decode needs a Go loop; it runs before the parent rebu
internal/store/migrations/035_feed_snapshot_counts.go:28
Method
WithContext
WithContext adds context to the error.
internal/errors/errors.go:240
Method
WithContextMap
WithContextMap adds multiple context values to the error.
internal/errors/errors.go:69
Method
WithContextMap
WithContextMap adds multiple context values to the error.
internal/errors/errors.go:246
Function
WrapBuilder
WrapBuilder creates a new error builder wrapping an existing error.
internal/errors/errors.go:233
Method
Write
(b []byte)
internal/logging/logging.go:246
← previous
next →
1,101–1,200 of 1,274, ranked by callers