srv

package
v0.0.0-...-e2de2ce Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KickstartTemplateService

func KickstartTemplateService(w http.ResponseWriter, r *http.Request)

func RegisterHostService

func RegisterHostService(w http.ResponseWriter, r *http.Request)

Types

type KickstartVars

type KickstartVars struct {
	BuildCommit string
	BuildTime   string
	Pre         string
	Address     string
}

type RegisterHostPayload

type RegisterHostPayload struct {
	MacAddresses []string `json:"mac"`
	Serial       string   `json:"serial"`

	CPU struct {
		Count int `json:"count"`
	} `json:"cpu"`

	DMI struct {
		BIOSVendor            string `json:"bios-vendor"`
		BIOSVersion           string `json:"bios-version"`
		BIOSReleaseDate       string `json:"bios-release-date"`
		BIOSRevision          string `json:"bios-revision"`
		FirmwareRevision      string `json:"firmware-revision"`
		SystemManufacturer    string `json:"system-manufacturer"`
		SystemProductName     string `json:"system-product-name"`
		SystemVersion         string `json:"system-version"`
		SystemSerialNumber    string `json:"system-serial-number"`
		SystemUUID            string `json:"system-uuid"`
		SystemSKUNumber       string `json:"system-sku-number"`
		SystemFamily          string `json:"system-family"`
		BaseboardManufacturer string `json:"baseboard-manufacturer"`
		BaseboardProductName  string `json:"baseboard-product-name"`
		BaseboardVersion      string `json:"baseboard-version"`
		BaseboardSerialNumber string `json:"baseboard-serial-number"`
		BaseboardAssetTag     string `json:"baseboard-asset-tag"`
		ChassisManufacturer   string `json:"chassis-manufacturer"`
		ChassisType           string `json:"chassis-type"`
		ChassisVersion        string `json:"chassis-version"`
		ChassisSerialNumber   string `json:"chassis-serial-number"`
		ChassisAssetTag       string `json:"chassis-asset-tag"`
		ProcessorFamily       string `json:"processor-family"`
		ProcessorManufacturer string `json:"processor-manufacturer"`
		ProcessorVersion      string `json:"processor-version"`
		ProcessorFrequency    string `json:"processor-frequency"`
	} `json:"dmi"`

	Log [][]string `json:"log"`
}

func (*RegisterHostPayload) Bind

func (p *RegisterHostPayload) Bind(_ *http.Request) error

type ResponseError

type ResponseError struct {
	// HTTP status code
	HTTPStatusCode int `json:"-"`

	// user facing error message
	Message string `json:"msg"`

	// trace id from context (if provided)
	TraceId string `json:"trace_id,omitempty"`

	// full root cause
	Error error `json:"error"`
}

ResponseError implements Go standard error interface as well as Wrapper and Renderer

func NewInvalidRequestError

func NewInvalidRequestError(ctx context.Context, err error) *ResponseError

func (*ResponseError) Render

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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