utils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: AGPL-3.0 Imports: 5 Imported by: 13

Documentation

Index

Constants

View Source
const (
	ContextLogKey            = key("console-log")
	ContextRequestID         = key("request-id")
	ContextRequestUserID     = key("request-user-id")
	ContextRequestUserAgent  = key("request-user-agent")
	ContextRequestHost       = key("request-host")
	ContextRequestRemoteAddr = key("request-remote-addr")
	ContextAuditKey          = key("request-audit-entry")
	ContextClientIP          = key("client-ip")
)

Variables

This section is empty.

Functions

func ClientIPFromContext added in v0.30.0

func ClientIPFromContext(ctx context.Context) string

ClientIPFromContext attempts to get the Client IP from a context, if it's not present, it returns 127.0.0.1

func PossibleParityValues

func PossibleParityValues(args ...string) ([]string, error)

PossibleParityValues returns possible parities for input args, parties are calculated in uniform manner for one pool or multiple pools, ensuring that parities returned are common and applicable across all pools.

Types

This section is empty.

Jump to

Keyboard shortcuts

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