hopp/generate/protocol.go

48 lines
534 B
Go

package generate
type Protocol struct {
Messages map[uint16] Message
Types map[string] Type
}
type Message struct {
Name string
Type Type
}
type Type interface {
}
type TypeInt struct {
Bits int
Signed bool
}
type TypeFloat struct {
Bits int
}
type TypeString struct { }
type TypeBuffer struct { }
type TypeArray struct {
Element Type
}
type TypeTable struct { }
type TypeTableDefined struct {
Fields map[uint16] Field
}
type Field struct {
Name string
Type Type
}
type TypeNamed struct {
Name string
}