MCPcopy Create free account

hub / github.com/bagashiz/go-pos / functions

Functions350 in github.com/bagashiz/go-pos

↓ 1 callersFunctionNewCategoryHandler
NewCategoryHandler creates a new CategoryHandler instance
internal/adapter/handler/http/category.go:15
↓ 1 callersFunctionNewCategoryRepository
NewCategoryRepository creates a new category repository instance
internal/adapter/storage/postgres/repository/category.go:22
↓ 1 callersFunctionNewMockTokenService
NewMockTokenService creates a new mock instance.
internal/core/port/mock/auth.go:32
↓ 1 callersFunctionNewOrderHandler
NewOrderHandler creates a new OrderHandler instance
internal/adapter/handler/http/order.go:15
↓ 1 callersFunctionNewOrderRepository
NewOrderRepository creates a new order repository instance
internal/adapter/storage/postgres/repository/order.go:22
↓ 1 callersFunctionNewOrderService
NewOrderService creates a new order service instance
internal/core/service/order.go:27
↓ 1 callersFunctionNewPaymentHandler
NewPaymentHandler creates a new PaymentHandler instance
internal/adapter/handler/http/payment.go:15
↓ 1 callersFunctionNewPaymentRepository
NewPaymentRepository creates a new payment repository instance
internal/adapter/storage/postgres/repository/payment.go:22
↓ 1 callersFunctionNewProductHandler
NewProductHandler creates a new ProductHandler instance
internal/adapter/handler/http/product.go:15
↓ 1 callersFunctionNewProductRepository
NewProductRepository creates a new product repository instance
internal/adapter/storage/postgres/repository/product.go:22
↓ 1 callersFunctionNewRouter
NewRouter creates a new HTTP router
internal/adapter/handler/http/router.go:24
↓ 1 callersFunctionNewUserHandler
NewUserHandler creates a new UserHandler instance
internal/adapter/handler/http/user.go:15
↓ 1 callersFunctionNewUserRepository
NewUserRepository creates a new user repository instance
internal/adapter/storage/postgres/repository/user.go:22
↓ 1 callersMethodRegister
Register creates a new user
internal/core/service/user.go:30
↓ 1 callersMethodServe
Serve starts the HTTP server
internal/adapter/handler/http/router.go:133
↓ 1 callersFunctionSet
Set sets the logger configuration based on the environment
internal/adapter/logger/slog.go:16
↓ 1 callersMethodUpdateCategory
UpdateCategory updates a category
internal/core/service/category.go:129
↓ 1 callersMethodUpdatePayment
UpdatePayment updates a payment
internal/core/service/payment.go:131
↓ 1 callersMethodUpdateProduct
UpdateProduct updates a product
internal/core/service/product.go:162
↓ 1 callersMethodUpdateUser
UpdateUser updates a user's name, email, and password
internal/core/service/user.go:135
↓ 1 callersMethodVerifyToken
VerifyToken verifies the token and returns the payload
internal/core/port/auth.go:16
↓ 1 callersFunctionnewAuthResponse
newAuthResponse is a helper function to create a response body for handling authentication data
internal/adapter/handler/http/response.go:51
↓ 1 callersFunctionnewOrderProductResponse
newOrderProductResponse is a helper function to create a response body for handling order product data
internal/adapter/handler/http/response.go:186
↓ 1 callersFunctionnewResponse
newResponse is a helper function to create a response body
internal/adapter/handler/http/response.go:21
↓ 1 callersFunctionnullFloat64
nullFloat64 converts a float64 to sql.NullFloat64 for empty float64 check
internal/adapter/storage/postgres/repository/helper.go:46
↓ 1 callersFunctionnullInt64
nullInt64 converts an int64 to sql.NullInt64 for empty int64 check
internal/adapter/storage/postgres/repository/helper.go:34
↓ 1 callersFunctionnullUint64
nullUint64 converts an uint64 to sql.NullInt64 for empty uint64 check
internal/adapter/storage/postgres/repository/helper.go:20
MethodClose
Close mocks base method.
internal/core/port/mock/cache.go:44
MethodClose
Close indicates an expected call of Close.
internal/core/port/mock/cache.go:52
MethodClose
Close closes the database connection
internal/adapter/storage/postgres/db.go:91
MethodClose
Close closes the connection to the redis database
internal/adapter/storage/redis/redis.go:81
MethodCreateCategory
CreateCategory inserts a new category into the database
internal/core/port/category.go:14
MethodCreateCategory
CreateCategory mocks base method.
internal/core/port/mock/category.go:44
MethodCreateCategory
CreateCategory indicates an expected call of CreateCategory.
internal/core/port/mock/category.go:53
MethodCreateCategory
CreateCategory mocks base method.
internal/core/port/mock/category.go:141
MethodCreateCategory
CreateCategory indicates an expected call of CreateCategory.
internal/core/port/mock/category.go:150
MethodCreateCategory
CreateCategory creates a new category record in the database
internal/adapter/storage/postgres/repository/category.go:29
MethodCreateCategory
CreateCategory godoc @Summary Create a new category @Description create a new category with name @Tags Categories @Accept json @Produce js
internal/adapter/handler/http/category.go:43
MethodCreateOrder
CreateOrder creates a new order
internal/core/service/order.go:39
MethodCreateOrder
CreateOrder inserts a new order into the database
internal/core/port/order.go:14
MethodCreateOrder
CreateOrder mocks base method.
internal/core/port/mock/order.go:44
MethodCreateOrder
CreateOrder indicates an expected call of CreateOrder.
internal/core/port/mock/order.go:53
MethodCreateOrder
CreateOrder mocks base method.
internal/core/port/mock/order.go:112
MethodCreateOrder
CreateOrder indicates an expected call of CreateOrder.
internal/core/port/mock/order.go:121
MethodCreateOrder
CreateOrder creates a new order in the database
internal/adapter/storage/postgres/repository/order.go:29
MethodCreateOrder
CreateOrder godoc @Summary Create a new order @Description Create a new order and return the order data with purchase details @Tags Orders @Ac
internal/adapter/handler/http/order.go:50
MethodCreatePayment
CreatePayment inserts a new payment into the database
internal/core/port/payment.go:14
MethodCreatePayment
CreatePayment mocks base method.
internal/core/port/mock/payment.go:44
MethodCreatePayment
CreatePayment indicates an expected call of CreatePayment.
internal/core/port/mock/payment.go:53
MethodCreatePayment
CreatePayment mocks base method.
internal/core/port/mock/payment.go:141
MethodCreatePayment
CreatePayment indicates an expected call of CreatePayment.
internal/core/port/mock/payment.go:150
MethodCreatePayment
CreatePayment creates a new payment record in the database
internal/adapter/storage/postgres/repository/payment.go:29
MethodCreatePayment
CreatePayment godoc @Summary Create a new payment @Description create a new payment with name, type, and logo @Tags Payments @Accept json @
internal/adapter/handler/http/payment.go:45
MethodCreateProduct
CreateProduct inserts a new product into the database
internal/core/port/product.go:14
MethodCreateProduct
CreateProduct mocks base method.
internal/core/port/mock/product.go:44
MethodCreateProduct
CreateProduct indicates an expected call of CreateProduct.
internal/core/port/mock/product.go:53
MethodCreateProduct
CreateProduct mocks base method.
internal/core/port/mock/product.go:141
MethodCreateProduct
CreateProduct indicates an expected call of CreateProduct.
internal/core/port/mock/product.go:150
MethodCreateProduct
CreateProduct creates a new product record in the database
internal/adapter/storage/postgres/repository/product.go:29
MethodCreateProduct
CreateProduct godoc @Summary Create a new product @Description create a new product with name, image, price, and stock @Tags Products @Accept
internal/adapter/handler/http/product.go:47
MethodCreateToken
CreateToken mocks base method.
internal/core/port/mock/auth.go:44
MethodCreateToken
CreateToken indicates an expected call of CreateToken.
internal/core/port/mock/auth.go:53
MethodCreateToken
CreateToken creates a new paseto token
internal/adapter/auth/paseto/paseto.go:45
MethodCreateUser
CreateUser mocks base method.
internal/core/port/mock/user.go:44
MethodCreateUser
CreateUser indicates an expected call of CreateUser.
internal/core/port/mock/user.go:53
MethodCreateUser
CreateUser creates a new user in the database
internal/adapter/storage/postgres/repository/user.go:29
MethodDelete
Delete mocks base method.
internal/core/port/mock/cache.go:58
MethodDelete
Delete indicates an expected call of Delete.
internal/core/port/mock/cache.go:66
MethodDelete
Delete removes the value from the redis database
internal/adapter/storage/redis/redis.go:49
MethodDeleteByPrefix
DeleteByPrefix mocks base method.
internal/core/port/mock/cache.go:72
MethodDeleteByPrefix
DeleteByPrefix indicates an expected call of DeleteByPrefix.
internal/core/port/mock/cache.go:80
MethodDeleteByPrefix
DeleteByPrefix removes the value from the redis database with the given prefix
internal/adapter/storage/redis/redis.go:54
MethodDeleteCategory
DeleteCategory deletes a category
internal/core/port/category.go:22
MethodDeleteCategory
DeleteCategory mocks base method.
internal/core/port/mock/category.go:59
MethodDeleteCategory
DeleteCategory indicates an expected call of DeleteCategory.
internal/core/port/mock/category.go:67
MethodDeleteCategory
DeleteCategory mocks base method.
internal/core/port/mock/category.go:156
MethodDeleteCategory
DeleteCategory indicates an expected call of DeleteCategory.
internal/core/port/mock/category.go:164
MethodDeleteCategory
DeleteCategory deletes a category record from the database by id
internal/adapter/storage/postgres/repository/category.go:154
MethodDeleteCategory
DeleteCategory godoc @Summary Delete a category @Description Delete a category by id @Tags Categories @Accept json @Produce json @Param
internal/adapter/handler/http/category.go:222
MethodDeletePayment
DeletePayment deletes a payment
internal/core/port/payment.go:22
MethodDeletePayment
DeletePayment mocks base method.
internal/core/port/mock/payment.go:59
MethodDeletePayment
DeletePayment indicates an expected call of DeletePayment.
internal/core/port/mock/payment.go:67
MethodDeletePayment
DeletePayment mocks base method.
internal/core/port/mock/payment.go:156
MethodDeletePayment
DeletePayment indicates an expected call of DeletePayment.
internal/core/port/mock/payment.go:164
MethodDeletePayment
DeletePayment deletes a payment record from the database by id
internal/adapter/storage/postgres/repository/payment.go:168
MethodDeletePayment
DeletePayment godoc @Summary Delete a payment @Description Delete a payment by id @Tags Payments @Accept json @Produce json @Param id p
internal/adapter/handler/http/payment.go:230
MethodDeleteProduct
DeleteProduct deletes a product
internal/core/port/product.go:22
MethodDeleteProduct
DeleteProduct mocks base method.
internal/core/port/mock/product.go:59
MethodDeleteProduct
DeleteProduct indicates an expected call of DeleteProduct.
internal/core/port/mock/product.go:67
MethodDeleteProduct
DeleteProduct mocks base method.
internal/core/port/mock/product.go:156
MethodDeleteProduct
DeleteProduct indicates an expected call of DeleteProduct.
internal/core/port/mock/product.go:164
MethodDeleteProduct
DeleteProduct deletes a product record from the database by id
internal/adapter/storage/postgres/repository/product.go:192
MethodDeleteProduct
DeleteProduct godoc @Summary Delete a product @Description Delete a product by id @Tags Products @Accept json @Produce json @Param id p
internal/adapter/handler/http/product.go:242
MethodDeleteUser
DeleteUser deletes a user
internal/core/port/user.go:24
MethodDeleteUser
DeleteUser mocks base method.
internal/core/port/mock/user.go:59
MethodDeleteUser
DeleteUser indicates an expected call of DeleteUser.
internal/core/port/mock/user.go:67
MethodDeleteUser
DeleteUser mocks base method.
internal/core/port/mock/user.go:156
MethodDeleteUser
DeleteUser indicates an expected call of DeleteUser.
internal/core/port/mock/user.go:164
MethodDeleteUser
DeleteUser deletes a user by ID from the database
internal/adapter/storage/postgres/repository/user.go:208
MethodDeleteUser
DeleteUser godoc @Summary Delete a user @Description Delete a user by id @Tags Users @Accept json @Produce json @Param id path uint64
internal/adapter/handler/http/user.go:229
← previousnext →101–200 of 350, ranked by callers