common

package
v0.0.0-...-93a69da Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserCtxKey struct{}

Functions

func ExpSquaring

func ExpSquaring(x, n int) int

func GetCurrentUser

func GetCurrentUser(req bunrouter.Request) (entities.User, error)

func NewLogger

func NewLogger(debug bool) zerolog.Logger

func RandomString

func RandomString(n int) string

func RetryDo

func RetryDo(client HTTPClient, req *http.Request, maxRetries int) (*http.Response, error)

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

Jump to

Keyboard shortcuts

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