12345678910111213141516171819202122 |
- // Package noop is a macAndIPXE handler that does nothing.
- package reservation
- import (
- "context"
- "dhcp/data"
- "errors"
- "net"
- )
- // Handler is a noop macAndIPXE.
- type noop struct{}
- // GetByMac returns an error.
- func (h noop) GetByMac(_ context.Context, _ net.HardwareAddr, _ string) (*data.DHCP, error) {
- return nil, errors.New("no macAndIPXE specified, please specify a macAndIPXE")
- }
- // GetByIP returns an error.
- func (h noop) GetByIP(_ context.Context, _ net.IP, _ string) (*data.DHCP, error) {
- return nil, errors.New("no macAndIPXE specified, please specify a macAndIPXE")
- }
|