common

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJWTNoVerify

func DecodeJWTNoVerify(tokenString string) (jwt.MapClaims, error)

func GenerateJWT

func GenerateJWT(username, secret string) (string, error)

Types

type JWT

type JWT struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

func DecodeJWT

func DecodeJWT(tokenString, tokenKey string) (bool, JWT)

type MapClaims

type MapClaims map[string]interface{}

type Message

type Message struct {
	EventName string          `json:"eventName"`
	Data      json.RawMessage `json:"data"`
}

type Response

type Response struct {
	EventName string      `json:"eventName"`
	Data      interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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