Documentation ¶
Index ¶
- Variables
- func CorsMiddleware() mux.MiddlewareFunc
- func FindNeighbors(myHost string, myPort uint16, startIp uint8, endIp uint8, startPort uint16, ...) []string
- func GetHost() string
- func IsFoundHost(host string, port uint16) bool
- func JsonStatus(message string) []byte
- func PrivateKeyFromString(s string, publicKey *ecdsa.PublicKey) *ecdsa.PrivateKey
- func PublicKeyFromString(s string) *ecdsa.PublicKey
- func String2BigIntTuple(s string) (big.Int, big.Int)
- type Signature
Constants ¶
This section is empty.
Variables ¶
View Source
var PATTERN = regexp.MustCompile(`((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.){3})(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`)
Functions ¶
func CorsMiddleware ¶
func CorsMiddleware() mux.MiddlewareFunc
CorsMiddleware returns a new mux.MiddlewareFunc that applies CORS middleware.
func FindNeighbors ¶
func IsFoundHost ¶
func JsonStatus ¶
func PrivateKeyFromString ¶
func PrivateKeyFromString(s string, publicKey *ecdsa.PublicKey) *ecdsa.PrivateKey
Create a private key from a string.
func PublicKeyFromString ¶
Create a public key from a string.
func String2BigIntTuple ¶
String2BigIntTuple converts a hexadecimal string into a tuple of big integers. The input string is expected to have a length of 128 characters (64 characters for x and 64 characters for y). It returns the tuple (x, y) as pointers to big.Int values.
Types ¶
Click to show internal directories.
Click to hide internal directories.