MCPcopy Create free account

hub / github.com/andrey-vk/wdbgp / functions

Functions1,274 in github.com/andrey-vk/wdbgp

↓ 2 callersMethodDeleteFeed
(ctx context.Context, id int64)
internal/store/feeds.go:248
↓ 2 callersMethodDeletePeer
(context.Context, string, int64)
internal/web/types.go:21
↓ 2 callersMethodDeleteSetting
(ctx context.Context, key string)
internal/settings/setting.go:16
↓ 2 callersMethodForkAdapter
ForkAdapter creates a copy of the adapter with auto-naming (_copy_N suffix).
internal/store/feed_adapters.go:350
↓ 2 callersMethodForkedAdapterNeedsReview
ForkedAdapterNeedsReview returns true when the built-in adapter that a fork was created from has been updated since the fork was made.
internal/store/feed_adapters.go:261
↓ 2 callersFunctionNewCircuitBreakerManager
NewCircuitBreakerManager creates a new circuit breaker manager.
internal/retry/circuitbreaker.go:246
↓ 2 callersFunctionNewTestStoreWith
NewTestStoreWith returns a Store pre-loaded with the given key-value pairs.
internal/settings/test_helper.go:12
↓ 2 callersFunctionNormalizeFilterMode
(mode string)
internal/store/routes.go:407
↓ 2 callersFunctionNormalizePrefix
(value string)
internal/store/store.go:505
↓ 2 callersFunctionParse
(payload []byte, lookup map[string][]string, defaultCategory string)
internal/feeds/feeds.go:395
↓ 2 callersMethodPruneOrphanPrefixes
PruneOrphanPrefixes deletes dictionary prefixes no longer referenced by any catalog entry. Run after a feed resync (outside its transaction): resync r
internal/store/dictionaries.go:213
↓ 2 callersMethodPurgeUserSnapshots
PurgeUserSnapshots deletes user snapshots older than N days, keeping the newest record just outside the window for graph continuity.
internal/store/snapshots.go:211
↓ 2 callersMethodSaveSetting
(ctx context.Context, key, value string)
internal/settings/setting.go:15
↓ 2 callersMethodSerialize
Serialize encodes the NOTIFICATION message to wire format including header.
internal/bgp/wire_encode.go:200
↓ 2 callersMethodSerialize
Serialize encodes the Large Communities path attribute value (RFC 8092).
internal/bgp/wire_encode.go:264
↓ 2 callersMethodSetMax
(n int)
internal/web/middleware.go:135
↓ 2 callersFunctionSetUserCatalogModeTx
SetUserCatalogModeTx sets a user's catalog_mode_id within an existing transaction, so callers that also need to persist selection changes in the same
internal/store/users.go:853
↓ 2 callersMethodUserNetworks
(ctx context.Context, userID int64)
internal/store/users.go:205
↓ 2 callersFunctionValidateFeedAdapter
(adapter FeedAdapter)
internal/store/feed_adapters.go:409
↓ 2 callersFunctionWarn
(msg string, args ...any)
internal/logging/logging.go:135
↓ 2 callersMethodWithContext
WithContext creates a new context with the logger embedded
internal/logging/logging.go:95
↓ 2 callersFunctionWithLogger
WithLogger adds a logger to the context
internal/logging/logging.go:106
↓ 2 callersMethodWithRequestID
WithRequestID returns a new logger with request ID added to all logs
internal/logging/logging.go:76
↓ 2 callersFunctionWithRequestIDContext
WithRequestIDContext creates a new context with request ID
internal/logging/logging.go:100
↓ 2 callersFunctionaddFeedTx
addFeedTx inserts a feeds row within an existing transaction, shared by AddFeed and AddFeedWithMode.
internal/store/feeds.go:156
↓ 2 callersFunctionaggregateFamily
(prefixes []netip.Prefix)
internal/prefixfilter/aggregate.go:44
↓ 2 callersMethodallowRequest
allowRequest checks if a request should be allowed.
internal/retry/circuitbreaker.go:150
↓ 2 callersMethodapiFeedsDelete
(w http.ResponseWriter, r *http.Request)
internal/web/handlers_api_feeds.go:214
↓ 2 callersMethodapiFeedsGet
(w http.ResponseWriter, r *http.Request)
internal/web/handlers_api_feeds.go:58
↓ 2 callersMethodapiModeCommunitiesGenerate
apiModeCommunitiesGenerate handles POST /api/admin/modes/{id}/communities/generate.
internal/web/handlers_api_modes.go:483
↓ 2 callersMethodapiModeFeedsGet
--- Mode-Feed assignment handlers --- apiModeFeedsGet handles GET /api/admin/modes/{id}/feeds.
internal/web/handlers_api_modes.go:218
↓ 2 callersMethodapiModesList
--- Mode CRUD handlers --- apiModesList handles GET /api/admin/modes.
internal/web/handlers_api_modes.go:40
↓ 2 callersMethodapiModesUpdate
apiModesUpdate handles PUT /api/admin/modes/{id}.
internal/web/handlers_api_modes.go:129
↓ 2 callersMethodapiUserCredentialsList
apiUserCredentialsList handles GET /api/admin/users/{id}/credentials.
internal/web/handlers_api_users.go:796
↓ 2 callersMethodapiUserPeerState
apiUserPeerState handles GET /api/admin/users/{id}/peer-state.
internal/web/handlers_api_users.go:876
↓ 2 callersMethodapiUsersDelete
apiUsersDelete handles DELETE /api/admin/users/{id}.
internal/web/handlers_api_users.go:752
↓ 2 callersMethodapiUsersNormalizeNetworks
apiUsersNormalizeNetworks handles POST /api/admin/users/normalize-networks. Given a raw list of CIDRs, returns the minimal equivalent set — masked, de
internal/web/handlers_api_users.go:145
↓ 2 callersFunctionapplyListenerMD5
applyListenerMD5 sets TCP MD5 keys on the listener socket for all configured peers that have passwords. This must be called before accepting connectio
internal/bgp/md5.go:51
↓ 2 callersFunctionapplyRouteFiltersToPrefixes
applyRouteFiltersToPrefixes applies route filters to prefixes without database queries
internal/store/routes.go:339
↓ 2 callersFunctionapplyTheme
()
webgui/src/admin/stores/theme.ts:19
↓ 2 callersFunctionassertPrefixes
(t *testing.T, got, want []string)
internal/bgp/manager_test.go:747
↓ 2 callersFunctionbackupAdapterSource
(adapter store.FeedAdapter, backupDir string, maxCopies int)
internal/web/handlers_api_adapters.go:251
↓ 2 callersFunctionbackupTimestamp
backupTimestamp extracts the sortable timestamp suffix from a backup filename ({prefix}_r{rev}_{timestamp}.js), so files can be ordered chronologicall
internal/web/handlers_api_adapters.go:311
↓ 2 callersMethodbgpStatusJSON
()
internal/web/handlers_api_bgp.go:11
↓ 2 callersFunctionbuildSockaddrStorage
buildSockaddrStorage builds a SockaddrStorage for the given address, using the specified socket address family (AF_INET or AF_INET6). Dual-stack IPv6
internal/bgp/md5.go:190
↓ 2 callersFunctionbuildVersion31DB
buildVersion31DB creates a database migrated through version 31 (the last text-based catalog schema) with representative catalog, selection, and commu
internal/store/032_normalize_catalog_test.go:17
↓ 2 callersFunctionclearCSRFCookie
clearCSRFCookie removes the CSRF cookie, mirroring session logout.
internal/web/middleware.go:81
↓ 2 callersFunctioncollectKeys
(obj: LocaleNodeMap, prefix = '')
webgui/src/locales/__tests__/i18n.test.ts:54
↓ 2 callersMethodcountFilteredPrefixes
countFilteredPrefixes applies the user's effective route filters to the prefixes and counts the IPv4/IPv6 survivors.
internal/store/catalog.go:344
↓ 2 callersMethoddbEnvKeys
dbEnvKeys exposes the storage/env keys for internal introspection only (see TestNoSettingIsBothDBAndEnvInaccessible) — a setting with both empty would
internal/settings/setting.go:51
↓ 2 callersFunctiondecodeStoredAddr
decodeStoredAddr renders a stored address BLOB as text; nil (SQL NULL) becomes "".
internal/store/users.go:100
↓ 2 callersFunctiondeduplicate
(entries []Entry)
internal/feeds/feeds.go:571
↓ 2 callersMethoddoHTTPRequest
(parsed *url.URL)
internal/feeds/javascript.go:282
↓ 2 callersMethoddownload
(ctx context.Context, rawURL string)
internal/feeds/feeds.go:336
↓ 2 callersFunctionencodeAddrArg
encodeAddrArg converts a textual IP to its stored BLOB form for use as a query argument.
internal/store/users.go:113
↓ 2 callersFunctionencodeUserAddrs
encodeUserAddrs converts a user's textual peer_ip/next_hop to their stored BLOB forms; an empty next_hop becomes nil (SQL NULL).
internal/store/users.go:404
↓ 2 callersFunctionexecuteDarkModeToggle
()
webgui/src/admin/layout/composables/layout.ts:35
↓ 2 callersFunctionfindFirstFree
findFirstFree returns the first integer >= start that is not in used.
internal/store/communities.go:19
↓ 2 callersFunctionfindFirstFree
findFirstFree returns the first integer >= start that is not in used.
internal/store/migrations/013_catalog_communities.go:33
↓ 2 callersMethodfireCallbacks
fireCallbacks invokes all registered callbacks with the given value.
internal/settings/setting.go:476
↓ 2 callersMethodfireCallbacks
fireCallbacks invokes all registered callbacks with the given value.
internal/settings/setting.go:487
↓ 2 callersFunctiongenCommunitiesRuntime
genCommunitiesRuntime generates communities using catalog_mode_feeds (post-migration-20). Used by GenerateCommunities during normal runtime operation.
internal/store/communities.go:162
↓ 2 callersFunctiongetsocketFamily
getsocketFamily returns the address family (AF_INET or AF_INET6) of the socket.
internal/bgp/md5.go:171
↓ 2 callersMethodhasEstablishedConn
hasEstablishedConn reports whether the peer has any BGP session in progress (CONNECT/OPENSENT/OPENCONFIRM/ESTABLISHED). Used to prevent duplicate sess
internal/bgp/peer_fsm.go:67
↓ 2 callersMethodhttpError
(w http.ResponseWriter, r *http.Request, key string, status int)
internal/web/handlers_health.go:157
↓ 2 callersFunctioninsertFeedSnapshotCounts
(ctx context.Context, tx *sql.Tx, snapshotID int64, prefixes map[int64]int)
internal/store/snapshots.go:132
↓ 2 callersFunctioninsertRouteFilters
(ctx context.Context, tx *sql.Tx, userID int64, filters RouteFilters)
internal/store/routes.go:473
↓ 2 callersMethodinternalError
(w http.ResponseWriter, r *http.Request, err error)
internal/web/handlers_health.go:162
↓ 2 callersFunctionintersect
(input, allow []netip.Prefix)
internal/prefixfilter/filter.go:38
↓ 2 callersFunctionintersectRanges
(left, right addressRange)
internal/web/cidr_debug.go:203
↓ 2 callersFunctionisLegacyOpenCCKFeedCategory
(category string)
internal/feeds/feeds.go:326
↓ 2 callersFunctionisValidWebAuth
(mode string)
internal/web/handlers_api_users.go:21
↓ 2 callersMethodkeepaliveLoop
keepaliveLoop sends periodic keepalive messages on conn at the configured interval (holdTime/3). Exits when the stop channel is closed or a write fail
internal/bgp/peer_keepalive.go:11
↓ 2 callersFunctionlower
lower returns lowercase string.
internal/retry/retry.go:240
↓ 2 callersMethodmergedAllowedHosts
mergedAllowedHosts merges the adapter's declared additional hosts with user-provided ones. Must be called before opening a transaction: it queries s.D
internal/store/feeds.go:147
↓ 2 callersFunctionnormalizeWithTrie
normalizeWithTrie uses a binary trie for O(m) containment checks
internal/prefixfilter/filter.go:196
↓ 2 callersFunctionparseRouteFilters
(filters RouteFilters)
internal/store/routes.go:531
↓ 2 callersFunctionpeerPort
peerPort returns the destination port for a peer connection. Dynamic peers (0.0.0.0/::) are passive-only: Port=-1 prevents active dialing. When active
internal/bgp/manager.go:594
↓ 2 callersFunctionportFilePath
portFilePath returns where the HTTP listen port is recorded so that a separate `wdbgp healthcheck` invocation can find it. It lives next to the databa
cmd/wdbgp/main.go:383
↓ 2 callersFunctionprintStats
(ctx context.Context, db *store.Store)
cmd/wdbgp/main.go:299
↓ 2 callersMethodqueryPrefixes
queryPrefixes runs a query returning (ip BLOB, bits) rows and decodes them, skipping default routes (a feed-provided default route is never a useful s
internal/store/catalog.go:312
↓ 2 callersFunctionrangeSize
(value addressRange)
internal/web/cidr_debug.go:248
↓ 2 callersMethodreadAppliedMigrations
(ctx context.Context)
internal/store/store.go:130
↓ 2 callersMethodreconcileLocked
(ctx context.Context)
internal/bgp/manager.go:411
↓ 2 callersMethodrecordResult
recordResult records the result of an operation.
internal/retry/circuitbreaker.go:183
↓ 2 callersFunctionreplaceNetworks
(ctx context.Context, tx *sql.Tx, userID int64, networks []string)
internal/store/users.go:465
↓ 2 callersFunctionrequestLocale
(r *http.Request, fallback locale)
internal/web/i18n.go:41
↓ 2 callersMethodreserveRequest
()
internal/feeds/javascript.go:372
↓ 2 callersFunctionresolveCommunityKey
resolveCommunityKey maps a (category, service) name pair to dictionary ids, creating dictionary rows as needed. service="" resolves to the group-level
internal/store/communities.go:128
↓ 2 callersFunctionroutePrefixStrings
(routes []Route)
internal/bgp/manager_test.go:739
↓ 2 callersFunctionrun
()
cmd/wdbgp/main.go:29
↓ 2 callersFunctionscanUserRow
(row rowScanner)
internal/store/users.go:134
↓ 2 callersFunctionsetLanguageCookie
(locale: Locale)
webgui/src/plugins/i18n.ts:23
↓ 2 callersFunctionskipAdGuardMatcher
(r io.Reader)
internal/feeds/srs_adguard.go:9
↓ 2 callersFunctionskipDomainMatcher
(r io.Reader)
internal/feeds/srs_skip.go:112
↓ 2 callersFunctionskipNetworkInterfaceAddress
(ctx context.Context, r io.Reader)
internal/feeds/srs_skip.go:198
↓ 2 callersFunctionskipPrefixArray
(ctx context.Context, r io.Reader)
internal/feeds/srs_skip.go:164
↓ 2 callersFunctionskipRemainingItemsForConstraint
skipRemainingItemsForConstraint consumes all items in a default rule until srsItemFinal. Used when we encounter an unparseable item (like domain match
internal/feeds/srs_skip.go:252
↓ 2 callersFunctionskipUint16Array
(r io.Reader)
internal/feeds/srs_skip.go:88
↓ 2 callersFunctionskipUint8Array
(r io.Reader)
internal/feeds/srs_skip.go:100
← previousnext →301–400 of 1,274, ranked by callers