olsr

package
v0.0.424 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(config *config.Config, db *gorm.DB) string

func GenerateAndSave

func GenerateAndSave(config *config.Config, db *gorm.DB) error

Types

type Host

type Host struct {
	HostData
	Children []HostData `json:"children"`
}

func (*Host) String

func (h *Host) String() string

type HostData

type HostData struct {
	Hostname string         `json:"hostname"`
	IP       net.IP         `json:"ip"`
	Services []*MeshService `json:"services"`
}

type HostsParser

type HostsParser struct {
	// contains filtered or unexported fields
}

func NewHostsParser

func NewHostsParser() *HostsParser

func (*HostsParser) GetHosts

func (p *HostsParser) GetHosts() []*Host

func (*HostsParser) GetHostsCount

func (p *HostsParser) GetHostsCount() int

func (*HostsParser) GetHostsPaginated

func (p *HostsParser) GetHostsPaginated(page int, limit int, filter string) []*Host

func (*HostsParser) GetMeshHostsCount

func (p *HostsParser) GetMeshHostsCount() int

func (*HostsParser) GetTotalHostsCount

func (p *HostsParser) GetTotalHostsCount() int

func (*HostsParser) Parse

func (p *HostsParser) Parse() (err error)

type MeshService

type MeshService struct {
	URL        string `json:"url"`
	Protocol   string `json:"protocol"`
	Name       string `json:"name"`
	ShouldLink bool   `json:"should_link"`
}

func (*MeshService) String

func (s *MeshService) String() string

type Parsers

type Parsers struct {
	HostsParser    *HostsParser
	ServicesParser *ServicesParser
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(config *config.Config) *Service

func (*Service) IsEnabled

func (s *Service) IsEnabled() bool

func (*Service) IsRunning

func (s *Service) IsRunning() bool

func (*Service) Reload

func (s *Service) Reload() error

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

type ServicesParser

type ServicesParser struct {
	// contains filtered or unexported fields
}

func NewServicesParser

func NewServicesParser() *ServicesParser

func (*ServicesParser) GetServices

func (p *ServicesParser) GetServices() []*MeshService

func (*ServicesParser) GetServicesCount

func (p *ServicesParser) GetServicesCount() int

func (*ServicesParser) Parse

func (p *ServicesParser) Parse() (err error)

Jump to

Keyboard shortcuts

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