boss

package
v0.0.0-...-5416f79 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenContactMap

func GenContactMap() (contactMap map[string]Contactor)

func GenPlatMap

func GenPlatMap(repons PlatformList, filterList *hashset.Set) (ipMapper *hashmap.Map, platList *hashset.Set, popIds []int)

generate platform mapping of triggered alarm cases

func GetContactIfo

func GetContactIfo() (contmap map[string]Contactor)

func GetIPMap

func GetIPMap() (hostmap map[string]Hosts)

func GetPlatfromContactInfo

func GetPlatfromContactInfo(platList *hashset.Set) (contactorMap map[string][]Contactor, err error)

func IdcMapping

func IdcMapping(popIDs []int) (idcmapping map[int]string, err error)

Types

type Contactor

type Contactor struct {
	Phone string `json:"phone"`
	Email string `json:"email"`
	Name  string `json:"name"`
}

func QueryContact

func QueryContact(platformName string) (contactList []Contactor, err error)

type Contacts

type Contacts struct {
	Id      int       `orm:"column(id)"`
	Name    string    `orm:"column(name)"`
	Phone   string    `orm:"column(phone)"`
	Email   string    `orm:"column(email)"`
	Updated time.Time `orm:"column(updated)"`
}

orm model

type Hosts

type Hosts struct {
	Id       int       `orm:"column(id)"`
	Hostname string    `orm:"column(hostname)"`
	Exist    int       `orm:"column(exist)"`
	Activate int       `orm:"column(activate)"`
	Platform string    `orm:"column(platform)"`
	Idc      string    `orm:"column(idc)"`
	Ip       string    `orm:"column(ip)"`
	Isp      string    `orm:"column(isp)"`
	Province string    `orm:"column(province)"`
	City     string    `orm:"column(city)"`
	Status   string    `orm:"column(status)"`
	Updated  time.Time `orm:"column(updated)"`
}

orm model

func Gethosts

func Gethosts() (hosts []Hosts)

type IDC

type IDC struct {
	Id       int       `orm:"column(id)"`
	PopId    int       `orm:"column(pop_id)"`
	Name     string    `orm:"column(name)"`
	Count    int       `orm:"column(count)"`
	Area     string    `orm:"column(area)"`
	Province string    `orm:"column(province)"`
	City     string    `orm:"column(city)"`
	UpdatAt  time.Time `orm:"column(update_at)"`
}

orm model

type IPInfo

type IPInfo struct {
	IP       string `json:"ip"`
	HostName string `json:"hostname"`
	IPStatus string `json:"ip_status"`
	POPID    string `json:"pop_id"`
	Platform string `json:"platform"`
}

type Platform

type Platform struct {
	Platform string
	IPList   []IPInfo `json:"ip_list"`
}

type PlatformList

type PlatformList struct {
	Status int        `json:"status"`
	Info   string     `json:"info"`
	Result []Platform `json:"result"`
}

func GetPlatformASJSON

func GetPlatformASJSON() (repons PlatformList, err error)

type Platforms

type Platforms struct {
	Id       int       `orm:"column(id)"`
	Platform string    `orm:"column(platform)"`
	Contacts string    `orm:"column(contacts)"`
	Count    int       `orm:"column(count)"`
	Updated  time.Time `orm:"column(updated)"`
}

orm model

Jump to

Keyboard shortcuts

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