Documentation ¶
Index ¶
- func BinaryStringToDecimal(binString string) (int, error)
- func CheckPasswordHash(hash, password string) bool
- func Create2faURL(email, secret string) (string, error)
- func CreateOtpSecret() (string, error)
- func CreateOtpURL(email, secret string) (string, error)
- func CreateQRCode(data2code string) ([]byte, error)
- func Divmod(numerator, denominator int) (quotient, remainder int)
- func GeneratePasswordHash(password string) (string, error)
- func ParseMailTemplate(name string, params map[string]interface{}) (string, error)
- func VerifyOTP(token, secret string) error
- type MailMessage
- type Mailer
- type Paginator
- func (p *Paginator) GetLimit() uint
- func (p *Paginator) GetOffset() uint
- func (p *Paginator) GetTotalPages() uint
- func (p *Paginator) MakeFirstLink() string
- func (p *Paginator) MakeLastLink() string
- func (p *Paginator) MakeNextLink() string
- func (p *Paginator) MakePrevLink() string
- func (p *Paginator) ToLinkHeader() string
- func (p *Paginator) ToRepresentation() dto.PaginationInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryStringToDecimal ¶
BinaryStringToDecimal Convert binary string like "10111" to decimal number
func CheckPasswordHash ¶
CheckPasswordHash Check user's password in login step
func Create2faURL ¶
Create2faURL Create URL for 2FA application
func CreateOtpSecret ¶
func CreateOtpURL ¶
func CreateQRCode ¶
CreateQRCode Creates QR code image for 2FA
func GeneratePasswordHash ¶
GeneratePasswordHash Create hash from user's given password to save in database Using bcrypt package to create hash at the default cost
func ParseMailTemplate ¶
Types ¶
type MailMessage ¶
type MailMessage struct { To []string Copy []string Subject string Body string Attachments map[string][]byte }
func (*MailMessage) Attach ¶
func (m *MailMessage) Attach(filename string, body []byte)
type Paginator ¶
func NewPaginator ¶
func NewPaginator(data dto.BaseSearchRequestDto) *Paginator
func (*Paginator) GetTotalPages ¶
func (*Paginator) MakeFirstLink ¶
func (*Paginator) MakeLastLink ¶
func (*Paginator) MakeNextLink ¶
func (*Paginator) MakePrevLink ¶
func (*Paginator) ToLinkHeader ¶
func (*Paginator) ToRepresentation ¶
func (p *Paginator) ToRepresentation() dto.PaginationInfo
Click to show internal directories.
Click to hide internal directories.