mirror of
https://github.com/lukaszraczylo/lolcathost.git
synced 2026-06-15 01:41:21 +00:00
Create CNAME
This commit is contained in:
@@ -13,23 +13,24 @@ const SocketPath = "/var/run/lolcathost.sock"
|
||||
type RequestType string
|
||||
|
||||
const (
|
||||
RequestPing RequestType = "ping"
|
||||
RequestStatus RequestType = "status"
|
||||
RequestList RequestType = "list"
|
||||
RequestSet RequestType = "set"
|
||||
RequestAdd RequestType = "add"
|
||||
RequestDelete RequestType = "delete"
|
||||
RequestSync RequestType = "sync"
|
||||
RequestPreset RequestType = "preset"
|
||||
RequestRollback RequestType = "rollback"
|
||||
RequestBackups RequestType = "backups"
|
||||
RequestAddGroup RequestType = "add_group"
|
||||
RequestDeleteGroup RequestType = "delete_group"
|
||||
RequestRenameGroup RequestType = "rename_group"
|
||||
RequestListGroups RequestType = "list_groups"
|
||||
RequestAddPreset RequestType = "add_preset"
|
||||
RequestDeletePreset RequestType = "delete_preset"
|
||||
RequestListPresets RequestType = "list_presets"
|
||||
RequestPing RequestType = "ping"
|
||||
RequestStatus RequestType = "status"
|
||||
RequestList RequestType = "list"
|
||||
RequestSet RequestType = "set"
|
||||
RequestAdd RequestType = "add"
|
||||
RequestDelete RequestType = "delete"
|
||||
RequestSync RequestType = "sync"
|
||||
RequestPreset RequestType = "preset"
|
||||
RequestRollback RequestType = "rollback"
|
||||
RequestBackups RequestType = "backups"
|
||||
RequestAddGroup RequestType = "add_group"
|
||||
RequestDeleteGroup RequestType = "delete_group"
|
||||
RequestRenameGroup RequestType = "rename_group"
|
||||
RequestListGroups RequestType = "list_groups"
|
||||
RequestAddPreset RequestType = "add_preset"
|
||||
RequestDeletePreset RequestType = "delete_preset"
|
||||
RequestListPresets RequestType = "list_presets"
|
||||
RequestBackupContent RequestType = "backup_content"
|
||||
)
|
||||
|
||||
// ErrorCode defines standard error codes.
|
||||
@@ -71,6 +72,11 @@ type RollbackPayload struct {
|
||||
BackupName string `json:"backup_name"`
|
||||
}
|
||||
|
||||
// BackupContentPayload is the payload for backup_content requests.
|
||||
type BackupContentPayload struct {
|
||||
BackupName string `json:"backup_name"`
|
||||
}
|
||||
|
||||
// AddPayload is the payload for add requests.
|
||||
type AddPayload struct {
|
||||
Domain string `json:"domain"`
|
||||
@@ -169,6 +175,11 @@ type BackupInfo struct {
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
|
||||
// BackupContentData is the data for backup_content responses.
|
||||
type BackupContentData struct {
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
// NewRequest creates a new request with the given type and payload.
|
||||
func NewRequest(reqType RequestType, payload interface{}) (*Request, error) {
|
||||
req := &Request{Type: reqType}
|
||||
|
||||
Reference in New Issue
Block a user