netutil

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIPPort

func GetIPPort(uri string) (netip.AddrPort, error)

GetIPPort parses netip.IPPort from string that also may include http schema

func GetUserIPAddress

func GetUserIPAddress() (string, error)

GetUserIPAddress retrieves the IP address of the user.

func IsValidIP

func IsValidIP(ipStr string) bool

func IsValidIPPort

func IsValidIPPort(ipPortPair string) bool

IsValidIPPort checks if an string IP:port pair is valid.

func IsValidURL

func IsValidURL(urlString string) bool

IsValidURL checks if a URL is valid.

func SplitLuxgoRPCURI

func SplitLuxgoRPCURI(requestURI string) (string, string, error)

SplitLuxgoRPCURI splits the RPC URI into `endpoint` and `chain`. Reverse operation of `fmt.Sprintf("%s/ext/bc/%s", endpoint, chain)`. Returns the `uri` and `chain` as strings, or an error if the request URI is invalid.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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