Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/catvec/human-call-filter
/ functions
Functions
43 in github.com/catvec/human-call-filter
⨍
Functions
43
◇
Types & classes
13
↓ 13 callers
Function
writeStatus
writeStatus responds with a status code and the related status text
calls/resp.go:11
↓ 4 callers
Function
writeJSON
writeJSON responds to an HTTP request with JSON
dashboard/resp.go:12
↓ 3 callers
Function
makeAPIRequest
(path, method)
static/js/app.js:4
↓ 3 callers
Function
writeError
writeError responds to an HTTP request with a JSON response containing an error field
dashboard/resp.go:31
↓ 3 callers
Function
writeTwilioResp
writeTwilioResp writes a Twilio response as an HTTP response
calls/resp.go:16
↓ 2 callers
Function
shutdownHTTPServerOnExit
shutdownHTTPServerOnExit starts a go routine which waits for a Context to close and then gracefully shuts down an http.Server. The name argument will
main.go:132
↓ 2 callers
Function
startHTTPServer
startHTTPServer starts an http server in a go routine and exits if there is an error. The name argument is used to identify the http server if an err
main.go:114
↓ 1 callers
Function
Connect
Connect to a PostgreSQL database
libdb/conn.go:14
↓ 1 callers
Method
HasAChallengePass
HasAChallengePass queries the database to determine if a phone number with a matching ID has every passed a challenge before. If it has passed a chal
models/phone_number.go:109
↓ 1 callers
Method
Insert
Insert adds a phone call row to the phone calls database. The ID field is updated with the inserted row's ID.
models/phone_call.go:54
↓ 1 callers
Method
Insert
Insert adds a phone number to the database. The ID field is updated with the inserted row's id value
models/phone_number.go:80
↓ 1 callers
Method
Insert
Insert adds a challenge row to the challenges database. The ID field is updated with the inserted row's ID.
models/challenge.go:76
↓ 1 callers
Function
NewAudioClipsHandler
NewAudioClipsHandler creates an AudioClipsHandler
calls/audio.go:18
↓ 1 callers
Function
NewCallsHandler
NewCallsHandler creates a new CallsHandler
calls/call.go:31
↓ 1 callers
Function
NewChallengesHandler
NewChallengesHandler creates a ChallengesHandler
dashboard/challenges.go:23
↓ 1 callers
Function
NewPhoneCallsHandler
NewPhoneCallsHandler creates a PhoneCallsHandler
dashboard/phone_calls.go:23
↓ 1 callers
Function
NewPhoneNumbersHandler
NewPhoneNumbersHandler creates a PhoneNumbersHandler
dashboard/phone_numbers.go:23
↓ 1 callers
Function
NewTestInputHandler
NewTestInputHandler creates a TestInputHandler
calls/input.go:31
↓ 1 callers
Method
QueryByIDForAnswer
QueryByIDForAnswer attempts to find a challenge with a matching ID field. Selects the Solution and Status fields from the db. Returns the sql.ErrNoRo
models/challenge.go:106
↓ 1 callers
Method
QueryByNumber
QueryByNumber attempts to find a row in the phone numbers table a matching Number value. The sql.ErrNoRows error is returned if no rows are found.
models/phone_number.go:73
↓ 1 callers
Method
UpdateStatusByID
UpdateStatusByID updates the Status field of a challenge with a matching ID field. Returns the sql.ErrNoRows error if no matching challenges were fou
models/challenge.go:115
Function
ConnectX
ConnectX connects to a PostgreSQL database an then makes an sqlx.DB instance
libdb/conn.go:41
Function
LoadConfig
LoadConfig loads configuration from the environment
config/config.go:28
Function
Migrate
Migrate runs migrations on a database
libdb/migrate.go:13
Function
NewDBConfig
NewDBConfig loads database Config values from environment variables. Variables names will be capitalized field names from the Config struct, prefixed
config/db.go:35
Function
NewHealthHandler
NewHealthHandler creates a HealthHandler
handlers/health.go:12
Function
NewServer
NewServer creates a http.Server which handles twilio call requests
calls/server.go:16
Function
NewServer
NewServer creates a new http.Server which serves an internal API and dashboard page
dashboard/server.go:17
Function
QueryAllChallenges
QueryAllChallenges retrieves a list of all the challenges in the database.
models/challenge.go:24
Function
QueryAllPhoneCalls
QueryAllPhoneCalls retrieves a list of all the phone calls in the database.
models/phone_call.go:28
Function
QueryAllPhoneNumbers
QueryAllPhoneNumbers retrieves a list of all the phone numbers in the database.
models/phone_number.go:45
Function
QueryPhoneNumbersCount
QueryPhoneNumbersCount retrieves the number of phone numbers in the database
models/phone_number.go:32
Method
ServeHTTP
ServeHTTP implements http.Handler
handlers/health.go:17
Method
ServeHTTP
ServeHTTP implements http.Handler
calls/input.go:42
Method
ServeHTTP
ServeHTTP implements http.Handler
calls/audio.go:25
Method
ServeHTTP
ServeHTTP handles a Twilio phone call
calls/call.go:42
Method
ServeHTTP
ServeHTTP implements the http.Handler
dashboard/phone_calls.go:31
Method
ServeHTTP
ServeHTTP implements the http.Handler
dashboard/phone_numbers.go:31
Method
ServeHTTP
ServeHTTP implements the http.Handler
dashboard/challenges.go:31
Function
closeNavbarMenu
()
static/js/app.js:49
Function
main
()
main.go:20
Function
main
()
scripts/db-migrate.go:10
Function
toggleNavbarMenu
()
static/js/app.js:45