olsr

package
v0.0.212 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: AGPL-3.0 Imports: 14 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 AREDNHost

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

func (*AREDNHost) String

func (h *AREDNHost) String() string

type AREDNService

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

func (*AREDNService) String

func (s *AREDNService) String() string

type HostData

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

type HostsParser

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

func NewHostsParser

func NewHostsParser() *HostsParser

func (*HostsParser) GetAREDNHostsCount

func (p *HostsParser) GetAREDNHostsCount() int

func (*HostsParser) GetHosts

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

func (*HostsParser) GetHostsCount

func (p *HostsParser) GetHostsCount() int

func (*HostsParser) GetHostsPaginated

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

func (*HostsParser) GetTotalHostsCount

func (p *HostsParser) GetTotalHostsCount() int

func (*HostsParser) Parse

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

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() []*AREDNService

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