| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- package gocql
- const (
- errServer = 0x0000
- errProtocol = 0x000A
- errCredentials = 0x0100
- errUnavailable = 0x1000
- errOverloaded = 0x1001
- errBootstrapping = 0x1002
- errTruncate = 0x1003
- errWriteTimeout = 0x1100
- errReadTimeout = 0x1200
- errSyntax = 0x2000
- errUnauthorized = 0x2100
- errInvalid = 0x2200
- errConfig = 0x2300
- errAlreadyExists = 0x2400
- errUnprepared = 0x2500
- )
- type RequestError interface {
- Code() int
- Message() string
- Error() string
- }
- type errorFrame struct {
- code int
- message string
- }
- func (e errorFrame) Code() int {
- return e.code
- }
- func (e errorFrame) Message() string {
- return e.message
- }
- func (e errorFrame) Error() string {
- return e.Message()
- }
- type RequestErrUnavailable struct {
- errorFrame
- Consistency Consistency
- Required int
- Alive int
- }
- type RequestErrWriteTimeout struct {
- errorFrame
- Consistency Consistency
- Received int
- BlockFor int
- WriteType string
- }
- type RequestErrReadTimeout struct {
- errorFrame
- Consistency Consistency
- Received int
- BlockFor int
- DataPresent byte
- }
- type RequestErrAlreadyExists struct {
- errorFrame
- Keyspace string
- Table string
- }
- type RequestErrUnprepared struct {
- errorFrame
- StatementId []byte
- }
|