22 lines
1.0 KiB
Go
22 lines
1.0 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
// Hostname Model
|
|
// @Description Model of the Hostname as it
|
|
// @Description is represented in the database
|
|
type Hostname struct {
|
|
ID int `json:"Id" example:"25"` // Internal ID of the Hostname within the database
|
|
Category string `json:"Category" example:"notebook"` // Category / Rule that was used when generating the hostname
|
|
Hostname string `json:"Hostname" example:"ISEHENNB0009"` // Generated hostname
|
|
Parameters map[string]interface{} `json:"Parameters"` // Parameter object of rule specific attributes, see rule.* models
|
|
CreatedAt time.Time `json:"Created_at" example:"2024-01-16T12:53:59Z"` // Creation Time of the entry
|
|
}
|
|
|
|
// SimpleHostnameResponse
|
|
// @Description Model of the Hostname as returned by
|
|
// @Description POST endpoint
|
|
type SimpleHostnameResponse struct {
|
|
Hostname string `json:"Hostname"` // Name of the newly generated host
|
|
}
|