github.com/streamdal/segmentio-kafka-go@v0.4.47-streamdal/protocol/offsetdelete/offsetdelete.go (about) 1 package offsetdelete 2 3 import "github.com/segmentio/kafka-go/protocol" 4 5 func init() { 6 protocol.Register(&Request{}, &Response{}) 7 } 8 9 type Request struct { 10 GroupID string `kafka:"min=v0,max=v0"` 11 Topics []RequestTopic `kafka:"min=v0,max=v0"` 12 } 13 14 func (r *Request) ApiKey() protocol.ApiKey { return protocol.OffsetDelete } 15 16 func (r *Request) Group() string { return r.GroupID } 17 18 type RequestTopic struct { 19 Name string `kafka:"min=v0,max=v0"` 20 Partitions []RequestPartition `kafka:"min=v0,max=v0"` 21 } 22 23 type RequestPartition struct { 24 PartitionIndex int32 `kafka:"min=v0,max=v0"` 25 } 26 27 var ( 28 _ protocol.GroupMessage = (*Request)(nil) 29 ) 30 31 type Response struct { 32 ErrorCode int16 `kafka:"min=v0,max=v0"` 33 ThrottleTimeMs int32 `kafka:"min=v0,max=v0"` 34 Topics []ResponseTopic `kafka:"min=v0,max=v0"` 35 } 36 37 func (r *Response) ApiKey() protocol.ApiKey { return protocol.OffsetDelete } 38 39 type ResponseTopic struct { 40 Name string `kafka:"min=v0,max=v0"` 41 Partitions []ResponsePartition `kafka:"min=v0,max=v0"` 42 } 43 44 type ResponsePartition struct { 45 PartitionIndex int32 `kafka:"min=v0,max=v0"` 46 ErrorCode int16 `kafka:"min=v0,max=v0"` 47 }