Documentation ¶
Index ¶
- func HashPassword(pass string) string
- func IsAdminOrModerator(c echo.Context) bool
- func OnlyAdminOrModerators(next echo.HandlerFunc) echo.HandlerFunc
- func RandomString(n int) (string, error)
- type CustomValidator
- type ErrorJson
- type ISmtpService
- type JwtAuthenticationClaims
- type ListValidatorErrorJson
- type SmtpService
- type ValidatorErrorJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
func IsAdminOrModerator ¶
func IsAdminOrModerator(c echo.Context) bool
func OnlyAdminOrModerators ¶
func OnlyAdminOrModerators(next echo.HandlerFunc) echo.HandlerFunc
func RandomString ¶
Types ¶
type CustomValidator ¶
type CustomValidator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator() *CustomValidator
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
type ErrorJson ¶
func NewErrorJson ¶
type ISmtpService ¶
type JwtAuthenticationClaims ¶
type JwtAuthenticationClaims struct { MemberID int32 `json:"memberId"` Name string `json:"name"` Role string `json:"role"` jwt.RegisteredClaims }
func NewJwtAuthentication ¶
func NewJwtAuthentication(memberID int32, name, role string, dur time.Duration) *JwtAuthenticationClaims
type ListValidatorErrorJson ¶
type ListValidatorErrorJson []ValidatorErrorJson
func (*ListValidatorErrorJson) Error ¶
func (e *ListValidatorErrorJson) Error() string
type SmtpService ¶
type SmtpService struct {
// contains filtered or unexported fields
}
func NewSmtpService ¶
func NewSmtpService(from, username, password, smtpHost string, smtpPort int) *SmtpService
type ValidatorErrorJson ¶
Click to show internal directories.
Click to hide internal directories.