store

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDNS

func DefaultDNS(r string) (err error)

func DefaultLeaseDuration

func DefaultLeaseDuration(r string) (err error)

func DefaultPrefix added in v0.13.0

func DefaultPrefix(r string) (err error)

func DefaultRange

func DefaultRange(r string) (err error)

func DefaultRouter

func DefaultRouter(r string) (err error)

func DeleteManifest

func DeleteManifest(m *manifest.Manifest) (err error)

func GetAll

func GetAll() (manifests map[string]*manifest.Manifest)

func GetByID

func GetByID(id string) (m *manifest.Manifest)

func GetByIP

func GetByIP(ip string) (m *manifest.Manifest)

func GetByMAC

func GetByMAC(mac string) (m *manifest.Manifest)

func GetDynamic

func GetDynamic(mac string) (m *manifest.Manifest, err error)

func GetExpired

func GetExpired() (manifests map[string]*manifest.Manifest)

func GetUsedIPs

func GetUsedIPs() (ips []string)

func InitKubernetes

func InitKubernetes(kubepath string) (err error)

func InitMemory

func InitMemory() error

func InitNetbox

func InitNetbox(url string, apiKey string) error

func InitPowerDNS

func InitPowerDNS(url string, apiKey string) error

func PutManifest

func PutManifest(m manifest.Manifest) (err error)

func Suspend

func Suspend(id string) (err error)

func Unsuspend

func Unsuspend(id string) (err error)

func UpdateLease

func UpdateLease(id string) (err error)

Types

type Store

type Store struct {
	PutManifest    func(manifest.Manifest) error
	DeleteManifest func(*manifest.Manifest) error
	GetByID        func(string) *manifest.Manifest
	GetByIP        func(string) *manifest.Manifest
	GetByMAC       func(string) *manifest.Manifest
	GetAll         func() map[string]*manifest.Manifest
	GetExpired     func() map[string]*manifest.Manifest
	GetUsedIPs     func() []string
	UpdateLease    func(string) error
	Suspend        func(string) error
	Unsuspend      func(string) error
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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