generator

package
v0.0.0-...-bf9679a Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBcryptPasswordGenerator

func NewBcryptPasswordGenerator() *bcryptPasswordGenerator

func NewJWTTokenGenerator

func NewJWTTokenGenerator() *jwtTokenGenerator

func NewNanoidIDGenerator

func NewNanoidIDGenerator() *nanoidIDGenerator

func NewQRCodeGeneratorImpl

func NewQRCodeGeneratorImpl() *qrCodeGeneratorImpl

Types

type IDGenerator

type IDGenerator interface {
	GenerateGroupID() (id string, err error)
	GenerateAdminID() (id string, err error)
	GeneratePropertyID() (id string, err error)
	GenerateShowScheduleID() (id string, err error)
}

type PasswordGenerator

type PasswordGenerator interface {
	GenerateFromPassword(password []byte, cost int) ([]byte, error)
	CompareHashAndPassword(hashedPassword, password []byte) error
}

type QRCodeGenerator

type QRCodeGenerator interface {
	GenerateQRCode(content string, level qrcode.RecoveryLevel, size int) ([]byte, error)
}

type TokenGenerator

type TokenGenerator interface {
	GenerateToken(id, username string) (token string, err error)
	ExtractToken(c echo.Context) (id, username string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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