lib

package
v0.0.0-...-b53458f Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFuncMaps

func AddFuncMaps()

AddFuncMaps .

func Authenticate

func Authenticate(login string, password string, authType string) (*models.User, error)

func CreateCertificate

func CreateCertificate(name 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

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
}

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