Documentation
¶
Index ¶
- func ApplyDynamicPreloading(db *gorm.DB, ctx *gin.Context, allowedEntities PreloadEntities) *gorm.DB
- func Decode(s string) (string, error)
- func Encode(s string) string
- func GenerateToken(ttl time.Duration, payload interface{}, secretJWTKey string) (string, error)
- func HashPassword(password string) (string, error)
- func MapPaymentCardToPaymentCardResponse(card *models.PaymentCard) models.PaymentCardResponse
- func MapPaymentCardsToPaymentCardsResponse(cards *[]models.PaymentCard) []models.PaymentCardResponse
- func MapPaymentDetailToPaymentDetailResponse(detail *models.PaymentDetail) models.PaymentDetailResponse
- func MapPaymentToPaymentResponse(payment *models.Payment) models.PaymentResponse
- func MapPaymentsToPaymentsResponse(payments *[]models.Payment) []models.PaymentResponse
- func MapRentalHistoryToRentalHistoryResponse(history *models.RentPaymentHistory) models.RentPaymentHistoryResponse
- func MapRentalsHistoryToRentalsHistoryResponse(history *[]models.RentPaymentHistory) []models.RentPaymentHistoryResponse
- func MapUserToUserResponse(user *models.User) models.UserResponse
- func MapUsersToUsersResponse(users *[]models.User) []models.UserResponse
- func MapVehicleToVehicleResponse(vehicle *models.Vehicle) models.VehicleResponse
- func MapVehiclesToVehicleResponses(vehicles *[]models.Vehicle) []models.VehicleResponse
- func ParseTemplateDir(dir string) (*template.Template, error)
- func SendEmail(user *models.User, data *EmailData, emailTemp string)
- func ValidateToken(token string, signedJWTKey string) (interface{}, error)
- func VerifyPassword(hashedPassword string, candidatePassword string) error
- type EmailData
- type Pagination
- type PreloadEntities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDynamicPreloading ¶
func GenerateToken ¶
func HashPassword ¶
func MapPaymentCardToPaymentCardResponse ¶
func MapPaymentCardToPaymentCardResponse(card *models.PaymentCard) models.PaymentCardResponse
func MapPaymentCardsToPaymentCardsResponse ¶
func MapPaymentCardsToPaymentCardsResponse(cards *[]models.PaymentCard) []models.PaymentCardResponse
func MapPaymentDetailToPaymentDetailResponse ¶
func MapPaymentDetailToPaymentDetailResponse(detail *models.PaymentDetail) models.PaymentDetailResponse
func MapPaymentToPaymentResponse ¶
func MapPaymentToPaymentResponse(payment *models.Payment) models.PaymentResponse
func MapPaymentsToPaymentsResponse ¶
func MapPaymentsToPaymentsResponse(payments *[]models.Payment) []models.PaymentResponse
func MapRentalHistoryToRentalHistoryResponse ¶
func MapRentalHistoryToRentalHistoryResponse(history *models.RentPaymentHistory) models.RentPaymentHistoryResponse
func MapRentalsHistoryToRentalsHistoryResponse ¶
func MapRentalsHistoryToRentalsHistoryResponse(history *[]models.RentPaymentHistory) []models.RentPaymentHistoryResponse
func MapUserToUserResponse ¶
func MapUserToUserResponse(user *models.User) models.UserResponse
func MapUsersToUsersResponse ¶
func MapUsersToUsersResponse(users *[]models.User) []models.UserResponse
func MapVehicleToVehicleResponse ¶
func MapVehicleToVehicleResponse(vehicle *models.Vehicle) models.VehicleResponse
func MapVehiclesToVehicleResponses ¶
func MapVehiclesToVehicleResponses(vehicles *[]models.Vehicle) []models.VehicleResponse
func ValidateToken ¶
func VerifyPassword ¶
Types ¶
type Pagination ¶
func NewPaginationFromQuery ¶
func NewPaginationFromQuery(ctx *gin.Context) (*Pagination, error)
type PreloadEntities ¶
Click to show internal directories.
Click to hide internal directories.