schema

package
v0.0.0-...-b4ab54f Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	Name  string    `json:"name"`
	Rules []ACLRule `json:"rules"`
}

type ACLRule

type ACLRule struct {
	Name    string `json:"name"`
	SrcIp   string `json:"src"`
	DstIp   string `json:"dst"`
	Proto   string `json:"proto"`
	SrcPort int    `json:"sport"`
	DstPort int    `json:"dport"`
	Action  string `json:"action"`
}

type Bridge

type Bridge struct {
	Device
	Macs   []HwMacInfo `json:"macs"`
	Slaves []Device    `json:"slaves"`
	Stats  interface{} `json:"stats"`
}

type Category

type Category struct {
	Name string `json:"name"`
}

type Ctrl

type Ctrl struct {
	Url   string `json:"url"`
	Token string `json:"token"`
}

type Device

type Device struct {
	Name     string `json:"name"`
	Address  string `json:"address,omitempty"`
	Mac      string `json:"mac,omitempty"`
	Type     string `json:"type,omitempty"`
	Provider string `json:"provider"`
	Mtu      int    `json:"mtu,omitempty"`
}

type FindHop

type FindHop struct {
	Name      string `json:"name"`
	Mode      string `json:"mode"`
	Check     string `json:"check"`
	NextHop   string `json:"nexthop"`
	Available string `json:"available"`
}
type GraphLink struct {
	Source int `json:"source"`
	Target int `json:"target"`
	Weight int `json:"weight"`
}

type GraphNode

type GraphNode struct {
	Name       string `json:"name"`
	Value      int    `json:"value"`
	SymbolSize int    `json:"symbolSize"`
	Category   int    `json:"category"`
	Id         int    `json:"id"`
	Label      *Label `json:"label,omitempty"`
}

type HwMacInfo

type HwMacInfo struct {
	Uptime  int64  `json:"uptime"`
	Address string `json:"address"`
	Device  string `json:"device"`
}

type IPSecTunnel

type IPSecTunnel struct {
	Left      string `json:"local"`
	LeftId    string `json:"localid"`
	LeftPort  int    `json:"localport"`
	Right     string `json:"remote"`
	RightId   string `json:"remoteid"`
	RightPort int    `json:"remoteport"`
	Transport string `json:"protocol"`
	Secret    string `json:"secret"`
}

type Index

type Index struct {
	Version   Version     `json:"version"`
	Worker    Worker      `json:"worker"`
	Points    []Point     `json:"points"`
	Links     []Link      `json:"links"`
	Neighbors []Neighbor  `json:"neighbors"`
	OnLines   []OnLine    `json:"online"`
	Network   []Network   `json:"network"`
	Clients   []VPNClient `json:"clients"`
	Outputs   []Output    `json:"output"`
}

type KnockRule

type KnockRule struct {
	Network  string `json:"network"`
	Name     string `json:"name"`
	Dest     string `json:"destination"`
	Protocol string `json:"protocol"`
	Port     string `json:"port"`
	Age      int    `json:"age"`
	CreateAt int64  `json:"createAt"`
}

type Label

type Label struct {
	Show bool `json:"show"`
}

type Lease

type Lease struct {
	Address string `json:"address"`
	Alias   string `json:"alias"`
	Client  string `json:"client"`
	Type    string `json:"type"`
	Network string `json:"network"`
}
type Link struct {
	Uptime    int64  `json:"uptime"`
	UUID      string `json:"uuid"`
	Alias     string `json:"alias"`
	Network   string `json:"network"`
	User      string `json:"user"`
	Protocol  string `json:"protocol"`
	Server    string `json:"server"`
	Device    string `json:"device"`
	RxBytes   uint64 `json:"rxBytes"`
	TxBytes   uint64 `json:"txBytes"`
	ErrPkt    uint64 `json:"errors"`
	State     string `json:"state"`
	AliveTime int64  `json:"aliveTime"`
}

type Log

type Log struct {
	File  string `json:"file"`
	Level int    `json:"level"`
}

func NewLogSchema

func NewLogSchema() Log

type Message

type Message struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type MultiPath

type MultiPath struct {
	NextHop string `json:"nexthop"`
	Weight  int    `json:"weight"`
}

type Neighbor

type Neighbor struct {
	Uptime  int64  `json:"uptime"`
	UUID    string `json:"uuid"`
	HwAddr  string `json:"ethernet"`
	IpAddr  string `json:"address"`
	Client  string `json:"client"`
	Switch  string `json:"switch"`
	Network string `json:"network"`
	Device  string `json:"device"`
}

type Network

type Network struct {
	Name   string      `json:"name"`
	Config interface{} `json:"config"`
}

type OnLine

