utils

package
v0.0.0-...-c7d11a2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUrl

func CheckUrl(url string) error

func EncryptPassword

func EncryptPassword(raw string) string

func Getkey

func Getkey(idc string, sid int) string

func InternalDns

func InternalDns(domain string) []g.IpIdc

func IsIP

func IsIP(ip string) bool

func KeysOfMap

func KeysOfMap(m map[string]string) []string

func LdapBind

func LdapBind(addr,
	BaseDN,
	BindDN,
	BindPasswd,
	UserField,
	user,
	password string) (sucess bool, err error)

func Ldapsearch

func Ldapsearch(addr,
	BaseDN,
	BindDN,
	BindPasswd,
	UserField,
	user string,
	Attributes []string) (map[string]string, error)

func LookupIP

func LookupIP(domain string, timeout int) ([]string, error)

func ParseUrl

func ParseUrl(target string) (schema, host, port, path string)

func PushFalcon

func PushFalcon(itemCheckedArray []*g.CheckResult, hostname string)

func ReadLastLine

func ReadLastLine(filename string) (string, error)

func TimeFormat

func TimeFormat(ts int64) string

Types

type MetricValue

type MetricValue struct {
	Endpoint  string      `json:"endpoint"`
	Metric    string      `json:"metric"`
	Tags      string      `json:"tags"`
	Value     interface{} `json:"value"`
	Timestamp int64       `json:"timestamp"`
	Type      string      `json:"counterType"`
	Step      int64       `json:"step"`
}

Jump to

Keyboard shortcuts

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