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
↓ 148 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/core/port/mock/cache.go:39
↓ 81 callers
Method
Set
Set stores the value in the cache
internal/core/port/cache.go:13
↓ 60 callers
Method
Get
Get retrieves the value from the cache
internal/core/port/cache.go:15
↓ 59 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/core/port/mock/category.go:39
↓ 53 callers
Method
GetCategoryByID
GetCategoryByID selects a category by id
internal/core/port/category.go:16
↓ 44 callers
Method
Delete
Delete removes the value from the cache
internal/core/port/cache.go:17
↓ 43 callers
Function
GenerateCacheKey
GenerateCacheKey generates a cache key based on the input parameters
internal/core/util/cache.go:9
↓ 42 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/core/port/mock/product.go:39
↓ 41 callers
Method
DeleteByPrefix
DeleteByPrefix removes the value from the cache with the given prefix
internal/core/port/cache.go:19
↓ 41 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/core/port/mock/user.go:39
↓ 38 callers
Function
Serialize
Serialize marshals the input data into an array of bytes
internal/core/util/cache.go:30
↓ 36 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/core/port/mock/payment.go:39
↓ 31 callers
Method
GetProductByID
GetProductByID selects a product by id
internal/core/port/product.go:16
↓ 28 callers
Function
validationError
validationError sends an error response for some specific request validation error
internal/adapter/handler/http/response.go:226
↓ 26 callers
Method
GetPaymentByID
GetPaymentByID selects a payment by id
internal/core/port/payment.go:16
↓ 26 callers
Method
GetUserByID
GetUserByID selects a user by id
internal/core/port/user.go:16
↓ 24 callers
Function
handleError
handleError determines the status code of an error and returns a JSON response with the error message and status code
internal/adapter/handler/http/response.go:233
↓ 24 callers
Function
handleSuccess
handleSuccess sends a success response with the specified status code and optional data
internal/adapter/handler/http/response.go:286
↓ 20 callers
Function
NewMockCacheRepository
NewMockCacheRepository creates a new mock instance.
internal/core/port/mock/cache.go:32
↓ 11 callers
Function
Deserialize
Deserialize unmarshals the input data into the output interface
internal/core/util/cache.go:35
↓ 10 callers
Function
NewMockCategoryRepository
NewMockCategoryRepository creates a new mock instance.
internal/core/port/mock/category.go:32
↓ 9 callers
Function
GenerateCacheKeyParams
GenerateCacheParams generates a cache params based on the input parameters
internal/core/util/cache.go:14
↓ 9 callers
Function
nullString
nullString converts a string to sql.NullString for empty string check
internal/adapter/storage/postgres/repository/helper.go:8
↓ 8 callers
Method
ErrorCode
ErrorCode returns the error code of the given error
internal/adapter/storage/postgres/db.go:85
↓ 8 callers
Method
UpdateCategory
UpdateCategory updates a category
internal/core/port/category.go:34
↓ 8 callers
Method
UpdatePayment
UpdatePayment updates a payment
internal/core/port/payment.go:34
↓ 8 callers
Method
UpdateProduct
UpdateProduct updates a product
internal/core/port/product.go:34
↓ 8 callers
Method
UpdateUser
UpdateUser updates a user
internal/core/port/user.go:36
↓ 7 callers
Method
CreateCategory
CreateCategory creates a new category
internal/core/port/category.go:28
↓ 7 callers
Method
CreatePayment
CreatePayment creates a new payment
internal/core/port/payment.go:28
↓ 7 callers
Method
CreateProduct
CreateProduct creates a new product
internal/core/port/product.go:28
↓ 7 callers
Method
ListProducts
ListProducts returns a list of products with pagination
internal/core/port/product.go:32
↓ 6 callers
Method
CreateUser
CreateUser inserts a new user into the database
internal/core/port/user.go:14
↓ 6 callers
Method
GetUserByEmail
GetUserByEmail selects a user by email
internal/core/port/user.go:18
↓ 6 callers
Function
NewCategoryService
NewCategoryService creates a new category service instance
internal/core/service/category.go:22
↓ 6 callers
Function
NewMockUserRepository
NewMockUserRepository creates a new mock instance.
internal/core/port/mock/user.go:32
↓ 6 callers
Function
NewPaymentService
NewPaymentService creates a new payment service instance
internal/core/service/payment.go:22
↓ 6 callers
Function
NewProductService
NewProductService creates a new product service instance
internal/core/service/product.go:23
↓ 6 callers
Function
NewUserService
NewUserService creates a new user service instance
internal/core/service/user.go:22
↓ 5 callers
Method
Close
Close closes the connection to the cache server
internal/core/port/cache.go:21
↓ 5 callers
Function
HashPassword
HashPassword hashes input password using bcrypt
internal/core/util/password.go:6
↓ 5 callers
Method
ListCategories
ListCategories returns a list of categories with pagination
internal/core/port/category.go:32
↓ 5 callers
Method
ListPayments
ListPayments returns a list of payments with pagination
internal/core/port/payment.go:32
↓ 5 callers
Method
ListUsers
ListUsers returns a list of users with pagination
internal/core/port/user.go:34
↓ 5 callers
Function
NewMockPaymentRepository
NewMockPaymentRepository creates a new mock instance.
internal/core/port/mock/payment.go:32
↓ 5 callers
Function
NewMockProductRepository
NewMockProductRepository creates a new mock instance.
internal/core/port/mock/product.go:32
↓ 5 callers
Function
authMiddleware
authMiddleware is a middleware to check if the user is authenticated
internal/adapter/handler/http/middleware.go:21
↓ 5 callers
Function
handleAbort
handleAbort sends an error response and aborts the request with the specified status code and error message
internal/adapter/handler/http/response.go:245
↓ 5 callers
Function
newCategoryResponse
newCategoryResponse is a helper function to create a response body for handling category data
internal/adapter/handler/http/response.go:102
↓ 5 callers
Function
newMeta
newMeta is a helper function to create metadata for a paginated response
internal/adapter/handler/http/response.go:37
↓ 5 callers
Function
newPaymentResponse
newPaymentResponse is a helper function to create a response body for handling payment data
internal/adapter/handler/http/response.go:86
↓ 5 callers
Function
newProductResponse
newProductResponse is a helper function to create a response body for handling product data
internal/adapter/handler/http/response.go:123
↓ 5 callers
Function
toMap
toMap is a helper function to add meta and data to a map
internal/adapter/handler/http/helper.go:23
↓ 4 callers
Method
DeleteCategory
DeleteCategory deletes a category
internal/core/port/category.go:36
↓ 4 callers
Method
DeletePayment
DeletePayment deletes a payment
internal/core/port/payment.go:36
↓ 4 callers
Method
DeleteProduct
DeleteProduct deletes a product
internal/core/port/product.go:36
↓ 4 callers
Method
DeleteUser
DeleteUser deletes a user
internal/core/port/user.go:38
↓ 4 callers
Function
adminMiddleware
adminMiddleware is a middleware to check if the user is an admin
internal/adapter/handler/http/middleware.go:60
↓ 4 callers
Function
newUserResponse
newUserResponse is a helper function to create a response body for handling user data
internal/adapter/handler/http/response.go:67
↓ 4 callers
Function
stringToUint64
stringToUint64 is a helper function to convert a string to uint64
internal/adapter/handler/http/helper.go:11
↓ 3 callers
Method
CreateToken
CreateToken creates a new token for a given user
internal/core/port/auth.go:14
↓ 3 callers
Function
newErrorResponse
newErrorResponse is a helper function to create an error response body
internal/adapter/handler/http/response.go:278
↓ 3 callers
Function
newOrderResponse
newOrderResponse is a helper function to create a response body for handling order data
internal/adapter/handler/http/response.go:154
↓ 3 callers
Function
parseError
parseError parses error messages from the error object and returns a slice of error messages
internal/adapter/handler/http/response.go:257
↓ 2 callers
Method
CreateOrder
CreateOrder creates a new order
internal/core/port/order.go:24
↓ 2 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/core/port/mock/auth.go:39
↓ 2 callers
Method
ListOrders
ListOrders returns a list of orders with pagination
internal/core/port/order.go:28
↓ 2 callers
Function
NewAuthService
NewAuthService creates a new auth service instance
internal/core/service/auth.go:22
↓ 2 callers
Method
Register
Register registers a new user
internal/core/port/user.go:30
↓ 2 callers
Function
getAuthPayload
getAuthPayload is a helper function to get the auth payload from the context
internal/adapter/handler/http/helper.go:18
↓ 1 callers
Function
ComparePassword
ComparePassword compares input password with hashed password
internal/core/util/password.go:16
↓ 1 callers
Method
CreateCategory
CreateCategory creates a new category
internal/core/service/category.go:30
↓ 1 callers
Method
CreatePayment
CreatePayment creates a new payment
internal/core/service/payment.go:30
↓ 1 callers
Method
CreateProduct
CreateProduct creates a new product
internal/core/service/product.go:32
↓ 1 callers
Method
DeleteCategory
DeleteCategory deletes a category
internal/core/service/category.go:178
↓ 1 callers
Method
DeletePayment
DeletePayment deletes a payment
internal/core/service/payment.go:180
↓ 1 callers
Method
DeleteProduct
DeleteProduct deletes a product
internal/core/service/product.go:235
↓ 1 callers
Method
DeleteUser
DeleteUser deletes a user by ID
internal/core/service/user.go:200
↓ 1 callers
Method
GetCategory
GetCategory retrieves a category by id
internal/core/service/category.go:59
↓ 1 callers
Method
GetCategory
GetCategory returns a category by id
internal/core/port/category.go:30
↓ 1 callers
Method
GetOrder
GetOrder returns an order by id
internal/core/port/order.go:26
↓ 1 callers
Method
GetOrderByID
GetOrderByID selects an order by id
internal/core/port/order.go:16
↓ 1 callers
Method
GetPayment
GetPayment retrieves a payment by id
internal/core/service/payment.go:59
↓ 1 callers
Method
GetPayment
GetPayment returns a payment by id
internal/core/port/payment.go:30
↓ 1 callers
Method
GetProduct
GetProduct retrieves a product by id
internal/core/service/product.go:71
↓ 1 callers
Method
GetProduct
GetProduct returns a product by id
internal/core/port/product.go:30
↓ 1 callers
Method
GetUser
GetUser gets a user by ID
internal/core/service/user.go:66
↓ 1 callers
Method
GetUser
GetUser returns a user by id
internal/core/port/user.go:32
↓ 1 callers
Method
ListCategories
ListCategories retrieves a list of categories
internal/core/service/category.go:94
↓ 1 callers
Method
ListPayments
ListPayments retrieves a list of payments
internal/core/service/payment.go:95
↓ 1 callers
Method
ListProducts
ListProducts retrieves a list of products
internal/core/service/product.go:116
↓ 1 callers
Method
ListUsers
ListUsers lists all users
internal/core/service/user.go:101
↓ 1 callers
Method
Login
Login gives a registered user an access token if the credentials are valid
internal/core/service/auth.go:30
↓ 1 callers
Method
Login
Login authenticates a user by email and password and returns a token
internal/core/port/auth.go:22
↓ 1 callers
Method
Migrate
Migrate runs the database migration
internal/adapter/storage/postgres/db.go:65
↓ 1 callers
Function
New
New creates a new paseto instance
internal/adapter/auth/paseto/paseto.go:25
↓ 1 callers
Function
New
New creates a new PostgreSQL database instance
internal/adapter/storage/postgres/db.go:35
↓ 1 callers
Function
New
New creates a new instance of Redis
internal/adapter/storage/redis/redis.go:21
↓ 1 callers
Function
New
New creates a new container instance
internal/adapter/config/config.go:51
↓ 1 callers
Function
NewAuthHandler
NewAuthHandler creates a new AuthHandler instance
internal/adapter/handler/http/auth.go:14
next →
1–100 of 350, ranked by callers