Documentation
¶
Index ¶
- Constants
- Variables
- func Fatal(err error) error
- func Fatalf(format string, args ...interface{}) error
- func FormatJSON(v any) string
- func GenerateInitrd(outputName, inputName string, fileNames []string) error
- func IsDir(path string) bool
- func IsFile(path string) bool
- func UnzipFile(filename string) (string, error)
- func ZipFile(filename string) (string, error)
- type AddResponse
- type Config
- type DeleteResponse
- type Host
- type HostAddressResponse
- type HostCache
- func (c *HostCache) AddHostHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DebianHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DefaultHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DeleteHostHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) GenerateISO(url, isoDir, isoFile string, config *Config) error
- func (c *HostCache) HostAddressQueryHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) HostBootedHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) IPXEHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) IsoFile(url string, config *Config) (string, error)
- func (c *HostCache) ListHostsHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) NetbootISOHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) OpenBSDHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) UploadPackageHandler(w http.ResponseWriter, r *http.Request)
- type HostListResponse
- type InitFile
- type MkBoot
- type Options
- type Record
- type Response
- type Server
Constants ¶
View Source
const DEFAULT_ADDRESS = "127.0.0.1"
View Source
const DEFAULT_HOSTNAME = "netboot.local"
View Source
const DEFAULT_PORT = "2014"
View Source
const Version = "1.0.0"
Variables ¶
View Source
var IPXE_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})\.ipxe$`)
View Source
var MAC_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$`)
View Source
var PKG_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})\.tgz$`)
Functions ¶
func FormatJSON ¶
func GenerateInitrd ¶ added in v0.0.3
Types ¶
type AddResponse ¶
type DeleteResponse ¶
type HostAddressResponse ¶
type HostCache ¶
type HostCache struct {
// contains filtered or unexported fields
}
func NewHostCache ¶
func (*HostCache) AddHostHandler ¶
func (c *HostCache) AddHostHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) DebianHandler ¶ added in v0.0.3
func (c *HostCache) DebianHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) DefaultHandler ¶
func (c *HostCache) DefaultHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) DeleteHostHandler ¶
func (c *HostCache) DeleteHostHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) GenerateISO ¶ added in v0.0.3
Generate a url-customized netboot ISO
func (*HostCache) HostAddressQueryHandler ¶
func (c *HostCache) HostAddressQueryHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) HostBootedHandler ¶
func (c *HostCache) HostBootedHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) IPXEHandler ¶ added in v0.0.3
func (c *HostCache) IPXEHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) IsoFile ¶ added in v0.0.3
return the netboot.iso filename the url, generating the ISO if not present
func (*HostCache) ListHostsHandler ¶
func (c *HostCache) ListHostsHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) NetbootISOHandler ¶ added in v0.0.3
func (c *HostCache) NetbootISOHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) OpenBSDHandler ¶ added in v0.0.3
func (c *HostCache) OpenBSDHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) UploadPackageHandler ¶
func (c *HostCache) UploadPackageHandler(w http.ResponseWriter, r *http.Request)
type HostListResponse ¶
type MkBoot ¶
type MkBoot struct {
Config *Config
Dir string
Tarball string
Response string
DiskLabelTemplate string
URL string
}
Click to show internal directories.
Click to hide internal directories.