utils

package
v0.0.0-...-04c0be3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(claims jwt.Claims, method jwt.SigningMethod, jwtSecret string) (string, error)

Types

type JSONMap

type JSONMap map[string]string

func (*JSONMap) Scan

func (m *JSONMap) Scan(value interface{}) error

func (JSONMap) Value

func (m JSONMap) Value() (driver.Value, error)

Custom MarshalJSON and UnmarshalJSON methods to handle the map serialization

type NestedJSONMap

type NestedJSONMap map[string]interface{}

JSONMap allows for nested JSON objects by using `interface{}` for values

func (*NestedJSONMap) Scan

func (m *NestedJSONMap) Scan(value interface{}) error

Scan method for retrieving and parsing JSON data from the database

func (NestedJSONMap) Value

func (m NestedJSONMap) Value() (driver.Value, error)

Value method for database storage

Jump to

Keyboard shortcuts

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