api

package
v0.0.2-0...-cd8339c Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(c *config.Config) *API

func (*API) CreateNicConfig

func (api *API) CreateNicConfig() http.HandlerFunc

func (*API) DeleteAllNics

func (api *API) DeleteAllNics() http.HandlerFunc

func (*API) DeleteNic

func (api *API) DeleteNic() http.HandlerFunc

func (*API) GetConfigHandler

func (api *API) GetConfigHandler() http.HandlerFunc

func (*API) GetNic

func (api *API) GetNic() http.HandlerFunc

func (*API) GetNics

func (api *API) GetNics() http.HandlerFunc

func (*API) RegisterUITemplate

func (api *API) RegisterUITemplate(r *mux.Router) error

func (*API) Start

func (a *API) Start()

func (*API) UpdateNicConfig

func (api *API) UpdateNicConfig() http.HandlerFunc

type ImageUploader

type ImageUploader struct {
	Cfg *config.Config
}

func (*ImageUploader) Upload

func (iu *ImageUploader) Upload(r *iso9660.Reader) error

func (*ImageUploader) UploadHandler

func (iu *ImageUploader) UploadHandler() http.HandlerFunc

type ServerItem

type ServerItem struct {
	Ip         string `yaml:"ip" json:"ip"`
	Hostname   string `yaml:"hostname" json:"hostname"`
	MacAddress string `json:"mac_address"`
	Gateway    string `yaml:"gateway" json:"gateway"`
	Netmask    string `yaml:"netmask" json:"netmask"`
}

func (ServerItem) Validate

func (s ServerItem) Validate() error

Jump to

Keyboard shortcuts

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