Skip to content
Snippets Groups Projects
Verified Commit 70fd0600 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: initial working version

parent 01290d83
No related branches found
No related tags found
No related merge requests found
package models
type IPResponse struct {
IP IP `json:"ip"`
}
type IP struct {
IP string `json:"ip"`
ServerIP string `json:"server_ip"`
ServerNumber int `json:"server_number"`
Locked bool `json:"locked"`
SeparateMac string `json:"separate_mac"`
TrafficWarnings bool `json:"traffic_warnings"`
TrafficHourly int `json:"traffic_hourly"`
TrafficDaily int `json:"traffic_daily"`
TrafficMonthly int `json:"traffic_monthly"`
}
package models
type KeyResponse struct {
Key Key `json:"key"`
}
type Key struct {
Name string `json:"name"`
Fingerprint string `json:"fingerprint"`
Type string `json:"type"`
Size int `json:"size"`
Data string `json:"data"`
}
package models
type RdnsResponse struct {
Rdns Rdns `json:"rdns"`
}
type Rdns struct {
IP string `json:"ip"`
Ptr string `json:"ptr"`
}
package models
const ResetTypePower = "power"
const ResetTypeHardware = "hw"
const ResetTypeSoftware = "sw"
const ResetTypeManual = "man"
type ResetResponse struct {
Reset Reset `json:"reset"`
}
type Reset struct {
OperatingStatus string `json:"operating_status"`
ServerIP string `json:"server_ip"`
ServerNumber ServerNumber `json:"server_number"`
Type []string `json:"type"`
}
type ResetPostResponse struct {
Reset ResetPost `json:"reset"`
}
type ResetPost struct {
ServerIP string `json:"server_ip"`
Type string `json:"type"`
}
type ResetSetInput struct {
Type string
}
package models
type ServerResponse struct {
Server Server `json:"server"`
}
type Subnet struct {
IP string `json:"ip"`
Mask string `json:"mask"`
}
type ServerNumber int
type Server struct {
ServerIP string `json:"server_ip"`
ServerNumber ServerNumber `json:"server_number"`
ServerName string `json:"server_name"`
Product string `json:"product"`
Dc string `json:"dc"`
Traffic string `json:"traffic"`
Flatrate bool `json:"flatrate"`
Status string `json:"status"`
Throttled bool `json:"throttled"`
Cancelled bool `json:"cancelled"`
PaidUntil string `json:"paid_until"`
IP []string `json:"ip"`
Subnet []Subnet `json:"subnet"`
Reset bool `json:"reset"`
Rescue bool `json:"rescue"`
Vnc bool `json:"vnc"`
Windows bool `json:"windows"`
Plesk bool `json:"plesk"`
Cpanel bool `json:"cpanel"`
Wol bool `json:"wol"`
HotSwap bool `json:"hot_swap"`
}
type ServerSetNameInput struct {
Name string
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.kuschku.de/justjanne/hetzner-robot/schema.json",
"title": "hetzner robot manifest",
"description": "something here",
"type": "object",
"properties": {
"api-key": {
"description": "API Key for Hetzner Robot API (username)",
"type": "string"
},
"api-secret": {
"description": "API Secret for Hetzner Robot API (password)",
"type": "string"
},
"server": {
"description": "Hetzner Baremetal Server ID",
"type": "integer",
"exclusiveMinimum": 0
},
"files": {
"description": "Files to upload and execute",
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"description": "Current local path for the file",
"type": "string"
},
"target": {
"description": "Desired remote path for the file",
"type": "string"
},
"mode": {
"description": "Desired access mode for the file after uploading",
"type": "integer"
},
"execute": {
"description": "Whether the file should be executed after uploading",
"type": "boolean"
}
},
"required": ["source", "target", "mode", "execute"]
},
"uniqueItems": true
}
},
"required": ["api-key", "api-secret", "server", "files"]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment