Documentation ¶
Index ¶
- type CartService
- func (c CartService) Create(cart *requests.CartRequest) (*models.Cart, error)
- func (c CartService) CreateProduct(cart *models.Cart) (*models.Cart, error)
- func (c CartService) DeleteAllProductFromCart(userID int32) error
- func (c CartService) DeleteProductFromCart(userID int32, productID int) error
- func (c CartService) GetAllProductsFromCart(id int32) (*[]models.Cart, error)
- func (c CartService) GetCart(userID int32) (int, error)
- func (c CartService) GetCartByUserID(userID int32) (*models.Cart, error)
- func (c CartService) Update(cart *requests.CartProductRequest) (*models.Cart, error)
- type OrderService
- type ProductService
- func (p ProductService) Create(product *requests.ProductRequest) (*models.Product, error)
- func (p ProductService) GetAll() (*[]models.Product, error)
- func (p ProductService) GetByName(name string) (int32, error)
- func (p ProductService) GetTypes() (*[]models.ProductTypes, error)
- func (p ProductService) GetTypesBySupplier(supplierID int32) (*[]models.ProductTypes, error)
- func (p ProductService) Update(product *requests.ProductRequest) (*models.Product, error)
- type SupplierService
- type TokenService
- func (t *TokenService) CreateUid(userID int32, uid models.CachedTokens) error
- func (t *TokenService) DeleteUid(userID int32) error
- func (t *TokenService) GenerateAccessToken(userID int32) (string, string, error)
- func (t *TokenService) GenerateRefreshToken(userID int32) (string, string, error)
- func (t *TokenService) GetTokenFromBearerString(input string) (string, error)
- func (t *TokenService) GetUidByID(claims *helper.JwtCustomClaims) (*models.CachedTokens, error)
- func (t *TokenService) UpdateUid(userID int32, uid models.CachedTokens) error
- func (t *TokenService) ValidateAccessToken(tokenString string) (*helper.JwtCustomClaims, error)
- func (t *TokenService) ValidateRefreshToken(tokenString string) (*helper.JwtCustomClaims, error)
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartService ¶
type CartService struct {
// contains filtered or unexported fields
}
func NewCartService ¶
func NewCartService(repo db_repository.CartRepositoryI) *CartService
func (CartService) Create ¶
func (c CartService) Create(cart *requests.CartRequest) (*models.Cart, error)
func (CartService) CreateProduct ¶
func (CartService) DeleteAllProductFromCart ¶
func (c CartService) DeleteAllProductFromCart(userID int32) error
func (CartService) DeleteProductFromCart ¶
func (c CartService) DeleteProductFromCart(userID int32, productID int) error
func (CartService) GetAllProductsFromCart ¶
func (c CartService) GetAllProductsFromCart(id int32) (*[]models.Cart, error)
func (CartService) GetCartByUserID ¶
func (c CartService) GetCartByUserID(userID int32) (*models.Cart, error)
func (CartService) Update ¶
func (c CartService) Update(cart *requests.CartProductRequest) (*models.Cart, error)
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService(repo db_repository.OrderRepositoryI) *OrderService
func (OrderService) Create ¶
func (o OrderService) Create(order *requests.OrderRequest) (*models.Order, error)
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService(repo db_repository.ProductRepositoryI) *ProductService
func (ProductService) Create ¶
func (p ProductService) Create(product *requests.ProductRequest) (*models.Product, error)
func (ProductService) GetTypes ¶
func (p ProductService) GetTypes() (*[]models.ProductTypes, error)
func (ProductService) GetTypesBySupplier ¶
func (p ProductService) GetTypesBySupplier(supplierID int32) (*[]models.ProductTypes, error)
func (ProductService) Update ¶
func (p ProductService) Update(product *requests.ProductRequest) (*models.Product, error)
type SupplierService ¶
type SupplierService struct {
// contains filtered or unexported fields
}
func NewSupplierService ¶
func NewSupplierService(repo db_repository.SupplierRepositoryI) *SupplierService
func (SupplierService) Create ¶
func (s SupplierService) Create(supplier *requests.SupplierRequest) (*models.Supplier, error)
func (SupplierService) GetTypes ¶
func (s SupplierService) GetTypes() (*[]models.SupplierTypes, error)
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(cfg *conf.ConfigToken, logger *yolo_log.Logger, tokenRepo db_repository.TokensRepositoryI) *TokenService
func (*TokenService) CreateUid ¶
func (t *TokenService) CreateUid(userID int32, uid models.CachedTokens) error
func (*TokenService) DeleteUid ¶
func (t *TokenService) DeleteUid(userID int32) error
func (*TokenService) GenerateAccessToken ¶
func (t *TokenService) GenerateAccessToken(userID int32) (string, string, error)
func (*TokenService) GenerateRefreshToken ¶
func (t *TokenService) GenerateRefreshToken(userID int32) (string, string, error)
func (*TokenService) GetTokenFromBearerString ¶
func (t *TokenService) GetTokenFromBearerString(input string) (string, error)
func (*TokenService) GetUidByID ¶
func (t *TokenService) GetUidByID(claims *helper.JwtCustomClaims) (*models.CachedTokens, error)
func (*TokenService) UpdateUid ¶
func (t *TokenService) UpdateUid(userID int32, uid models.CachedTokens) error
func (*TokenService) ValidateAccessToken ¶
func (t *TokenService) ValidateAccessToken(tokenString string) (*helper.JwtCustomClaims, error)
func (*TokenService) ValidateRefreshToken ¶
func (t *TokenService) ValidateRefreshToken(tokenString string) (*helper.JwtCustomClaims, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(cfg *conf.ConfigToken, logger *yolo_log.Logger, userRepo db_repository.UserRepositoryI) *UserService
func (UserService) Create ¶
func (u UserService) Create(user *requests.UserRequest) (*models.User, error)
func (UserService) EmailExist ¶
func (u UserService) EmailExist(email string) (int, error)
func (UserService) GetByEmail ¶
func (u UserService) GetByEmail(email string) (*models.User, error)
Click to show internal directories.
Click to hide internal directories.