type OnLine struct {
	HitTime    int64  `json:"aliveTime"`
	UpTime     int64  `json:"uptime"`
	EthType    uint16 `json:"ethType"`
	IpSource   string `json:"sourceAddr"`
	IpDest     string `json:"destAddr"`
	IpProto    string `json:"protocol"`
	PortSource uint16 `json:"sourcePort"`
	PortDest   uint16 `json:"destPort"`
}

type Output

type Output struct {
	Network   string `json:"network"`
	Protocol  string `json:"protocol"`
	Remote    string `json:"remote"`
	DstPort   int    `json:"dstPort"`
	Segment   int    `json:"segment"`
	Secret    string `json:"secret"`
	Crypt     string `json:"crypt"`
	Device    string `json:"device"`
	RxBytes   uint64 `json:"rxBytes"`
	TxBytes   uint64 `json:"txBytes"`
	ErrPkt    uint64 `json:"errors"`
	AliveTime int64  `json:"aliveTime"`
}

type PProf

type PProf struct {
	Listen string `json:"listen"`
}

type Point

type Point struct {
	Uptime    int64   `json:"uptime"`
	UUID      string  `json:"uuid"`
	Network   string  `json:"network"`
	User      string  `json:"user"`
	Alias     string  `json:"alias"`
	Protocol  string  `json:"protocol"`
	Remote    string  `json:"remote"`
	Switch    string  `json:"switch,omitempty"`
	Device    string  `json:"device"`
	RxBytes   uint64  `json:"rxBytes"`
	TxBytes   uint64  `json:"txBytes"`
	ErrPkt    uint64  `json:"errors"`
	State     string  `json:"state"`
	AliveTime int64   `json:"aliveTime"`
	System    string  `json:"system"`
	Address   Network `json:"address"`
}

type PrefixRoute

type PrefixRoute struct {
	Prefix    string      `json:"prefix"`
	NextHop   string      `json:"nexthop"`
	FindHop   string      `json:"findhop"`
	Metric    int         `json:"metric"`
	Mode      string      `json:"mode"`
	MultiPath []MultiPath `json:"multipath,omitempty"`
}

type Qos

type Qos struct {
	Name    string  `json:"name"`
	Device  string  `json:"device"`
	Ip      string  `json:"ip"`
	InSpeed float64 `json:"inSpeed"`
}

type Rate

type Rate struct {
	Device string `json:"device"`
	Speed  int    `json:"speed"` // Mbit
}

type Subnet

type Subnet struct {
	IfAddr  string `json:"address,omitempty"`
	IpStart string `json:"startAt,omitempty"`
	IpEnd   string `json:"endAt,omitempty"`
	Netmask string `json:"netmask"`
}

type Switch

type Switch struct {
	Uptime  int64  `json:"uptime"`
	UUID    string `json:"uuid"`
	Alias   string `json:"alias"`
	Address string `json:"address"`
}

type User

type User struct {
	Alias    string `json:"alias,omitempty"`
	Role     string `json:"role,omitempty"` // admin, guest or other
	Name     string `json:"name"`
	Password string `json:"password"`
	Network  string `json:"network"`
	Lease    string `json:"leaseTime"`
}

type VPNClient

type VPNClient struct {
	Uptime    int64  `json:"uptime"`
	Name      string `json:"name"`
	UUID      string `json:"uuid"`
	Network   string `json:"network"`
	User      string `json:"user"`
	Remote    string `json:"remote"`
	Device    string `json:"device"`
	RxBytes   uint64 `json:"rxBytes"`
	TxBytes   uint64 `json:"txBytes"`
	ErrPkt    uint64 `json:"errors"`
	State     string `json:"state"`
	AliveTime int64  `json:"aliveTime"`
	Address   string `json:"address"`
	System    string `json:"system"`
}

type Version

type Version struct {
	Version string `json:"version"`
	Date    string `json:"date"`
}

func NewVersionSchema

func NewVersionSchema() Version

type VxLAN

type VxLAN struct {
	Name    string        `json:"name"`
	Bridge  string        `json:"bridge"`
	Members []VxLANMember `json:"members"`
}

type VxLANMember

type VxLANMember struct {
	Vni    int    `json:"vni"`
	Local  string `json:"local"`
	Remote string `json:"remote"`
}

type Worker

type Worker struct {
	Uptime   int64  `json:"uptime"`
	UUID     string `json:"uuid"`
	Alias    string `json:"alias"`
	Protocol string `json:"protocol"`
}

type ZGuest

type ZGuest struct {
	Network string `json:"network"`
	Name    string `json:"name"`
	Device  string `json:"device"`
	Address string `json:"Address"`
}

Jump to

Keyboard shortcuts

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