roottypes

package
v0.0.0-...-a7ebeb7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: BSD-3-Clause Imports: 0 Imported by: 3 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package roottypes contains the things needed to deal with preventing circular dependencies Protected by BSD 3 clause license

Index

Constants

View Source
const (
	// CREATE = create action
	CREATE = iota
	// READHOST = read action for a single host
	READHOST
	// READHOSTS = read the list of hosts currently in the cache
	READHOSTS
	// UPDATE = update action
	UPDATE
	// DELETE = delete action
	DELETE
	// OK = Response encoded
	OK
	// ERROR = oh dear
	ERROR
	// STRING = get in memory DB in text form
	STRING
	// LOCK = locks the cache for reading
	LOCK
	// UNLOCK = unlocks the cache for normal operations
	UNLOCK
	// SAVECFG = saves the actual config in TOML for this application
	SAVECFG
)

Enums for CRUD operations

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	Response chan Envelope `json:"-" toml:"-"`
	CRUD     int           `json:"-"`
	String   string        `json:"-" toml:"-"`
	HostList []string      `json:"-" toml:"-"`
	Hosts
}

Envelope gives us a dirty way to use the channel without infecting the Hosts struct with a chan (causes encoding issues).

type Hosts

type Hosts struct {
	Ethernet string `json:"ethernetaddress" dhcpd:"hardware ethernet "`
	FixedIP  string `json:"fixedipaddress" dhcpd:"fixed-address "`
	HostName string `json:"hostname" dhcpd:"option host-name "`
	CfgFile  string `json:"cfgfile" dhcpd:"option ezjunosztp.config-file-name " toml:"-"`
	CfgImage string `json:"imagefile" dhcpd:"option ezjunosztp.image-file-name "`
	UpdateIP string `json:"-" toml:"-"`
	Vendor   string `json:"vendor"`
}

Hosts holds data for a single DHCP ISC ZTP host

Jump to

Keyboard shortcuts

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