github.com/deanMdreon/kafka-go@v0.4.32/protocol/saslauthenticate/saslauthenticate.go (about)

     1  package saslauthenticate
     2  
     3  import "github.com/deanMdreon/kafka-go/protocol"
     4  
     5  func init() {
     6  	protocol.Register(&Request{}, &Response{})
     7  }
     8  
     9  type Request struct {
    10  	AuthBytes []byte `kafka:"min=v0,max=v1"`
    11  }
    12  
    13  func (r *Request) ApiKey() protocol.ApiKey { return protocol.SaslAuthenticate }
    14  
    15  type Response struct {
    16  	ErrorCode         int16  `kafka:"min=v0,max=v1"`
    17  	ErrorMessage      string `kafka:"min=v0,max=v1,nullable"`
    18  	AuthBytes         []byte `kafka:"min=v0,max=v1"`
    19  	SessionLifetimeMs int64  `kafka:"min=v1,max=v1"`
    20  }
    21  
    22  func (r *Response) ApiKey() protocol.ApiKey { return protocol.SaslAuthenticate }