Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/beeker1121/gotodo
/ functions
Functions
55 in github.com/beeker1121/gotodo
⨍
Functions
55
◇
Types & classes
39
↓ 32 callers
Method
New
New creates a new todo.
services/todos/todos.go:34
↓ 13 callers
Method
Error
Error implements the error interface.
services/errors/errors.go:18
↓ 6 callers
Method
Add
Add appends an Error.
api/errors/errors.go:38
↓ 5 callers
Method
Add
Add appends a ParamError.
services/errors/errors.go:42
↓ 4 callers
Method
GetByID
GetByID retrieves a todo by its ID.
database/todos/todos.go:227
↓ 4 callers
Function
New
New returns a new Error.
api/errors/errors.go:30
↓ 4 callers
Method
New
New creates a new member.
services/members/members.go:30
↓ 3 callers
Method
New
New creates a new todo.
database/todos/todos.go:93
↓ 2 callers
Method
Get
Get gets a set of todos.
services/todos/todos.go:72
↓ 2 callers
Method
GetByEmail
GetByEmail retrieves a member by their email.
database/members/members.go:100
↓ 2 callers
Method
GetByIDAndMemberID
GetByIDAndMemberID retrieves a todo by its ID and member ID.
services/todos/todos.go:111
↓ 2 callers
Function
GetJWTSigningKey
GetJWTSigningKey returns the JWT signing key. It is constructed using the member's hashed password and the application JWT secret.
api/middleware/auth/auth.go:184
↓ 2 callers
Method
Length
Length returns the number of parameter errors.
services/errors/errors.go:47
↓ 1 callers
Function
GetMemberFromJWT
GetMemberFromJWT retrieves the member from the given JWT.
api/middleware/auth/auth.go:106
↓ 1 callers
Function
GetMemberSigningKey
GetMemberSigningKey creates the unique JWT signing key for the given member using the JWT secret and their current hashed password. The claims are pa
api/middleware/auth/auth.go:149
↓ 1 callers
Function
HandleGet
HandleGet handles the /api/v1/todos GET route of the API.
api/v1/handlers/todos/todos.go:77
↓ 1 callers
Function
HandleGetTodo
HandleGetTodo handles the /api/v1/todos/:id GET route of the API.
api/v1/handlers/todos/todos.go:205
↓ 1 callers
Function
HandlePost
HandlePost handles the /api/v1/todos POST route of the API.
api/v1/handlers/todos/todos.go:255
↓ 1 callers
Function
HandlePost
HandlePost handles the /api/v1/signup POST route of the API.
api/v1/handlers/signup/signup.go:29
↓ 1 callers
Function
HandlePost
HandlePost handles the /api/v1/login POST route of the API.
api/v1/handlers/login/login.go:29
↓ 1 callers
Function
HandleUpdate
HandleUpdate handles the /api/v1/todos/:id POST route of the API.
api/v1/handlers/todos/todos.go:303
↓ 1 callers
Method
Length
Length returns the number of errors.
api/errors/errors.go:43
↓ 1 callers
Method
Login
Login checks if a member exists in the database and can log in.
services/members/members.go:88
↓ 1 callers
Function
Multiple
Multiple renders multiple API errors.
api/errors/errors.go:92
↓ 1 callers
Method
New
New creates a new member.
database/members/members.go:56
↓ 1 callers
Method
Update
Update updates a todo.
database/todos/todos.go:268
↓ 1 callers
Method
UpdateByIDAndMemberID
UpdateByIDAndMemberID updates a todo.
services/todos/todos.go:134
↓ 1 callers
Function
handleNotFound
handleNotFound handles 404 Not Found errors.
api/api.go:35
Function
AuthenticateEndpoint
AuthenticateEndpoint is the middleware for authenticating API requests. This function will first try to determine the type of authorization being req
api/middleware/auth/auth.go:66
Function
Default
Default renders an error using a default API error. The default error response will look like: { errors: [ { status: 404, detail: "The given endpoin
api/errors/errors.go:67
Method
Error
Error implements the error interface.
services/errors/errors.go:52
Method
Get
Get gets a set of todos.
database/todos/todos.go:131
Method
GetByID
GetByID retrieves a member by their ID.
database/members/members.go:83
Method
GetByID
GetByID retrieves a member by their ID.
services/members/members.go:113
Method
GetByIDAndMemberID
GetByIDAndMemberID retrieves a todo by its ID and member ID.
database/todos/todos.go:244
Function
GetMemberFromRequest
GetMemberFromRequest retrieves the authenticated member from the request context.
api/middleware/auth/auth.go:190
Function
JSON
JSON renders the given data as JSON.
api/render/render.go:9
Function
New
New returns a new database.
database/database.go:17
Function
New
New creates a new todos database.
database/todos/todos.go:15
Function
New
New creates a new members database.
database/members/members.go:11
Function
New
New returns a new set of services.
services/services.go:16
Function
New
New returns a new todos service.
services/todos/todos.go:15
Function
New
New returns a new members service.
services/members/members.go:17
Function
New
New creates a new API application. All of the necessary routes for the API will be created on the given router, which should then be used to create th
api/api.go:20
Function
New
New returns a new API context.
api/context/context.go:19
Function
New
New creates a new API v1 application. All of the necessary routes for v1 of the API will be created on the given router, which should then be used to
api/v1/v1.go:16
Function
New
New creates the routes for the todo endpoints of the API.
api/v1/handlers/todos/todos.go:68
Function
New
New creates the routes for the signup endpoints of the API.
api/v1/handlers/signup/signup.go:23
Function
New
New creates the routes for the login endpoints of the API.
api/v1/handlers/login/login.go:23
Function
NewJWT
NewJWT creates and returns a new signed JWT.
api/middleware/auth/auth.go:32
Function
NewParamError
NewParamError returns a new ParamError.
services/errors/errors.go:4
Function
NewParamErrors
NewParamErrors returns a new ParamErrors. The main goal of this is to have the service methods themselves capable of returning multiple errors, in th
services/errors/errors.go:28
Function
Params
Params renders API parameter errors. This is a helper function used by the API endpoint handlers to make it easier to render parameter errors returne
api/errors/errors.go:120
Function
ParseConfigFile
ParseConfigFile parses the API configuration file.
api/config/config.go:28
Function
main
()
cmd/api/main.go:20