Documentation ¶
Index ¶
- type PlaidIntegration
- func (i *PlaidIntegration) DeleteAIntegration(db *gorm.DB) (int64, error)
- func (i *PlaidIntegration) DeleteUserIntegrations(db *gorm.DB, uid uint32) (int64, error)
- func (i *PlaidIntegration) FindUserIntegrations(db *gorm.DB, uid uint32) (*[]PlaidIntegration, error)
- func (i *PlaidIntegration) Prepare()
- func (i *PlaidIntegration) SaveToken(db *gorm.DB) (*PlaidIntegration, error)
- func (i *PlaidIntegration) UpdateAIntegration(db *gorm.DB) (*PlaidIntegration, error)
- type ResetPassword
- type User
- func (u *User) AfterFind() (err error)
- func (u *User) BeforeSave() error
- func (u *User) DeleteAUser(db *gorm.DB, uid uint32) (int64, error)
- func (u *User) FindAllUsers(db *gorm.DB) (*[]User, error)
- func (u *User) FindUserByID(db *gorm.DB, uid uint32) (*User, error)
- func (u *User) Prepare()
- func (u *User) SaveUser(db *gorm.DB) (*User, error)
- func (u *User) UpdateAUser(db *gorm.DB, uid uint32) (*User, error)
- func (u *User) UpdateAUserAvatar(db *gorm.DB, uid uint32) (*User, error)
- func (u *User) UpdatePassword(db *gorm.DB) error
- func (u *User) Validate(action string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlaidIntegration ¶
type PlaidIntegration struct { ID uint32 `gorm:"primary_key;auto_increment" json:"id"` User User `json:"user"` UserID uint32 `gorm:"not null" json:"user_id"` ItemID string `json:"itemid"` AccessToken string `json:"accesstoken"` PaymentID string `json:"paymentid"` CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"` }
PlaidIntegration Table that stores plaid access info needed for requests to linked bank accounts
func (*PlaidIntegration) DeleteAIntegration ¶
func (i *PlaidIntegration) DeleteAIntegration(db *gorm.DB) (int64, error)
func (*PlaidIntegration) DeleteUserIntegrations ¶
When a user is deleted, we also delete the post that the user had
func (*PlaidIntegration) FindUserIntegrations ¶
func (i *PlaidIntegration) FindUserIntegrations(db *gorm.DB, uid uint32) (*[]PlaidIntegration, error)
func (*PlaidIntegration) Prepare ¶
func (i *PlaidIntegration) Prepare()
func (*PlaidIntegration) SaveToken ¶
func (i *PlaidIntegration) SaveToken(db *gorm.DB) (*PlaidIntegration, error)
func (*PlaidIntegration) UpdateAIntegration ¶
func (i *PlaidIntegration) UpdateAIntegration(db *gorm.DB) (*PlaidIntegration, error)
type ResetPassword ¶
type ResetPassword struct { gorm.Model Email string `gorm:"size:100;not null;" json:"email"` Token string `gorm:"size:255;not null;" json:"token"` }
func (*ResetPassword) DeleteDatails ¶
func (resetPassword *ResetPassword) DeleteDatails(db *gorm.DB) (int64, error)
func (*ResetPassword) Prepare ¶
func (resetPassword *ResetPassword) Prepare()
func (*ResetPassword) SaveDatails ¶
func (resetPassword *ResetPassword) SaveDatails(db *gorm.DB) (*ResetPassword, error)
type User ¶
type User struct { ID uint32 `gorm:"primary_key;auto_increment" json:"id"` Username string `gorm:"size:255;not null;unique" json:"username"` Email string `gorm:"size:100;not null;unique" json:"email"` Password string `gorm:"size:100;not null;" json:"password"` AvatarPath string `gorm:"size:255;null;" json:"avatar_path"` CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"` }
func (*User) BeforeSave ¶
func (*User) FindAllUsers ¶
THE ONLY PERSON THAT NEED TO DO THIS IS THE ADMIN, SO I HAVE COMMENTED THE ROUTES, SO SOMEONE ELSE DONT VIEW THIS DETAILS.
func (*User) UpdateAUserAvatar ¶
Click to show internal directories.
Click to hide internal directories.