helpers

package
v0.0.0-...-caf5947 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptEncryptedGeneratedPassword

func DecryptEncryptedGeneratedPassword(password string, hash string, salt string) (bool, error)

func EncodeMD5

func EncodeMD5(value string) string

EncodeMD5 md5 encryption

func GeneratePasswordEncrypt

func GeneratePasswordEncrypt(password string) (string, string, error)

func GenerateToken

func GenerateToken(email string, password string) (string, error)

func HandleIncoming

func HandleIncoming(w http.ResponseWriter, r *http.Request, isChatBot bool)

func HandleMessages

func HandleMessages()

func InitSocket

func InitSocket()

func RandomColor

func RandomColor() string

func RandomLegoGravatar

func RandomLegoGravatar() string

func ValidateToken

func ValidateToken(token string) bool

Types

type Claims

type Claims struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	jwt.StandardClaims
}

func ParseToken

func ParseToken(token string) (*Claims, error)

type Message

type Message struct {
	Nickname  string `json:"nickname"`
	Fullname  string `json:"fullname" `
	UserId    uint   `json:"userId"`
	ChannelId uint   `json:"channelId"`
	Message   string `json:"message" valid:"required"`
	MessageId int    `json:"messageId"`
}

Jump to

Keyboard shortcuts

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