Documentation
¶
Index ¶
- Variables
- func BuildProListeList(m pdf.Maroto, bill model.Invoice)
- func BuildTotal(total string, m pdf.Maroto)
- func CheckComplexityOFPassword[T string](password T) bool
- func CheckOtp(to, code string) bool
- func ExtractOrderInfo[T []model.Order, R []model.OrderRespAdmin](order T) R
- func ExtractProImage[T []model.ProductImage, R []ProductImageInfo](proImg T) R
- func InternalServerError(msg string, c *fiber.Ctx) error
- func ListenAndShutdown(app *fiber.App)
- func NewBillGenerator() I.IBillGenerator
- func NewToken() I.IToken
- func Payment(products string, totalAmount float64) string
- func SendOtp(to string) bool
- func SendSMSOTP(phoneNumber string, otp string) error
- func UploadPDFToS3[T string](filePath, filname string) (bool, string)
- func UploadToBucket(file *multipart.FileHeader) (string, bool, string)
- func ValidateStruct[T any](s T) error
- func WelcomeMsg(phoneNumber string) error
- type BillGenerator
- type Combine
- type CombinedProductInfo
- type Extractaddress
- type PersonalInformation
- type ProductImageInfo
- type ProductInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var AccessKeyID = os.Getenv("AWS_ACCESS_KEY_ID")
View Source
var AwsRegion = os.Getenv("AWS_REGION")
View Source
var SecretAccessKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
View Source
var TWILIO_ACCOUNT_SID string = os.Getenv("TWILIO_ACCOUNT_SID")
View Source
var TWILIO_AUTH_TOKEN string = os.Getenv("TWILIO_AUTH_TOKEN")
View Source
var VERIFY_SERVICE_SID string = os.Getenv("VERIFY_SERVICE_SID")
Functions ¶
func BuildTotal ¶
func ExtractOrderInfo ¶
func ExtractOrderInfo[T []model.Order, R []model.OrderRespAdmin](order T) R
func ExtractProImage ¶
func ExtractProImage[T []model.ProductImage, R []ProductImageInfo](proImg T) R
func InternalServerError ¶
func ListenAndShutdown ¶
func ListenAndShutdown(app *fiber.App)
func NewBillGenerator ¶
func NewBillGenerator() I.IBillGenerator
func SendSMSOTP ¶
func UploadToBucket ¶
func UploadToBucket(file *multipart.FileHeader) (string, bool, string)
func ValidateStruct ¶
func WelcomeMsg ¶
Types ¶
type BillGenerator ¶
type BillGenerator struct{}
func (*BillGenerator) GenerateInvoice ¶
func (*BillGenerator) GenerateInvoice(bill model.Invoice) string
type Combine ¶
type Combine struct { UserId int Name string Username string Phone string Mail string Verification bool Housename string Street string City string Pin string State string }
func Combined ¶
func Combined(users []PersonalInformation, addresses []Extractaddress) []Combine
type CombinedProductInfo ¶
type CombinedProductInfo struct { ID int `json:"id"` ProductCategory string `json:"pro_category"` ProductName string `json:"pro_name"` Price float64 `json:"price"` ImageOne string `json:"img_one"` ImageTwo string `json:"img_two"` ImageThree string `json:"img_three"` }
func CombinePRoductAndProductImage ¶
func CombinePRoductAndProductImage(proInfo []ProductInfo, proimageInfo []ProductImageInfo) []CombinedProductInfo
type Extractaddress ¶
type Extractaddress struct { UserID uint Housename string Street string City string Pin string State string }
func ExtractAdresses ¶
func ExtractAdresses(addr []model.Address) []Extractaddress
type PersonalInformation ¶
type PersonalInformation struct { UserId int Name string Username string Phone string Mail string Verification bool }
func ExtractPersonalInfo ¶
func ExtractPersonalInfo(users []model.Users) []PersonalInformation
type ProductImageInfo ¶
type ProductInfo ¶
func ExtractProductInfo ¶
func ExtractProductInfo[T []model.Products](product T) []ProductInfo
Click to show internal directories.
Click to hide internal directories.