MCPcopy Create free account

hub / github.com/benhoyt/simplelists / functions

Functions61 in github.com/benhoyt/simplelists

↓ 44 callersFunctionensureString
ensureString asserts that got==want for strings.
server_test.go:263
↓ 15 callersFunctionserve
serve records a single HTTP request and returns the response recorder.
server_test.go:288
↓ 12 callersMethodinternalError
(w http.ResponseWriter, msg string, err error)
server.go:329
↓ 9 callersFunctionensureInt
ensureString asserts that got==want for ints.
server_test.go:271
↓ 8 callersFunctionexitOnError
(err error)
main.go:104
↓ 7 callersFunctioncsrf
csrf wraps the given handler, ensuring that the HTTP method is POST and that the CSRF token in the "csrf-token" cookie matches the token in the "csrf-
server.go:353
↓ 7 callersMethodsignedIn
(h http.HandlerFunc)
server.go:100
↓ 6 callersFunctiongetAttr
getAttr returns the value of the named attribute, or "" if not found.
server_test.go:399
↓ 6 callersFunctionparseForms
parseForms parses the forms in an HTML document and returns the list of forms.
server_test.go:317
↓ 5 callersMethodPrintf
(format string, v ...interface{})
server.go:48
↓ 5 callersFunctionensureRedirect
ensureRedirect asserts that the HTTP status code and the Location header are correct.
server_test.go:255
↓ 4 callersFunctionensureCode
ensureCode asserts that the HTTP status code is correct.
server_test.go:246
↓ 2 callersMethodGetList
(id string)
server.go:35
↓ 2 callersFunctionNewSQLModel
NewSQLModel returns a new SQLite database model, creating tables if they don't already exist.
db.go:34
↓ 2 callersFunctionNewServer
NewServer creates a new server with the specified dependencies.
server.go:52
↓ 2 callersFunctionensureRegex
ensureRegex asserts that got (in its entirety) matches the given regex pattern.
server_test.go:279
↓ 2 callersFunctiongetCSRFToken
getCSRFToken returns the current session's CSRF token, generating a new one and settings the "csrf-token" cookie if not present.
server.go:372
↓ 2 callersFunctiongetSignInCookie
(r *http.Request)
server.go:119
↓ 2 callersFunctiongetText
getText recursively assembles the text nodes of n into a string.
server_test.go:409
↓ 2 callersMethodisSignedIn
(r *http.Request)
server.go:111
↓ 2 callersFunctionparseLinks
parseLinks parses the links in an HTML document and returns the list of links.
server_test.go:372
↓ 1 callersMethodAddItem
(listID, description string)
server.go:37
↓ 1 callersFunctionCheckPasswordHash
CheckPasswordHash returns a non-nil error if the given password hash is not a valid bcrypt hash.
server.go:342
↓ 1 callersMethodCreateList
(name string)
server.go:33
↓ 1 callersMethodCreateSignIn
()
server.go:41
↓ 1 callersMethodDeleteItem
(listID, itemID string)
server.go:39
↓ 1 callersMethodDeleteList
(id string)
server.go:34
↓ 1 callersMethodDeleteSignIn
(id string)
server.go:43
↓ 1 callersFunctionGeneratePasswordHash
GeneratePasswordHash generates a bcrypt hash from the given password.
server.go:335
↓ 1 callersMethodGetLists
()
server.go:32
↓ 1 callersMethodIsSignInValid
(id string)
server.go:42
↓ 1 callersMethodServeHTTP
ServeHTTP implements the http.Handler interface.
server.go:133
↓ 1 callersMethodUpdateDone
(listID, itemID string, done bool)
server.go:38
↓ 1 callersMethodaddRoutes
()
server.go:82
↓ 1 callersMethodaddTemplates
()
server.go:127
↓ 1 callersFunctiongenerateCSRFToken
()
server.go:390
↓ 1 callersFunctiongenerateSignInToken
()
db.go:201
↓ 1 callersMethodgetListItems
(listID string)
db.go:138
↓ 1 callersMethodhome
(w http.ResponseWriter, r *http.Request)
server.go:140
↓ 1 callersMethodmakeListID
just consonants to avoid spelling words makeListID creates a new randomized list ID.
db.go:103
MethodAddItem
AddItem adds an item with the given description to a list, returning the item ID.
db.go:164
MethodCreateList
CreateList creates a new list with the given name, returning its ID.
db.go:91
MethodCreateSignIn
CreateSignIn creates a new sign-in and returns its secure ID.
db.go:195
MethodDeleteItem
DeleteItem (soft) deletes the given item in a list.
db.go:185
MethodDeleteList
DeleteList (soft) deletes the given list (its items actually remain untouched). It's not an error if the list doesn't exist.
db.go:114
MethodDeleteSignIn
DeleteSignIn deletes the given sign-in. It's not an error if the sign-in doesn't exist.
db.go:230
MethodGetList
GetList fetches one list and returns it, or nil if not found.
db.go:120
MethodGetLists
GetLists fetches all the to-do lists (without their items), ordered with the most recent first.
db.go:66
MethodIsSignInValid
IsSignInValid reports whether the given sign-in ID is valid.
db.go:211
MethodPrintf
(format string, v ...interface{})
server_test.go:425
FunctionTestServer
(t *testing.T)
server_test.go:19
MethodUpdateDone
UpdateDone updates the "done" flag of the given item in a list.
db.go:178
MethodaddItem
(w http.ResponseWriter, r *http.Request)
server.go:281
MethodcreateList
(w http.ResponseWriter, r *http.Request)
server.go:256
MethoddeleteItem
(w http.ResponseWriter, r *http.Request)
server.go:318
MethoddeleteList
(w http.ResponseWriter, r *http.Request)
server.go:271
Functionmain
()
main.go:18
MethodshowList
(w http.ResponseWriter, r *http.Request)
server.go:228
MethodsignIn
(w http.ResponseWriter, r *http.Request)
server.go:178
MethodsignOut
(w http.ResponseWriter, r *http.Request)
server.go:208
MethodupdateDone
(w http.ResponseWriter, r *http.Request)
server.go:306