x.Rref = int(xc.rref)
x.Connection = ChannelConnection(xc.connection)
switch x.Connection{
-case ChannelConnectionUnknown:
-x.ConnectionUnion = nil
case ChannelConnectionPty:
var connectionPty ChannelinfoConnectionUnionPty
if err := connectionPty.fromC(xc);err != nil {
x.ConnectionUnion = connectionPty
case ChannelConnectionSocket:
x.ConnectionUnion = nil
+case ChannelConnectionUnknown:
+x.ConnectionUnion = nil
default:
return fmt.Errorf("invalid union key '%v'", x.Connection)}
return fmt.Errorf("converting field typeHvm: %v", err)
}
x.TypeUnion = typeHvm
+case DomainTypeInvalid:
+x.TypeUnion = nil
case DomainTypePv:
var typePv DomainBuildInfoTypeUnionPv
if err := typePv.fromC(xc);err != nil {
return fmt.Errorf("converting field typePvh: %v", err)
}
x.TypeUnion = typePvh
-case DomainTypeInvalid:
-x.TypeUnion = nil
default:
return fmt.Errorf("invalid union key '%v'", x.Type)}
x.ArchArm.GicVersion = GicVersion(xc.arch_arm.gic_version)
x.Name = C.GoString(xc.name)
x.Connection = ChannelConnection(xc.connection)
switch x.Connection{
-case ChannelConnectionUnknown:
-x.ConnectionUnion = nil
case ChannelConnectionPty:
x.ConnectionUnion = nil
case ChannelConnectionSocket:
return fmt.Errorf("converting field connectionSocket: %v", err)
}
x.ConnectionUnion = connectionSocket
+case ChannelConnectionUnknown:
+x.ConnectionUnion = nil
default:
return fmt.Errorf("invalid union key '%v'", x.Connection)}
x.ForUser = uint64(xc.for_user)
x.Type = EventType(xc._type)
switch x.Type{
-case EventTypeDomainShutdown:
-var typeDomainShutdown EventTypeUnionDomainShutdown
-if err := typeDomainShutdown.fromC(xc);err != nil {
- return fmt.Errorf("converting field typeDomainShutdown: %v", err)
-}
-x.TypeUnion = typeDomainShutdown
-case EventTypeDomainDeath:
-x.TypeUnion = nil
case EventTypeDiskEject:
var typeDiskEject EventTypeUnionDiskEject
if err := typeDiskEject.fromC(xc);err != nil {
return fmt.Errorf("converting field typeDiskEject: %v", err)
}
x.TypeUnion = typeDiskEject
+case EventTypeDomainCreateConsoleAvailable:
+x.TypeUnion = nil
+case EventTypeDomainDeath:
+x.TypeUnion = nil
+case EventTypeDomainShutdown:
+var typeDomainShutdown EventTypeUnionDomainShutdown
+if err := typeDomainShutdown.fromC(xc);err != nil {
+ return fmt.Errorf("converting field typeDomainShutdown: %v", err)
+}
+x.TypeUnion = typeDomainShutdown
case EventTypeOperationComplete:
var typeOperationComplete EventTypeUnionOperationComplete
if err := typeOperationComplete.fromC(xc);err != nil {
return fmt.Errorf("converting field typeOperationComplete: %v", err)
}
x.TypeUnion = typeOperationComplete
-case EventTypeDomainCreateConsoleAvailable:
-x.TypeUnion = nil
default:
return fmt.Errorf("invalid union key '%v'", x.Type)}