MCPcopy Create free account

hub / github.com/catvec/human-call-filter / functions

Functions43 in github.com/catvec/human-call-filter

↓ 13 callersFunctionwriteStatus
writeStatus responds with a status code and the related status text
calls/resp.go:11
↓ 4 callersFunctionwriteJSON
writeJSON responds to an HTTP request with JSON
dashboard/resp.go:12
↓ 3 callersFunctionmakeAPIRequest
(path, method)
static/js/app.js:4
↓ 3 callersFunctionwriteError
writeError responds to an HTTP request with a JSON response containing an error field
dashboard/resp.go:31
↓ 3 callersFunctionwriteTwilioResp
writeTwilioResp writes a Twilio response as an HTTP response
calls/resp.go:16
↓ 2 callersFunctionshutdownHTTPServerOnExit
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 callersFunctionstartHTTPServer
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 callersFunctionConnect
Connect to a PostgreSQL database
libdb/conn.go:14
↓ 1 callersMethodHasAChallengePass
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 callersMethodInsert
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 callersMethodInsert
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 callersMethodInsert
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 callersFunctionNewAudioClipsHandler
NewAudioClipsHandler creates an AudioClipsHandler
calls/audio.go:18
↓ 1 callersFunctionNewCallsHandler
NewCallsHandler creates a new CallsHandler
calls/call.go:31
↓ 1 callersFunctionNewChallengesHandler
NewChallengesHandler creates a ChallengesHandler
dashboard/challenges.go:23
↓ 1 callersFunctionNewPhoneCallsHandler
NewPhoneCallsHandler creates a PhoneCallsHandler
dashboard/phone_calls.go:23
↓ 1 callersFunctionNewPhoneNumbersHandler
NewPhoneNumbersHandler creates a PhoneNumbersHandler
dashboard/phone_numbers.go:23
↓ 1 callersFunctionNewTestInputHandler
NewTestInputHandler creates a TestInputHandler
calls/input.go:31
↓ 1 callersMethodQueryByIDForAnswer
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 callersMethodQueryByNumber
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 callersMethodUpdateStatusByID
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
FunctionConnectX
ConnectX connects to a PostgreSQL database an then makes an sqlx.DB instance
libdb/conn.go:41
FunctionLoadConfig
LoadConfig loads configuration from the environment
config/config.go:28
FunctionMigrate
Migrate runs migrations on a database
libdb/migrate.go:13
FunctionNewDBConfig
NewDBConfig loads database Config values from environment variables. Variables names will be capitalized field names from the Config struct, prefixed
config/db.go:35
FunctionNewHealthHandler
NewHealthHandler creates a HealthHandler
handlers/health.go:12
FunctionNewServer
NewServer creates a http.Server which handles twilio call requests
calls/server.go:16
FunctionNewServer
NewServer creates a new http.Server which serves an internal API and dashboard page
dashboard/server.go:17
FunctionQueryAllChallenges
QueryAllChallenges retrieves a list of all the challenges in the database.
models/challenge.go:24
FunctionQueryAllPhoneCalls
QueryAllPhoneCalls retrieves a list of all the phone calls in the database.
models/phone_call.go:28
FunctionQueryAllPhoneNumbers
QueryAllPhoneNumbers retrieves a list of all the phone numbers in the database.
models/phone_number.go:45
FunctionQueryPhoneNumbersCount
QueryPhoneNumbersCount retrieves the number of phone numbers in the database
models/phone_number.go:32
MethodServeHTTP
ServeHTTP implements http.Handler
handlers/health.go:17
MethodServeHTTP
ServeHTTP implements http.Handler
calls/input.go:42
MethodServeHTTP
ServeHTTP implements http.Handler
calls/audio.go:25
MethodServeHTTP
ServeHTTP handles a Twilio phone call
calls/call.go:42
MethodServeHTTP
ServeHTTP implements the http.Handler
dashboard/phone_calls.go:31
MethodServeHTTP
ServeHTTP implements the http.Handler
dashboard/phone_numbers.go:31
MethodServeHTTP
ServeHTTP implements the http.Handler
dashboard/challenges.go:31
FunctioncloseNavbarMenu
()
static/js/app.js:49
Functionmain
()
main.go:20
Functionmain
()
scripts/db-migrate.go:10
FunctiontoggleNavbarMenu
()
static/js/app.js:45