package
0.0.0-20241009030249-30833c4511e1
Repository: https://github.com/bagashiz/go-pos.git
Documentation: pkg.go.dev

# Constants

UserRole enum values.
PaymentType enum values.
UserRole enum values.
PaymentType enum values.
PaymentType enum values.

# Variables

ErrConflictingData is an error for when data conflicts with existing data.
ErrDataNotFound is an error for when requested data is not found.
ErrEmptyAuthorizationHeader is an error for when the authorization header is empty.
ErrExpiredToken is an error for when the access token is expired.
ErrForbidden is an error for when the user is forbidden to access the resource.
ErrInsufficientPayment is an error for when total paid is less than total price.
ErrInsufficientStock is an error for when product stock is not enough.
ErrInternal is an error for when an internal service fails to process the request.
ErrInvalidAuthorizationHeader is an error for when the authorization header is invalid.
ErrInvalidAuthorizationType is an error for when the authorization type is invalid.
ErrInvalidCredentials is an error for when the credentials are invalid.
ErrInvalidToken is an error for when the access token is invalid.
ErrNoUpdatedData is an error for when no data is provided to update.
ErrTokenCreation is an error for when the token creation fails.
ErrTokenDuration is an error for when the token duration format is invalid.
ErrUnauthorized is an error for when the user is unauthorized.

# Structs

Category is an entity that represents a category of product.
Order is an entity that represents an order.
OrderProduct is an entity that represents pivot table between order and product.
Payment is an entity that represents a payment.
Product is an entity that represents a product.
TokenPayload is an entity that represents the payload of the token.
User is an entity that represents a user.

# Type aliases

PaymentType is an enum for payment's type.
UserRole is an enum for user's role.