utils

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(clientHost string) gin.HandlerFunc

func DeferRollback

func DeferRollback(tx pgx.Tx, ctx context.Context)

func FetchJSON added in v1.0.1

func FetchJSON(url, authHeader string) ([]byte, error)

fetchJSON performs an HTTP GET request to the given URL with the auth header, checks for a successful response, and returns the body.

func GetEnv

func GetEnv(key, defaultValue string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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