handlers

package
v0.0.0-...-d59df74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(c *gin.Context, db *gorm.DB)

func CreateCard

func CreateCard(c *gin.Context, db *gorm.DB)

func CreateOTP

func CreateOTP(c *gin.Context, db *gorm.DB)

func CurrentUser

func CurrentUser(c *gin.Context, db *gorm.DB)

func GetBalances

func GetBalances(c *gin.Context, db *gorm.DB)

func GetPasswordChangeToken

func GetPasswordChangeToken(c *gin.Context, db *gorm.DB)

func LoginUser

func LoginUser(c *gin.Context, db *gorm.DB)

func MakeSwap

func MakeSwap(c *gin.Context, db *gorm.DB)

func MakeTransfer

func MakeTransfer(c *gin.Context, db *gorm.DB)

func PubkeyToUser

func PubkeyToUser(c *gin.Context, db *gorm.DB)

func RegisterUser

func RegisterUser(c *gin.Context, db *gorm.DB)

func SetCardStaus

func SetCardStaus(c *gin.Context, db *gorm.DB)

func TopUpCard

func TopUpCard(c *gin.Context, db *gorm.DB)

func VerifyJwt

func VerifyJwt(jwToken string, jwtKey []byte, claims jwt.Claims) error

Types

type Balance

type Balance struct {
	// contains filtered or unexported fields
}

type Claims

type Claims struct {
	UserID string `json:"id"`
	jwt.RegisteredClaims
}

type CreateOTPInput

type CreateOTPInput struct {
	Email  string `json:"email" form:"email" binding:"required"`
	Reason string `json:"reason" form:"reason" binding:"required,oneof=passwordreset"`
}

type GetPasswordChangeTokenInput

type GetPasswordChangeTokenInput struct {
	Email string `json:"email" form:"email" binding:"required"`
	OTP   string `json:"otp" form:"otp" binding:"required"`
}

type LoginUserInput

type LoginUserInput struct {
	Email    string `json:"email" form:"email" binding:"required"`
	Password string `json:"password" form:"password" binding:"required"`
}

type NoErrorBalance

type NoErrorBalance struct {
	Amount *uint64           `json:"amount"`
	Ata    *solana.PublicKey `json:"ata"`
}

type PasswordChangeInput

type PasswordChangeInput struct {
	PasswordResetToken string `json:"password_reset_token" form:"password_reset_token" binding:"required"`
	NewPassword        string `json:"new_password" form:"new_password" binding:"required"`
}

type PasswordResetClaims

type PasswordResetClaims struct {
	UserID string `json:"id"`
	jwt.RegisteredClaims
}

type RegisterUserInput

type RegisterUserInput struct {
	FirstName string `json:"first_name" form:"first_name" binding:"required"`
	LastName  string `json:"last_name" form:"last_name" binding:"required"`
	Email     string `json:"email" form:"email" binding:"required,email"`
	Password  string `json:"password" form:"password" binding:"required"`
}

type SetCardStausInput

type SetCardStausInput struct {
	CardActive bool `json:"card_active" form:"card_active"`
}

type SwapInput

type SwapInput struct {
	Currency     string `json:"currency" form:"currency" binding:"required,oneof=ngn_kobo usd_cent"`
	Amount       uint64 `json:"amount" form:"amount"  binding:"required"`
	MinAmountOut uint64 `json:"min_amount" form:"min_amount" `
}

type TopUpCardInput

type TopUpCardInput struct {
	Amount uint64 `json:"amount" form:"amount" binding:"required"`
}

type TransferInput

type TransferInput struct {
	Currency      string `json:"currency" form:"currency" binding:"required,oneof=ngn_kobo usd_cent"`
	Amount        uint64 `json:"amount" form:"amount" binding:"required"`
	EmailOrPubkey string `json:"email_or_pubkey" form:"email_or_pubkey" binding:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL