clone from danieldin95

This commit is contained in:
sicheng
2022-07-29 23:38:54 +08:00
commit ac4f79bbf4
1931 changed files with 568263 additions and 0 deletions

23
pkg/models/link.go Executable file
View File

@@ -0,0 +1,23 @@
package models
import (
"github.com/luscis/openlan/pkg/libol"
"github.com/luscis/openlan/pkg/schema"
)
type Link struct {
User string
Network string
Protocol string
StatusFile string
}
func (l *Link) reload() *schema.Point {
status := &schema.Point{}
_ = libol.UnmarshalLoad(status, l.StatusFile)
return status
}
func (l *Link) Status() *schema.Point {
return l.reload()
}