discovery

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIDevice

type APIDevice struct {
	Identifier string `json:"identifier" required:"true"`
	Hostname   string `json:"hostname" required:"true"`
	IP         string `json:"ip" required:"true"`
	MAC        string `json:"mac" required:"true"`
}

type APIDevicesApplyInput

type APIDevicesApplyInput struct {
	Identifier string `query:"identifier" required:"true"`
	To         string `json:"to" enum:"dhcp,dns" required:"true"`
	DHCPScope  string `json:"dhcpScope" required:"true"`
	DNSZone    string `json:"dnsZone" required:"true"`
}

type APIDevicesDeleteInput

type APIDevicesDeleteInput struct {
	Name string `query:"identifier"`
}

type APIDevicesGetInput added in v0.4.6

type APIDevicesGetInput struct {
	Identifier string `query:"identifier"  description:"Optionally get device by identifier"`
}

type APIDevicesGetOutput

type APIDevicesGetOutput struct {
	Devices []APIDevice `json:"devices"`
}

type APIRoleConfigInput

type APIRoleConfigInput struct {
	Config RoleConfig `json:"config" required:"true"`
}

type APIRoleConfigOutput

type APIRoleConfigOutput struct {
	Config RoleConfig `json:"config" required:"true"`
}

type APISubnet

type APISubnet struct {
	Name string `json:"name" required:"true"`

	CIDR         string `json:"subnetCidr" required:"true"`
	DNSResolver  string `json:"dnsResolver" required:"true"`
	DiscoveryTTL int    `json:"discoveryTTL" required:"true"`
}

type APISubnetsDeleteInput

type APISubnetsDeleteInput struct {
	Name string `query:"identifier"`
}

type APISubnetsGetInput added in v0.4.6

type APISubnetsGetInput struct {
	Name string `query:"name"  description:"Optionally get Subnet by name"`
}

type APISubnetsGetOutput

type APISubnetsGetOutput struct {
	Subnets []APISubnet `json:"subnets"`
}

type APISubnetsPutInput

type APISubnetsPutInput struct {
	Name string `query:"identifier" required:"true" maxLength:"255"`

	SubnetCIDR   string `json:"subnetCidr" required:"true" maxLength:"40"`
	DNSResolver  string `json:"dnsResolver" required:"true" maxLength:"255"`
	DiscoveryTTL int    `json:"discoveryTTL" required:"true"`
}

type APISubnetsStartInput

type APISubnetsStartInput struct {
	Name string `query:"identifier" required:"true"`
}

type Device

type Device struct {
	Identifier string `json:"-"`

	Hostname string `json:"hostname"`
	IP       string `json:"ip"`
	MAC      string `json:"mac"`
	// contains filtered or unexported fields
}

type Role

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

func New

func New(instance roles.Instance) *Role

func (*Role) APIDevicesApply

func (r *Role) APIDevicesApply() usecase.Interactor

func (*Role) APIDevicesDelete

func (r *Role) APIDevicesDelete() usecase.Interactor

func (*Role) APIDevicesGet

func (r *Role) APIDevicesGet() usecase.Interactor

func (*Role) APIRoleConfigGet

func (r *Role) APIRoleConfigGet() usecase.Interactor

func (*Role) APIRoleConfigPut

func (r *Role) APIRoleConfigPut() usecase.Interactor

func (*Role) APISubnetsDelete

func (r *Role) APISubnetsDelete() usecase.Interactor

func (*Role) APISubnetsGet

func (r *Role) APISubnetsGet() usecase.Interactor

func (*Role) APISubnetsPut

func (r *Role) APISubnetsPut() usecase.Interactor

func (*Role) APISubnetsStart

func (r *Role) APISubnetsStart() usecase.Interactor

func (*Role) NewSubnet

func (r *Role) NewSubnet(name string) *Subnet

func (*Role) Start

func (r *Role) Start(ctx context.Context, config []byte) error

func (*Role) Stop

func (r *Role) Stop()

type RoleConfig

type RoleConfig struct {
	Enabled bool `json:"enabled"`
}

type Subnet

type Subnet struct {
	Identifier string `json:"-"`

	CIDR        string `json:"cidr"`
	DNSResolver string `json:"dnsResolver"`

	DiscoveryTTL int `json:"discoveryTTL"`
	// contains filtered or unexported fields
}

func (*Subnet) RunDiscovery

func (s *Subnet) RunDiscovery() []Device

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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