MCPcopy Create free account

hub / github.com/beeker1121/gotodo / functions

Functions55 in github.com/beeker1121/gotodo

↓ 32 callersMethodNew
New creates a new todo.
services/todos/todos.go:34
↓ 13 callersMethodError
Error implements the error interface.
services/errors/errors.go:18
↓ 6 callersMethodAdd
Add appends an Error.
api/errors/errors.go:38
↓ 5 callersMethodAdd
Add appends a ParamError.
services/errors/errors.go:42
↓ 4 callersMethodGetByID
GetByID retrieves a todo by its ID.
database/todos/todos.go:227
↓ 4 callersFunctionNew
New returns a new Error.
api/errors/errors.go:30
↓ 4 callersMethodNew
New creates a new member.
services/members/members.go:30
↓ 3 callersMethodNew
New creates a new todo.
database/todos/todos.go:93
↓ 2 callersMethodGet
Get gets a set of todos.
services/todos/todos.go:72
↓ 2 callersMethodGetByEmail
GetByEmail retrieves a member by their email.
database/members/members.go:100
↓ 2 callersMethodGetByIDAndMemberID
GetByIDAndMemberID retrieves a todo by its ID and member ID.
services/todos/todos.go:111
↓ 2 callersFunctionGetJWTSigningKey
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 callersMethodLength
Length returns the number of parameter errors.
services/errors/errors.go:47
↓ 1 callersFunctionGetMemberFromJWT
GetMemberFromJWT retrieves the member from the given JWT.
api/middleware/auth/auth.go:106
↓ 1 callersFunctionGetMemberSigningKey
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 callersFunctionHandleGet
HandleGet handles the /api/v1/todos GET route of the API.
api/v1/handlers/todos/todos.go:77
↓ 1 callersFunctionHandleGetTodo
HandleGetTodo handles the /api/v1/todos/:id GET route of the API.
api/v1/handlers/todos/todos.go:205
↓ 1 callersFunctionHandlePost
HandlePost handles the /api/v1/todos POST route of the API.
api/v1/handlers/todos/todos.go:255
↓ 1 callersFunctionHandlePost
HandlePost handles the /api/v1/signup POST route of the API.
api/v1/handlers/signup/signup.go:29
↓ 1 callersFunctionHandlePost
HandlePost handles the /api/v1/login POST route of the API.
api/v1/handlers/login/login.go:29
↓ 1 callersFunctionHandleUpdate
HandleUpdate handles the /api/v1/todos/:id POST route of the API.
api/v1/handlers/todos/todos.go:303
↓ 1 callersMethodLength
Length returns the number of errors.
api/errors/errors.go:43
↓ 1 callersMethodLogin
Login checks if a member exists in the database and can log in.
services/members/members.go:88
↓ 1 callersFunctionMultiple
Multiple renders multiple API errors.
api/errors/errors.go:92
↓ 1 callersMethodNew
New creates a new member.
database/members/members.go:56
↓ 1 callersMethodUpdate
Update updates a todo.
database/todos/todos.go:268
↓ 1 callersMethodUpdateByIDAndMemberID
UpdateByIDAndMemberID updates a todo.
services/todos/todos.go:134
↓ 1 callersFunctionhandleNotFound
handleNotFound handles 404 Not Found errors.
api/api.go:35
FunctionAuthenticateEndpoint
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
FunctionDefault
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
MethodError
Error implements the error interface.
services/errors/errors.go:52
MethodGet
Get gets a set of todos.
database/todos/todos.go:131
MethodGetByID
GetByID retrieves a member by their ID.
database/members/members.go:83
MethodGetByID
GetByID retrieves a member by their ID.
services/members/members.go:113
MethodGetByIDAndMemberID
GetByIDAndMemberID retrieves a todo by its ID and member ID.
database/todos/todos.go:244
FunctionGetMemberFromRequest
GetMemberFromRequest retrieves the authenticated member from the request context.
api/middleware/auth/auth.go:190
FunctionJSON
JSON renders the given data as JSON.
api/render/render.go:9
FunctionNew
New returns a new database.
database/database.go:17
FunctionNew
New creates a new todos database.
database/todos/todos.go:15
FunctionNew
New creates a new members database.
database/members/members.go:11
FunctionNew
New returns a new set of services.
services/services.go:16
FunctionNew
New returns a new todos service.
services/todos/todos.go:15
FunctionNew
New returns a new members service.
services/members/members.go:17
FunctionNew
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
FunctionNew
New returns a new API context.
api/context/context.go:19
FunctionNew
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
FunctionNew
New creates the routes for the todo endpoints of the API.
api/v1/handlers/todos/todos.go:68
FunctionNew
New creates the routes for the signup endpoints of the API.
api/v1/handlers/signup/signup.go:23
FunctionNew
New creates the routes for the login endpoints of the API.
api/v1/handlers/login/login.go:23
FunctionNewJWT
NewJWT creates and returns a new signed JWT.
api/middleware/auth/auth.go:32
FunctionNewParamError
NewParamError returns a new ParamError.
services/errors/errors.go:4
FunctionNewParamErrors
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
FunctionParams
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
FunctionParseConfigFile
ParseConfigFile parses the API configuration file.
api/config/config.go:28
Functionmain
()
cmd/api/main.go:20