Documentation ¶
Index ¶
- func GinCtxWithKeys(keys []string, values ...interface{}) *gin.Context
- func HeaderInvalid() string
- func HeaderValid() string
- func Str2Ptr(s string) *string
- func TestTime(year int) time.Time
- func TestTimePtr(year int) *time.Time
- type Auth
- type JWT
- type Magic
- type Mail
- func (m *Mail) Send(subject, toName, toEmail, content, html string) error
- func (m *Mail) SendForgotVerificationEmail(toEmail string, v *model.Verification) error
- func (m *Mail) SendVerificationEmail(toEmail string, v *model.Verification) error
- func (m *Mail) SendWithDefaults(subject, toEmail, content, html string) error
- type Mobile
- type Password
- type RBAC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinCtxWithKeys ¶
GinCtxWithKeys returns new gin context with keys
func TestTimePtr ¶
TestTimePtr is used for testing pointer time fields
Types ¶
type Magic ¶
type Mail ¶
type Mail struct { ExternalURL string SendFn func(string, string, string, string, string) error SendWithDefaultsFn func(string, string, string, string) error SendVerificationEmailFn func(string, *model.Verification) error SendForgotVerificationEmailFn func(string, *model.Verification) error }
Mail mock
func (*Mail) SendForgotVerificationEmail ¶
func (m *Mail) SendForgotVerificationEmail(toEmail string, v *model.Verification) error
func (*Mail) SendVerificationEmail ¶
func (m *Mail) SendVerificationEmail(toEmail string, v *model.Verification) error
SendVerificationEmail mock
func (*Mail) SendWithDefaults ¶
SendWithDefaults mock
type Mobile ¶
type Mobile struct { GenerateSMSTokenFn func(string, string) error CheckCodeFn func(string, string, string) error }
Mobile mock
func (*Mobile) GenerateSMSToken ¶
GenerateSMSToken mock
type Password ¶
type Password struct { HashPasswordFn func(string) string HashMatchesPasswordFn func(hash, password string) bool HashRandomPasswordFn func() (string, error) }
Password mock
func (*Password) HashMatchesPassword ¶
HashMatchesPassword mock
func (*Password) HashPassword ¶
HashPassword mock
func (*Password) HashRandomPassword ¶
HashRandomPassword mock
type RBAC ¶
type RBAC struct { EnforceRoleFn func(*gin.Context, model.AccessRole) bool EnforceUserFn func(*gin.Context, int) bool AccountCreateFn func(*gin.Context, int) bool IsLowerRoleFn func(*gin.Context, model.AccessRole) bool }
RBAC Mock
func (*RBAC) AccountCreate ¶
AccountCreate mock
func (*RBAC) EnforceRole ¶
EnforceRole mock
func (*RBAC) IsLowerRole ¶
IsLowerRole mock
Source Files ¶
Click to show internal directories.
Click to hide internal directories.