Documentation ¶
Index ¶
- func AccountID(c *gin.Context) (int, error)
- func ID(c *gin.Context) (int, error)
- type Charge
- type Credentials
- type EmailSignup
- type ForgotPayload
- type MagicSignup
- type MobileSignup
- type MobileVerify
- type Pagination
- type Password
- type RecoverPasswordPayload
- type ReferralVerify
- type RegisterAdmin
- type SetAccessToken
- type Update
- type UpdateUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Charge ¶
type Charge struct { Amount string `json:"amount" binding:"required"` AccountID string `json:"account_id" binding:"required"` }
Credentials stores the username and password provided in the request
type Credentials ¶
type Credentials struct { Email string `json:"email" binding:"required"` Password string `json:"password" binding:"required"` }
Credentials stores the username and password provided in the request
type EmailSignup ¶
type EmailSignup struct { Email string `json:"email" binding:"required,min=3,email"` Password string `json:"password" binding:"required,min=8"` }
EmailSignup contains the user signup request
func AccountSignup ¶
func AccountSignup(c *gin.Context) (*EmailSignup, error)
AccountSignup validates user signup request
type ForgotPayload ¶
type ForgotPayload struct {
Email string `json:"email" binding:"required"`
}
ForgotPayload stores the email provided in the request
type MagicSignup ¶
type MagicSignup struct {
Email string `json:"email" binding:"required,min=3,email"`
}
MagicSignup contains the user signup request with a mobile number
type MobileSignup ¶
type MobileSignup struct { CountryCode string `json:"country_code" binding:"required,min=2"` Mobile string `json:"mobile" binding:"required"` }
MobileSignup contains the user signup request with a mobile number
type MobileVerify ¶
type MobileVerify struct { CountryCode string `json:"country_code" binding:"required,min=2"` Mobile string `json:"mobile" binding:"required"` Code string `json:"code" binding:"required"` Signup bool `json:"signup" binding:"required"` }
MobileVerify contains the user's mobile verification country code, mobile number and verification code
func AccountVerifyMobile ¶
func AccountVerifyMobile(c *gin.Context) (*MobileVerify, error)
AccountVerifyMobile validates user mobile verification
type Pagination ¶
type Pagination struct { Limit int `form:"limit"` Page int `form:"page" binding:"min=0"` Offset int `json:"-"` }
Pagination contains pagination request
type Password ¶
type Password struct { ID int `json:"-"` OldPassword string `json:"old_password" binding:"required,min=8"` NewPassword string `json:"new_password" binding:"required,min=8"` }
Password contains password change request
type RecoverPasswordPayload ¶
type RecoverPasswordPayload struct { Email string `json:"email" binding:"required"` OTP string `json:"otp" binding:"required"` Password string `json:"password" binding:"required"` ConfirmPassword string `json:"confrim_password" binding:"required"` }
RecoverPasswordPayload stores the data provided in the request
func RecoverPassword ¶
func RecoverPassword(c *gin.Context) (*RecoverPasswordPayload, error)
RecoverPassword parses out the data in gin's request context, into RecoverPasswordPayload
type ReferralVerify ¶
type ReferralVerify struct {
ReferralCode string `json:"referral_code" binding:"required"`
}
func ReferralCodeVerify ¶
func ReferralCodeVerify(c *gin.Context) (*ReferralVerify, error)
ReferralCodeVerify verifies referral code
type RegisterAdmin ¶
type RegisterAdmin struct { FirstName string `json:"first_name" binding:"required"` LastName string `json:"last_name" binding:"required"` Username string `json:"username" binding:"required,min=3,alphanum"` Password string `json:"password" binding:"required,min=8"` Email string `json:"email" binding:"required,email"` RoleID int `json:"role_id" binding:"required"` AccountID string `json:"account_id"` AccountNumber string `json:"account_number"` AccountCurrency string `json:"account_currency"` AccountStatus string `json:"account_status"` DOB string `json:"dob"` City string `json:"city"` State string `json:"state"` Country string `json:"country"` TaxIDType string `json:"tax_id_type"` TaxID string `json:"tax_id"` FundingSource string `json:"funding_source"` EmploymentStatus string `json:"employment_status"` InvestingExperience string `json:"investing_experience"` AnotherBrokerage string `json:"another_brokerage"` DeviceID string `json:"device_id"` ProfileCompletion string `json:"profile_completion"` BIO string `json:"bio"` FacebookURL string `json:"facebook_url"` TwitterURL string `json:"twitter_url"` InstagramURL string `json:"instagram_url"` PublicPortfolio string `json:"public_portfolio"` EmployerName string `json:"employer_name"` Occupation string `json:"occupation"` UnitApt string `json:"unit_apt"` ZipCode string `json:"zip_code"` StockSymbol string `json:"stock_symbol"` BrokerageFirmName string `json:"brokerage_firm_name"` BrokerageFirmEmployeeName string `json:"brokerage_firm_employee_name"` BrokerageFirmEmployeeRelationship string `json:"brokerage_firm_employee_relationship"` Avatar string `json:"avatar"` ReferralCode string `json:"referral_code"` ReferredBy string `json:"referred_by"` }
RegisterAdmin contains admin registration request
func AccountCreate ¶
func AccountCreate(c *gin.Context) (*RegisterAdmin, error)
AccountCreate validates account creation request
type SetAccessToken ¶
type SetAccessToken struct { PublicToken string `json:"public_token" binding:"required"` AccountID string `json:"account_id" binding:"required"` }
Credentials stores the username and password provided in the request
func SetAccessTokenbody ¶
func SetAccessTokenbody(c *gin.Context) (*SetAccessToken, error)
Login parses out the username and password in gin's request context, into Credentials
type Update ¶
type Update struct { ID int `json:"id"` FirstName *string `json:"first_name"` LastName *string `json:"last_name"` Username *string `json:"username"` Password *string `json:"-"` Email *string `json:"email"` Mobile *string `json:"mobile"` CountryCode *string `json:"country_code"` Address *string `json:"address"` AccountID *string `json:"account_id"` AccountNumber *string `json:"account_number"` AccountCurrency *string `json:"account_currency"` AccountStatus *string `json:"account_status"` DOB *string `json:"dob"` City *string `json:"city"` State *string `json:"state"` Country *string `json:"country"` TaxIDType *string `json:"tax_id_type"` TaxID *string `json:"tax_id"` FundingSource *string `json:"funding_source"` EmploymentStatus *string `json:"employment_status"` InvestingExperience *string `json:"investing_experience"` AnotherBrokerage *string `json:"another_brokerage"` DeviceID *string `json:"device_id"` ProfileCompletion *string `json:"profile_completion"` BIO *string `json:"bio"` FacebookURL *string `json:"facebook_url"` TwitterURL *string `json:"twitter_url"` InstagramURL *string `json:"instagram_url"` PublicPortfolio *string `json:"public_portfolio"` EmployerName *string `json:"employer_name"` Occupation *string `json:"occupation"` UnitApt *string `json:"unit_apt"` ZipCode *string `json:"zip_code"` StockSymbol *string `json:"stock_symbol"` BrokerageFirmName *string `json:"brokerage_firm_name"` BrokerageFirmEmployeeName *string `json:"brokerage_firm_employee_name"` BrokerageFirmEmployeeRelationship *string `json:"brokerage_firm_employee_relationship"` Avatar *string `json:"avatar"` ReferredBy *string `json:"referred_by"` WatchlistID *string `json:"watchlist_id"` }
Update contains password change request
type UpdateUser ¶
type UpdateUser struct { ID int `json:"-"` FirstName *string `json:"first_name,omitempty" binding:"omitempty,min=2"` LastName *string `json:"last_name,omitempty" binding:"omitempty,min=2"` Mobile *string `json:"mobile,omitempty"` Phone *string `json:"phone,omitempty"` Address *string `json:"address,omitempty"` AccountID *string `json:"account_id,omitempty"` AccountNumber *string `json:"account_number,omitempty"` AccountCurrency *string `json:"account_currency,omitempty"` AccountStatus *string `json:"account_status,omitempty"` DOB *string `json:"dob,omitempty"` City *string `json:"city,omitempty"` State *string `json:"state,omitempty"` Country *string `json:"country,omitempty"` TaxIDType *string `json:"tax_id_type,omitempty"` TaxID *string `json:"tax_id,omitempty"` FundingSource *string `json:"funding_source,omitempty"` EmploymentStatus *string `json:"employment_status"` InvestingExperience *string `json:"investing_experience,omitempty"` AnotherBrokerage *string `json:"another_brokerage,omitempty"` DeviceID *string `json:"device_id,omitempty"` ProfileCompletion *string `json:"profile_completion,omitempty"` BIO *string `json:"bio,omitempty"` FacebookURL *string `json:"facebook_url,omitempty"` TwitterURL *string `json:"twitter_url,omitempty"` InstagramURL *string `json:"instagram_url,omitempty"` PublicPortfolio *string `json:"public_portfolio,omitempty"` EmployerName *string `json:"employer_name,omitempty"` Occupation *string `json:"occupation,omitempty"` UnitApt *string `json:"unit_apt,omitempty"` ZipCode *string `json:"zip_code,omitempty"` StockSymbol *string `json:"stock_symbol,omitempty"` BrokerageFirmName *string `json:"brokerage_firm_name,omitempty"` BrokerageFirmEmployeeName *string `json:"brokerage_firm_employee_name,omitempty"` BrokerageFirmEmployeeRelationship *string `json:"brokerage_firm_employee_relationship,omitempty"` Avatar *string `json:"avatar,omitempty"` ReferredBy *string `json:"referred_by,omitempty"` ReferralCode *string `json:"referral_code,omitempty"` }
UpdateUser contains user update data from json request
func UserUpdate ¶
func UserUpdate(c *gin.Context) (*UpdateUser, error)
UserUpdate validates user update request