Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccountPB ¶ added in v0.6.0
GetAccountPB converts account db model to protobuf Account message
func GetAccountPBView ¶ added in v0.6.0
GetAccountPBView returns the appropriate view
func NewAccountAPI ¶
NewAccountAPI creates an account API singleton
Types ¶
type Account ¶
type Account struct { AccountID uint `gorm:"primaryKey;autoIncrement"` ProjectID string `gorm:"index;type:varchar(50);not null"` Email string `gorm:"index;type:varchar(50);not null"` Phone string `gorm:"index;type:varchar(50);not null"` DeviceToken string `gorm:"type:varchar(256)"` Names string `gorm:"type:varchar(50);not null"` BirthDate string `gorm:"type:varchar(30);"` Gender string `gorm:"index;type:enum('GENDER_UNSPECIFIED', 'MALE', 'FEMALE');default:'GENDER_UNSPECIFIED';not null"` Nationality string `gorm:"type:varchar(50);default:'Kenyan'"` ProfileURL string `gorm:"type:varchar(256)"` LinkedAccounts string `gorm:"type:varchar(256)"` SecurityQuestion string `gorm:"type:varchar(50)"` SecurityAnswer string `gorm:"type:varchar(50)"` Password string `gorm:"type:text"` PrimaryGroup string `gorm:"index;type:varchar(50);not null"` SecondaryGroups []byte `gorm:"type:json"` AccountState string `gorm:"index;type:enum('BLOCKED','ACTIVE', 'INACTIVE');not null;default:'INACTIVE'"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt }
Account contains profile information stored in the database
func GetAccountDB ¶ added in v0.6.0
GetAccountDB converts protobuf Account message to account db model
func (*Account) AfterCreate ¶
AfterCreate is a callback after creating object
type Options ¶
type Options struct { AppName string EmailDisplayName string DefaultEmailSender string TemplatesDir string ActivationURL string PaginationHasher *hashids.HashID AuthAPI auth.API SQLDBWrites *gorm.DB SQLDBReads *gorm.DB RedisDBWrites *redis.Client RedisDBReads *redis.Client SecureCookie *securecookie.SecureCookie Logger grpclog.LoggerV2 MessagingClient messaging.MessagingClient FirebaseAuth fauth.FirebaseAuthClient }
Options contain parameters for NewAccountAPI
Click to show internal directories.
Click to hide internal directories.