Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusOk = "OK" StatusErr = "ERR" StatusInquire = "INQUIRE" StatusData = "D" StatusLines = "S" StatusComment = "#" )
Variables ¶
View Source
var InquireCancel = errors.New("inquiry cancelled")
View Source
var InvalidCsExp = errors.New("invalid cs-exp")
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) Transact ¶
func (c *Conn) Transact(command string, inquire InquireFunc) (res Response, err error)
Execute a command and retrieve the result.
If an INQUIRE is received then inquire() will be invoked with the text after INQUIRE and all status lines received so far. It should return data to send, or it can return an err of InquireCancel which will cause a CANCEL to be sent and the resulting response to be returned. If inquire is nil then a CANCEL is always sent.
Click to show internal directories.
Click to hide internal directories.