dhcpd

package
v0.0.0-...-044d4f0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrimaryColor string = "#3F51B5"
	PrimaryLight string = "#C5CAE9"
	PrimaryDark  string = "#001F5F"
	AccentColor  string = "#00796B"
	ErrorColor   string = "#8A0B29"
)

Variables

This section is empty.

Functions

func NewMainMenu

func NewMainMenu() list.Model

func Run

func Run()

Types

type Action

type Action int

The type of action to invoke on the systemd dhcpd service

func (*Action) Result

func (a *Action) Result(err error) ActionResult

Creates a result from the action send to the service

func (*Action) String

func (a *Action) String() string

Converts the action to a string value used by the .exec command

type ActionResult

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

The result of an action invoked on the systemd dhcp service

type BannerModel

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

func NewBanner

func NewBanner(message string, state BannerState, width int) BannerModel

func (BannerModel) Init

func (m BannerModel) Init() tea.Cmd

func (BannerModel) Update

func (m BannerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (BannerModel) View

func (m BannerModel) View() string

type BannerState

type BannerState int
const (
	BannerNormalState BannerState = iota
	BannerErrorState  BannerState = 1
)

type DhcpConfig

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

type DhcpOptions

type DhcpOptions struct {
}

type DhcpdViewModel

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

func InitialModel

func InitialModel() *DhcpdViewModel

func (*DhcpdViewModel) Init

func (*DhcpdViewModel) Init() tea.Cmd

Init implements tea.Model.

func (*DhcpdViewModel) Update

func (m *DhcpdViewModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*DhcpdViewModel) View

func (m *DhcpdViewModel) View() string

View implements tea.Model.

type HelpModel

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

func NewHelpModel

func NewHelpModel() HelpModel

func (HelpModel) Init

func (m HelpModel) Init() tea.Cmd

func (HelpModel) Update

func (m HelpModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (HelpModel) View

func (m HelpModel) View() string

type Hostname

type Hostname string

The fully qualified hostname of the device.

type IpAddress

type IpAddress string

The ip address assigned to the device from the dhcp server

type Lease

type Lease struct {
	MacAddress
	Hostname
	IpAddress
}

Represents a lease on the dhcp server.

type LeaseTime

type LeaseTime int

Duration for the lease

type MacAddress

type MacAddress string

The devices hardware ID used by the dhcp lease

type NetMask

type NetMask string

Te ip netmask used for the dhcp server

type ServiceStatus

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

func (*ServiceStatus) View

func (s *ServiceStatus) View() string

type StaticLeases

type StaticLeases []Lease

Represents a collection of static leases used by the server.

type SubnetDeclaration

type SubnetDeclaration struct {
	Subnet  IpAddress
	Netmask NetMask
	Start   IpAddress
	End     IpAddress
	Gateway IpAddress

	OptionDomainName       string
	OptionDnsServers       string
	OptionBroadcastAddress string

	DefaultLeaseTime LeaseTime
	MaxLeaseTime     LeaseTime
}

Reresents a subnet declaration for an internal DHCP server LAN

Jump to

Keyboard shortcuts

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