Files
openlan/pkg/models/link.go
2025-04-21 10:45:08 +08:00

24 lines
401 B
Go
Executable File

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.Access {
status := &schema.Access{}
_ = libol.UnmarshalLoad(status, l.StatusFile)
return status
}
func (l *Link) Status() *schema.Access {
return l.reload()
}