Documentation ¶
Index ¶
- func GenerateId(prefix string) (string, error)
- type OtpLogin
- type OtpVerifyPhoneNumber
- type User
- func (it *User) IsBranchAdmin() bool
- func (it *User) IsCourier() bool
- func (it *User) IsCustomer() bool
- func (it *User) IsFinanceAdmin() bool
- func (it *User) IsFoodServiceAM() bool
- func (it *User) IsFoodServiceGM() bool
- func (it *User) IsFoodServiceNSM() bool
- func (it *User) IsFoodServiceRM() bool
- func (it *User) IsFoodServiceSales() bool
- func (it *User) IsRetailAM() bool
- func (it *User) IsRetailDir() bool
- func (it *User) IsRetailGM() bool
- func (it *User) IsRetailRM() bool
- func (it *User) IsRetailSales() bool
- func (it *User) IsSalesAdmin() bool
- func (it *User) IsSystemAdmin() bool
- func (it *User) IsWalkInCustomer() bool
- func (it *User) IsWarehouseAdmin() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateId ¶
Types ¶
type OtpLogin ¶
type OtpVerifyPhoneNumber ¶
type OtpVerifyPhoneNumber struct { Id string `firestore:"id"` PhoneNumber string `firestore:"phoneNumber"` Otp string `firestore:"otp"` CreatedAt int64 `firestore:"createdAt"` }
func NewOtpVerifyPhoneNumber ¶
func NewOtpVerifyPhoneNumber(phoneNumber string) (*OtpVerifyPhoneNumber, error)
type User ¶
type User struct { Id string `json:"user_id"` PhoneNumber string `json:"phoneNumber"` Roles string `json:"roles"` Region []string `json:"region"` Iss string `json:"iss"` Aud string `json:"aud"` AuthTime int64 `json:"auth_time"` Sub string `json:"sub"` Iat int64 `json:"iat"` Exp int64 `json:"exp"` }
func Authorization ¶
func (*User) IsBranchAdmin ¶
func (*User) IsCustomer ¶
func (*User) IsFinanceAdmin ¶
func (*User) IsFoodServiceAM ¶
func (*User) IsFoodServiceGM ¶
func (*User) IsFoodServiceNSM ¶
func (*User) IsFoodServiceRM ¶
func (*User) IsFoodServiceSales ¶
func (*User) IsRetailAM ¶
func (*User) IsRetailDir ¶
func (*User) IsRetailGM ¶
func (*User) IsRetailRM ¶
func (*User) IsRetailSales ¶
func (*User) IsSalesAdmin ¶
func (*User) IsSystemAdmin ¶
func (*User) IsWalkInCustomer ¶
func (*User) IsWarehouseAdmin ¶
Click to show internal directories.
Click to hide internal directories.