util

package
v0.0.0-...-346da1c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "config.yaml"
View Source
const Name = "stegodon"

Variables

This section is empty.

Functions

func DateTimeFormat

func DateTimeFormat() string

func GetNameAndVersion

func GetNameAndVersion() string

func GetVersion

func GetVersion() string

func LogPublicKey

func LogPublicKey(s ssh.Session)

func NormalizeInput

func NormalizeInput(text string) string

func PkToHash

func PkToHash(pk string) string

func PrettyPrint

func PrettyPrint(i interface{}) string

func PublicKeyToString

func PublicKeyToString(s ssh.PublicKey) string

func RandomString

func RandomString(length int) string

Types

type AppConfig

type AppConfig struct {
	Conf struct {
		Host      string
		SshPort   int    `yaml:"sshPort"`
		HttpPort  int    `yaml:"httpPort"`
		SslDomain string `yaml:"sslDomain"`
		WithAp    bool   `yaml:"withAp"`
	}
}

func ReadConf

func ReadConf() (*AppConfig, error)

type ErrMsg

type ErrMsg error

type RsaKeyPair

type RsaKeyPair struct {
	Private string
	Public  string
}

func GeneratePemKeypair

func GeneratePemKeypair() *RsaKeyPair

Jump to

Keyboard shortcuts

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