model

package
v0.0.0-...-4c7ee39 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AdminStatus = []string{"up(1)", "down(2)", "testing(3)"}
	OperStatus  = []string{"up(1)", "down(2)", "testing(3)", "unknown(4)", "dormant(5)", "notPresent(6)", "lowerLayerDown(7)"}
)

common

Functions

This section is empty.

Types

type BundleEther

type BundleEther struct {
	Port
	SubIndexes []string
}

BundleEther logic port

type Device

type Device struct {
	IP        string `gorm:"primary_key"`
	Type      string `json:"type"`
	Vendor    string `json:"vendor"`
	OId       string `json:"oid"`
	Desc      string `json:"description"`
	Status    string `json:"status"`
	Location  string
	UpTime    string
	Contract  string
	Services  string
	Name      string `json:"name"`
	Community string `json:"community"`
}

Device l1,l2,l3 device

type Port

type Port struct {
	Index        int       `json:"index"`
	ID           string    `json:"id"`
	IP           string    `json:"ip"`
	Mac          string    `json:"mac"`
	Name         string    `json:"name"`
	Descr        string    `json:"descr"`
	UsefullSpeed int64     `json:"realSpeed"` //bits
	Speed        int64     `json:"speed"`     //bits
	Mtu          int       `json:"mtu"`
	AdminStatus  int       `json:"admin"`
	OperStatus   int       `json:"oper"`
	CreateTime   time.Time `json:"createTime"`
	SyncTime     time.Time `json:"syncTime"`
	DeviceIP     string    `json:"deviceIP"`
	DeviceName   string    `json:"deviceName"`
	Removed      bool      `json:"removed"`
	RemovedTime  time.Time `json:"removedTime"`
	Monitor      bool      `json:"monitor"`
}

Port physical and logic

func (*Port) AdminStr

func (p *Port) AdminStr() (v string)

AdminStr

func (*Port) OperStr

func (p *Port) OperStr() (v string)

AdminStr

func (*Port) RealSpeed

func (p *Port) RealSpeed() (s int64)

RealSpeed get Real UsefullSpeed

Jump to

Keyboard shortcuts

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