util

package
v0.1.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JwtKey = []byte(os.Getenv("JWT_KEY"))
View Source
var NameGenerator namegenerator.Generator

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func CreateTestProducer

func CreateTestProducer() (kafka2.Producer, error)

func GenerateCode

func GenerateCode() string

func GetOffsetParam added in v0.1.27

func GetOffsetParam(c *gin.Context) (int, error)

func GetSession added in v0.1.28

func GetSession(c *gin.Context) (*model.Session, error)

func GetSessionTokenModel added in v0.1.27

func GetSessionTokenModel(c *gin.Context) *model.SessionToken

func HashPassword

func HashPassword(password string) (string, error)

func RandomEmailAddress

func RandomEmailAddress() string

func RandomUsername

func RandomUsername() string

func SetupTestDatabase

func SetupTestDatabase() *gorm.DB

func ValidatePassword

func ValidatePassword(password string) (minSize, digit, special, lowercase, uppercase bool)

Types

type InputFieldError

type InputFieldError struct {
	Input   string `json:"input"`
	Message string `json:"message"`
	// contains filtered or unexported fields
}

func NewInputFieldError

func NewInputFieldError(input string, message string) *InputFieldError

type TestProducer

type TestProducer struct{}

func (*TestProducer) Produce

func (t *TestProducer) Produce(msg *kafka.Message, deliveryChan chan kafka.Event) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL