util

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timezones = []string{}/* 575 elements not displayed */

Functions

func ConvertToBytes

func ConvertToBytes(input string) (int64, error)

func FixListenAddress added in v0.10.0

func FixListenAddress(address string) string

func GenerateCertificate

func GenerateCertificate(dnsNames []string, ipAddresses []net.IP) (string, string, error)

GenerateCertificate generates a self-signed certificate and private key in PEM format.

func GetGitHubKeys added in v0.9.0

func GetGitHubKeys(username string) (string, error)

Download the public keys from GitHub, https://github.com/<username>.keys

func LookupIP added in v0.9.0

func LookupIP(host string) (*[]string, error)

func LookupSRV added in v0.9.0

func LookupSRV(service string) (*[]HostPort, error)

Look up the address of a service via a DNS SRV lookup against either consul servers or nameservers

func NewCopier

func NewCopier(socket net.Conn, wsConnection *websocket.Conn) *copierConnections

func PrintTable added in v0.9.0

func PrintTable(table [][]string)

func ResolveSRVHttp

func ResolveSRVHttp(uri string) string

func UpdateAuthorizedKeys

func UpdateAuthorizedKeys(key string, githubUsername string) error

func UpdateSSHConfig added in v0.9.0

func UpdateSSHConfig(sshConfig string) error

func UpgradeToWS

func UpgradeToWS(w http.ResponseWriter, r *http.Request) *websocket.Conn

Upgrade the connection to a websocket connection

Types

type HostPort added in v0.9.0

type HostPort struct {
	Host string
	Port string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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