common

package
v0.0.0-...-2d74652 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserSessionKey = "user-session"
)

Variables

This section is empty.

Functions

func NewErrorResponse

func NewErrorResponse(ctx *fiber.Ctx, status int, err error) error

func NewResponse

func NewResponse(ctx *fiber.Ctx, message string, data any) error

Types

type Response

type Response struct {
	Message string  `json:"message"`
	Error   *string `json:"error"`
	Data    any     `json:"data"`
}

type SQLMap

type SQLMap[K comparable, V any] map[K]V

func (*SQLMap[K, V]) Scan

func (v *SQLMap[K, V]) Scan(value interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (SQLMap[K, V]) Value

func (v SQLMap[K, V]) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

Jump to

Keyboard shortcuts

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