helpers

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

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

Go to latest
Published: Sep 23, 2020 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log       *logrus.Logger
	Notifiers []base.Notifier
	Config    *base.Config
)

Functions

func BoolP

func BoolP(b bool) *bool

func FloatP

func FloatP(f float64) *float64

func FormatString

func FormatString(format *string, args ...string) string

func GetLastStringElement

func GetLastStringElement(list []string) *string

func GetTimeNow

func GetTimeNow() *time.Time

func IntP

func IntP(i int) *int

func IsCommandExists

func IsCommandExists(command *string) bool

func IsFileExists

func IsFileExists(path *string) bool

func JSONDecode

func JSONDecode(r *http.Response, i interface{})

func JSONEncode

func JSONEncode(b *bytes.Buffer, i interface{})

func LogError

func LogError(err error)

func LogErrorExit

func LogErrorExit(err error)

func MakeHTTPRequest

func MakeHTTPRequest(urlp *string, method string, headers *map[string]string, username *string, password *string, body *bytes.Buffer, skipTlsVerification bool) *h.Response

func ReadFile

func ReadFile(path *string) *[]byte

func RemoveDir

func RemoveDir(path *string)

func RunCommand

func RunCommand(name string, arg []string)

func SendMail

func SendMail(subject *string, body *string, from *string, to *string, attachment *string, smtp *string)

func StringP

func StringP(s string) *string

func TDataQuickSort

func TDataQuickSort(td []*TData)

func TimeFormat

func TimeFormat(t *time.Time) *string

func TimeP

func TimeP(t time.Time) *time.Time

func YAMLDecode

func YAMLDecode(f *string, i interface{})

Types

type TData

type TData struct {
	Timestamp int64
	Data      string
}

Jump to

Keyboard shortcuts

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