Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EwanValentine/serverless-api-example
/ functions
Functions
76 in github.com/EwanValentine/serverless-api-example
⨍
Functions
76
◇
Types & classes
16
↓ 9 callers
Function
writeErr
(w http.ResponseWriter, err error)
users/deliveries/http/routes.go:20
↓ 8 callers
Function
Fail
Fail returns an internal server error with the error message
pkg/helpers/handlers.go:14
↓ 6 callers
Method
Delete
(ctx context.Context, id string)
users/usecase.go:19
↓ 6 callers
Method
GetAll
(ctx context.Context)
users/usecase.go:16
↓ 6 callers
Function
NewMockrepository
NewMockrepository creates a new mock instance
users/mock_usecase.go:25
↓ 6 callers
Function
Router
Router takes a lambda handler and returns a higher order function which can route each request using the HTTP verb and path params.
pkg/helpers/router.go:21
↓ 5 callers
Method
Create
(ctx context.Context, user *User)
users/usecase.go:18
↓ 5 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
users/mock_usecase.go:32
↓ 5 callers
Method
Get
(ctx context.Context, id string)
users/usecase.go:15
↓ 5 callers
Function
Success
Success returns a valid response
pkg/helpers/handlers.go:29
↓ 5 callers
Method
Update
(ctx context.Context, id string, user *UpdateUser)
users/usecase.go:17
↓ 5 callers
Method
logErr
(err error)
users/logger_adapter.go:16
↓ 5 callers
Function
setup
()
users/deliveries/lambda/integration_test.go:21
↓ 4 callers
Function
Init
Init sets up an instance of this domains usecase, pre-configured with the dependencies.
users/service.go:24
↓ 2 callers
Method
Create
Create a single user
users/usecase.go:60
↓ 1 callers
Method
Create
(ctx context.Context, body []byte)
pkg/helpers/router.go:12
↓ 1 callers
Method
Delete
Delete a single user
users/usecase.go:76
↓ 1 callers
Method
Delete
(ctx context.Context, id string)
pkg/helpers/router.go:14
↓ 1 callers
Method
Get
Get a single user
users/usecase.go:28
↓ 1 callers
Method
Get
(ctx context.Context, id string)
pkg/helpers/router.go:11
↓ 1 callers
Method
GetAll
GetAll gets all users
users/usecase.go:37
↓ 1 callers
Method
GetAll
(ctx context.Context)
pkg/helpers/router.go:10
↓ 1 callers
Function
NewDynamoDBRepository
NewDynamoDBRepository -
users/dynamodb_repository.go:18
↓ 1 callers
Method
Update
Update a single user
users/usecase.go:46
↓ 1 callers
Method
Update
(ctx context.Context, id string, body []byte)
pkg/helpers/router.go:13
↓ 1 callers
Function
clear
()
users/deliveries/lambda/integration_test.go:32
↓ 1 callers
Method
newID
()
users/usecase.go:83
Method
Create
Create mocks base method
users/mock_usecase.go:81
Method
Create
Create indicates an expected call of Create
users/mock_usecase.go:89
Method
Create
Create a user
users/dynamodb_repository.go:104
Method
Create
(ctx context.Context, user *User)
users/service.go:18
Method
Create
Create a single user
users/logger_adapter.go:52
Method
Create
(w http.ResponseWriter, r *http.Request)
users/deliveries/http/routes.go:88
Method
Create
Create a user
users/deliveries/lambda/main.go:54
Method
Delete
Delete mocks base method
users/mock_usecase.go:95
Method
Delete
Delete indicates an expected call of Delete
users/mock_usecase.go:103
Method
Delete
Delete a user
users/dynamodb_repository.go:119
Method
Delete
(ctx context.Context, id string)
users/service.go:19
Method
Delete
Delete a single user
users/logger_adapter.go:61
Method
Delete
(w http.ResponseWriter, r *http.Request)
users/deliveries/http/routes.go:108
Method
Delete
Delete a user
users/deliveries/lambda/main.go:68
Method
Get
Get mocks base method
users/mock_usecase.go:37
Method
Get
Get indicates an expected call of Get
users/mock_usecase.go:46
Method
Get
Get a user
users/dynamodb_repository.go:23
Method
Get
(ctx context.Context, id string)
users/service.go:15
Method
Get
Get a single user
users/logger_adapter.go:23
Method
Get
(w http.ResponseWriter, r *http.Request)
users/deliveries/http/routes.go:25
Method
Get
Get a single user
users/deliveries/lambda/main.go:18
Method
GetAll
GetAll mocks base method
users/mock_usecase.go:52
Method
GetAll
GetAll indicates an expected call of GetAll
users/mock_usecase.go:61
Method
GetAll
GetAll users
users/dynamodb_repository.go:47
Method
GetAll
(ctx context.Context)
users/service.go:16
Method
GetAll
GetAll gets all users
users/logger_adapter.go:33
Method
GetAll
(w http.ResponseWriter, r *http.Request)
users/deliveries/http/routes.go:48
Method
GetAll
GetAll users
users/deliveries/lambda/main.go:28
Function
Routes
Routes -
users/deliveries/http/routes.go:125
Function
TestCanCreate
(t *testing.T)
users/deliveries/lambda/integration_test.go:46
Function
TestCanCreateUser
(t *testing.T)
users/usecase_test.go:46
Function
TestCanDeleteUser
(t *testing.T)
users/usecase_test.go:97
Function
TestCanDeleteUser
(t *testing.T)
users/deliveries/lambda/integration_test.go:113
Function
TestCanGetAllUsers
(t *testing.T)
users/usecase_test.go:26
Function
TestCanGetAllUsers
(t *testing.T)
users/deliveries/lambda/integration_test.go:65
Function
TestCanGetUser
(t *testing.T)
users/usecase_test.go:10
Function
TestCanGetUser
(t *testing.T)
users/deliveries/lambda/integration_test.go:80
Function
TestCanUpdateUser
(t *testing.T)
users/usecase_test.go:82
Function
TestCanUpdateUser
(t *testing.T)
users/deliveries/lambda/integration_test.go:96
Function
TestCanValidateUser
(t *testing.T)
users/usecase_test.go:63
Method
Update
Update mocks base method
users/mock_usecase.go:67
Method
Update
Update indicates an expected call of Update
users/mock_usecase.go:75
Method
Update
Update a user
users/dynamodb_repository.go:74
Method
Update
(ctx context.Context, id string, user *UpdateUser)
users/service.go:17
Method
Update
Update a single user
users/logger_adapter.go:42
Method
Update
(w http.ResponseWriter, r *http.Request)
users/deliveries/http/routes.go:68
Method
Update
Update a single user
users/deliveries/lambda/main.go:38
Function
main
()
users/deliveries/lambda/main.go:78
Function
main
()
cmd/server/main.go:10