Fix swagger deps

This commit is contained in:
Florian Hoss 2023-07-04 23:18:05 +02:00
parent 28f068c890
commit f63210272d
28 changed files with 307 additions and 310 deletions

View file

@ -1,59 +0,0 @@
package types
type (
ErrorResponses uint
ItemType uint
NotifierType uint
)
const (
Create NotifierType = iota
Delete
DeleteAll
)
const (
Food ItemType = iota
ColdDrink
HotDrink
)
const (
MissingInformation ErrorResponses = iota
CannotCreate
CannotUpdate
CannotDelete
CannotFind
StillInUse
CannotParse
)
func ParseItemType(itemType string) ItemType {
switch itemType {
case "0":
return Food
case "1":
return ColdDrink
default:
return HotDrink
}
}
func (e ErrorResponses) String() string {
switch e {
case MissingInformation:
return "fehlende Informationen"
case CannotCreate:
return "kann nicht gespeichert werden"
case CannotUpdate:
return "kann nicht geändert werden"
case CannotDelete:
return "kann nicht gelöscht werden"
case CannotFind:
return "kann nicht gefunden werden"
case StillInUse:
return "noch in Verwendung"
default:
return "kann nicht verarbeitet werden"
}
}