Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bagashiz/go-pos
/ functions
Functions
350 in github.com/bagashiz/go-pos
⨍
Functions
350
◇
Types & classes
152
↓ 1 callers
Function
NewCategoryHandler
NewCategoryHandler creates a new CategoryHandler instance
internal/adapter/handler/http/category.go:15
↓ 1 callers
Function
NewCategoryRepository
NewCategoryRepository creates a new category repository instance
internal/adapter/storage/postgres/repository/category.go:22
↓ 1 callers
Function
NewMockTokenService
NewMockTokenService creates a new mock instance.
internal/core/port/mock/auth.go:32
↓ 1 callers
Function
NewOrderHandler
NewOrderHandler creates a new OrderHandler instance
internal/adapter/handler/http/order.go:15
↓ 1 callers
Function
NewOrderRepository
NewOrderRepository creates a new order repository instance
internal/adapter/storage/postgres/repository/order.go:22
↓ 1 callers
Function
NewOrderService
NewOrderService creates a new order service instance
internal/core/service/order.go:27
↓ 1 callers
Function
NewPaymentHandler
NewPaymentHandler creates a new PaymentHandler instance
internal/adapter/handler/http/payment.go:15
↓ 1 callers
Function
NewPaymentRepository
NewPaymentRepository creates a new payment repository instance
internal/adapter/storage/postgres/repository/payment.go:22
↓ 1 callers
Function
NewProductHandler
NewProductHandler creates a new ProductHandler instance
internal/adapter/handler/http/product.go:15
↓ 1 callers
Function
NewProductRepository
NewProductRepository creates a new product repository instance
internal/adapter/storage/postgres/repository/product.go:22
↓ 1 callers
Function
NewRouter
NewRouter creates a new HTTP router
internal/adapter/handler/http/router.go:24
↓ 1 callers
Function
NewUserHandler
NewUserHandler creates a new UserHandler instance
internal/adapter/handler/http/user.go:15
↓ 1 callers
Function
NewUserRepository
NewUserRepository creates a new user repository instance
internal/adapter/storage/postgres/repository/user.go:22
↓ 1 callers
Method
Register
Register creates a new user
internal/core/service/user.go:30
↓ 1 callers
Method
Serve
Serve starts the HTTP server
internal/adapter/handler/http/router.go:133
↓ 1 callers
Function
Set
Set sets the logger configuration based on the environment
internal/adapter/logger/slog.go:16
↓ 1 callers
Method
UpdateCategory
UpdateCategory updates a category
internal/core/service/category.go:129
↓ 1 callers
Method
UpdatePayment
UpdatePayment updates a payment
internal/core/service/payment.go:131
↓ 1 callers
Method
UpdateProduct
UpdateProduct updates a product
internal/core/service/product.go:162
↓ 1 callers
Method
UpdateUser
UpdateUser updates a user's name, email, and password
internal/core/service/user.go:135
↓ 1 callers
Method
VerifyToken
VerifyToken verifies the token and returns the payload
internal/core/port/auth.go:16
↓ 1 callers
Function
newAuthResponse
newAuthResponse is a helper function to create a response body for handling authentication data
internal/adapter/handler/http/response.go:51
↓ 1 callers
Function
newOrderProductResponse
newOrderProductResponse is a helper function to create a response body for handling order product data
internal/adapter/handler/http/response.go:186
↓ 1 callers
Function
newResponse
newResponse is a helper function to create a response body
internal/adapter/handler/http/response.go:21
↓ 1 callers
Function
nullFloat64
nullFloat64 converts a float64 to sql.NullFloat64 for empty float64 check
internal/adapter/storage/postgres/repository/helper.go:46
↓ 1 callers
Function
nullInt64
nullInt64 converts an int64 to sql.NullInt64 for empty int64 check
internal/adapter/storage/postgres/repository/helper.go:34
↓ 1 callers
Function
nullUint64
nullUint64 converts an uint64 to sql.NullInt64 for empty uint64 check
internal/adapter/storage/postgres/repository/helper.go:20
Method
Close
Close mocks base method.
internal/core/port/mock/cache.go:44
Method
Close
Close indicates an expected call of Close.
internal/core/port/mock/cache.go:52
Method
Close
Close closes the database connection
internal/adapter/storage/postgres/db.go:91
Method
Close
Close closes the connection to the redis database
internal/adapter/storage/redis/redis.go:81
Method
CreateCategory
CreateCategory inserts a new category into the database
internal/core/port/category.go:14
Method
CreateCategory
CreateCategory mocks base method.
internal/core/port/mock/category.go:44
Method
CreateCategory
CreateCategory indicates an expected call of CreateCategory.
internal/core/port/mock/category.go:53
Method
CreateCategory
CreateCategory mocks base method.
internal/core/port/mock/category.go:141
Method
CreateCategory
CreateCategory indicates an expected call of CreateCategory.
internal/core/port/mock/category.go:150
Method
CreateCategory
CreateCategory creates a new category record in the database
internal/adapter/storage/postgres/repository/category.go:29
Method
CreateCategory
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
Method
CreateOrder
CreateOrder creates a new order
internal/core/service/order.go:39
Method
CreateOrder
CreateOrder inserts a new order into the database
internal/core/port/order.go:14
Method
CreateOrder
CreateOrder mocks base method.
internal/core/port/mock/order.go:44
Method
CreateOrder
CreateOrder indicates an expected call of CreateOrder.
internal/core/port/mock/order.go:53
Method
CreateOrder
CreateOrder mocks base method.
internal/core/port/mock/order.go:112
Method
CreateOrder
CreateOrder indicates an expected call of CreateOrder.
internal/core/port/mock/order.go:121
Method
CreateOrder
CreateOrder creates a new order in the database
internal/adapter/storage/postgres/repository/order.go:29
Method
CreateOrder
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
Method
CreatePayment
CreatePayment inserts a new payment into the database
internal/core/port/payment.go:14
Method
CreatePayment
CreatePayment mocks base method.
internal/core/port/mock/payment.go:44
Method
CreatePayment
CreatePayment indicates an expected call of CreatePayment.
internal/core/port/mock/payment.go:53
Method
CreatePayment
CreatePayment mocks base method.
internal/core/port/mock/payment.go:141
Method
CreatePayment
CreatePayment indicates an expected call of CreatePayment.
internal/core/port/mock/payment.go:150
Method
CreatePayment
CreatePayment creates a new payment record in the database
internal/adapter/storage/postgres/repository/payment.go:29
Method
CreatePayment
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
Method
CreateProduct
CreateProduct inserts a new product into the database
internal/core/port/product.go:14
Method
CreateProduct
CreateProduct mocks base method.
internal/core/port/mock/product.go:44
Method
CreateProduct
CreateProduct indicates an expected call of CreateProduct.
internal/core/port/mock/product.go:53
Method
CreateProduct
CreateProduct mocks base method.
internal/core/port/mock/product.go:141
Method
CreateProduct
CreateProduct indicates an expected call of CreateProduct.
internal/core/port/mock/product.go:150
Method
CreateProduct
CreateProduct creates a new product record in the database
internal/adapter/storage/postgres/repository/product.go:29
Method
CreateProduct
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
Method
CreateToken
CreateToken mocks base method.
internal/core/port/mock/auth.go:44
Method
CreateToken
CreateToken indicates an expected call of CreateToken.
internal/core/port/mock/auth.go:53
Method
CreateToken
CreateToken creates a new paseto token
internal/adapter/auth/paseto/paseto.go:45
Method
CreateUser
CreateUser mocks base method.
internal/core/port/mock/user.go:44
Method
CreateUser
CreateUser indicates an expected call of CreateUser.
internal/core/port/mock/user.go:53
Method
CreateUser
CreateUser creates a new user in the database
internal/adapter/storage/postgres/repository/user.go:29
Method
Delete
Delete mocks base method.
internal/core/port/mock/cache.go:58
Method
Delete
Delete indicates an expected call of Delete.
internal/core/port/mock/cache.go:66
Method
Delete
Delete removes the value from the redis database
internal/adapter/storage/redis/redis.go:49
Method
DeleteByPrefix
DeleteByPrefix mocks base method.
internal/core/port/mock/cache.go:72
Method
DeleteByPrefix
DeleteByPrefix indicates an expected call of DeleteByPrefix.
internal/core/port/mock/cache.go:80
Method
DeleteByPrefix
DeleteByPrefix removes the value from the redis database with the given prefix
internal/adapter/storage/redis/redis.go:54
Method
DeleteCategory
DeleteCategory deletes a category
internal/core/port/category.go:22
Method
DeleteCategory
DeleteCategory mocks base method.
internal/core/port/mock/category.go:59
Method
DeleteCategory
DeleteCategory indicates an expected call of DeleteCategory.
internal/core/port/mock/category.go:67
Method
DeleteCategory
DeleteCategory mocks base method.
internal/core/port/mock/category.go:156
Method
DeleteCategory
DeleteCategory indicates an expected call of DeleteCategory.
internal/core/port/mock/category.go:164
Method
DeleteCategory
DeleteCategory deletes a category record from the database by id
internal/adapter/storage/postgres/repository/category.go:154
Method
DeleteCategory
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
Method
DeletePayment
DeletePayment deletes a payment
internal/core/port/payment.go:22
Method
DeletePayment
DeletePayment mocks base method.
internal/core/port/mock/payment.go:59
Method
DeletePayment
DeletePayment indicates an expected call of DeletePayment.
internal/core/port/mock/payment.go:67
Method
DeletePayment
DeletePayment mocks base method.
internal/core/port/mock/payment.go:156
Method
DeletePayment
DeletePayment indicates an expected call of DeletePayment.
internal/core/port/mock/payment.go:164
Method
DeletePayment
DeletePayment deletes a payment record from the database by id
internal/adapter/storage/postgres/repository/payment.go:168
Method
DeletePayment
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
Method
DeleteProduct
DeleteProduct deletes a product
internal/core/port/product.go:22
Method
DeleteProduct
DeleteProduct mocks base method.
internal/core/port/mock/product.go:59
Method
DeleteProduct
DeleteProduct indicates an expected call of DeleteProduct.
internal/core/port/mock/product.go:67
Method
DeleteProduct
DeleteProduct mocks base method.
internal/core/port/mock/product.go:156
Method
DeleteProduct
DeleteProduct indicates an expected call of DeleteProduct.
internal/core/port/mock/product.go:164
Method
DeleteProduct
DeleteProduct deletes a product record from the database by id
internal/adapter/storage/postgres/repository/product.go:192
Method
DeleteProduct
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
Method
DeleteUser
DeleteUser deletes a user
internal/core/port/user.go:24
Method
DeleteUser
DeleteUser mocks base method.
internal/core/port/mock/user.go:59
Method
DeleteUser
DeleteUser indicates an expected call of DeleteUser.
internal/core/port/mock/user.go:67
Method
DeleteUser
DeleteUser mocks base method.
internal/core/port/mock/user.go:156
Method
DeleteUser
DeleteUser indicates an expected call of DeleteUser.
internal/core/port/mock/user.go:164
Method
DeleteUser
DeleteUser deletes a user by ID from the database
internal/adapter/storage/postgres/repository/user.go:208
Method
DeleteUser
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
← previous
next →
101–200 of 350, ranked by callers