Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,fmt.Sprintf("Was not able to convert the HTTP values to a message. %s",err))
// ICCC works with structs! If this is not a struct, its an error.
ifelementType.Kind()!=reflect.Struct{
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityMiddle,LM.ImpactMiddle,LM.MessageNamePARSE,`Was not able to transform HTTP data to a message, because the given data was not a struct.`)
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
}else{
// The destination:
vardestinationint64
// A reader for the bytes:
buffer:=bytes.NewReader(bytesArray)
// Try to decode the bytes to an instance of the type:
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the binary data to the type of the ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBinary.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
}else{
// Decode the bytes as string:
text:=string(bytesArray)
// Decode the URL encoded string:
textFinal,errURL:=url.QueryUnescape(text)
iferrURL!=nil{
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode a URL encoded string.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errURL.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
}else{
// The destination:
vardestinationfloat64
// A reader for the bytes:
buffer:=bytes.NewReader(bytesArray)
// Try to decode the bytes to an instance of the type:
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the binary data to the type of the ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBinary.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
}else{
// The destination:
vardestination[]int64
// A reader for the bytes:
buffer:=bytes.NewReader(bytesArray)
// Try to decode the bytes to an instance of the type:
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the binary data to the type of the ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBinary.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
// Loop over all URL encoded strings and decode it:
forn,element:=rangeallStrings{
elementFinal,errURL:=url.QueryUnescape(element)
iferrURL!=nil{
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode a base64 string for a string array.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errURL.Error())
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the base64 data to an ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBase64.Error())
}else{
// The destination:
vardestination[]float64
// A reader for the bytes:
buffer:=bytes.NewReader(bytesArray)
// Try to decode the bytes to an instance of the type:
Log.LogFull(senderName,LM.CategorySYSTEM,LM.LevelERROR,LM.SeverityUnknown,LM.ImpactUnknown,LM.MessageNamePARSE,`Was not able to decode the binary data to the type of the ICCC message.`,fmt.Sprintf("channel='%s'",channel),fmt.Sprintf("command='%s'",command),errBinary.Error())