lib

package
v0.0.0-...-2c90c15 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFuncMaps

func AddFuncMaps()

AddFuncMaps .

func CopyStruct

func CopyStruct(src interface{}, dst interface{}) error

CopyStruct serializes src and tries to deserialize it to dst

func CreateCertificate

func CreateCertificate(name string, passphrase string) error

func CreateValidationMap

func CreateValidationMap(valid validation.Validation) map[string]map[string]string

CreateValidationMap ranslates validation structure to map that can be easly presented in template

func Dump

func Dump(obj interface{})

Dump any structure as json string

func RemoveCertificate

func RemoveCertificate(name string, serial string) error

func RevokeCertificate

func RevokeCertificate(name string, serial string) error

Types

type Cert

type Cert struct {
	EntryType   string
	Expiration  string
	ExpirationT time.Time
	Revocation  string
	RevocationT time.Time
	Serial      string
	FileName    string
	Details     *Details
}

Cert https://groups.google.com/d/msg/mailing.openssl.users/gMRbePiuwV0/wTASgPhuPzkJ

func ReadCerts

func ReadCerts(path string) ([]*Cert, error)

type Details

type Details struct {
	Name         string
	CN           string
	Country      string
	Organisation string
	Email        string
}

type SystemInfo

type SystemInfo struct {
	Memory      sigar.Mem
	Swap        sigar.Swap
	Uptime      int
	UptimeS     string
	LoadAvg     sigar.LoadAverage
	CPUList     sigar.CpuList
	Arch        string
	Os          string
	CurrentTime time.Time
	MemTotal    uint64
	MemFree     uint64
	MemAvail    uint64
	MemUsed     uint64
	SwapTotal   uint64
	SwapFree    uint64
	SwapUsed    uint64
}

SystemInfo contains basic information about system load

func GetSystemInfo

func GetSystemInfo() SystemInfo

GetSystemInfo returns short info about system load

Jump to

Keyboard shortcuts

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