Documentation ¶
Overview ¶
Package gocql is a generated GoMock package.
Index ¶
- func ConvertError(operation string, err error) error
- func IsNotFoundError(err error) bool
- func IsThrottlingError(err error) bool
- func IsTimeoutError(err error) bool
- func NewCassandraCluster(cfg config.Cassandra, resolver resolver.ServiceResolver) (*gocql.ClusterConfig, error)
- func NewSession(config config.Cassandra, resolver resolver.ServiceResolver) (*session, error)
- func UUIDToString(item interface{}) string
- func UUIDsToStrings(item interface{}) []string
- type Batch
- type BatchType
- type Consistency
- type Iter
- type MockBatch
- type MockBatchMockRecorder
- type MockIter
- type MockIterMockRecorder
- type MockQuery
- func (m *MockQuery) Bind(arg0 ...interface{}) Query
- func (m *MockQuery) Consistency(arg0 Consistency) Query
- func (m *MockQuery) EXPECT() *MockQueryMockRecorder
- func (m *MockQuery) Exec() error
- func (m *MockQuery) Iter() Iter
- func (m *MockQuery) MapScan(arg0 map[string]interface{}) error
- func (m *MockQuery) MapScanCAS(arg0 map[string]interface{}) (bool, error)
- func (m *MockQuery) PageSize(arg0 int) Query
- func (m *MockQuery) PageState(arg0 []byte) Query
- func (m *MockQuery) Scan(arg0 ...interface{}) error
- func (m *MockQuery) ScanCAS(arg0 ...interface{}) (bool, error)
- func (m *MockQuery) WithContext(arg0 context.Context) Query
- func (m *MockQuery) WithTimestamp(arg0 int64) Query
- type MockQueryMockRecorder
- func (mr *MockQueryMockRecorder) Bind(arg0 ...interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) Consistency(arg0 interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) Exec() *gomock.Call
- func (mr *MockQueryMockRecorder) Iter() *gomock.Call
- func (mr *MockQueryMockRecorder) MapScan(arg0 interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) MapScanCAS(arg0 interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) PageSize(arg0 interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) PageState(arg0 interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) Scan(arg0 ...interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) ScanCAS(arg0 ...interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) WithContext(arg0 interface{}) *gomock.Call
- func (mr *MockQueryMockRecorder) WithTimestamp(arg0 interface{}) *gomock.Call
- type MockSession
- func (m *MockSession) AwaitSchemaAgreement(ctx context.Context) error
- func (m *MockSession) Close()
- func (m *MockSession) EXPECT() *MockSessionMockRecorder
- func (m *MockSession) ExecuteBatch(arg0 Batch) error
- func (m *MockSession) MapExecuteBatchCAS(arg0 Batch, arg1 map[string]interface{}) (bool, Iter, error)
- func (m *MockSession) NewBatch(arg0 BatchType) Batch
- func (m *MockSession) Query(arg0 string, arg1 ...interface{}) Query
- type MockSessionMockRecorder
- func (mr *MockSessionMockRecorder) AwaitSchemaAgreement(ctx interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) Close() *gomock.Call
- func (mr *MockSessionMockRecorder) ExecuteBatch(arg0 interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) MapExecuteBatchCAS(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) NewBatch(arg0 interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) Query(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- type Query
- type SerialConsistency
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertError ¶
func IsNotFoundError ¶
func IsThrottlingError ¶
func IsTimeoutError ¶
func NewCassandraCluster ¶
func NewCassandraCluster( cfg config.Cassandra, resolver resolver.ServiceResolver, ) (*gocql.ClusterConfig, error)
func NewSession ¶
func NewSession( config config.Cassandra, resolver resolver.ServiceResolver, ) (*session, error)
func UUIDToString ¶
func UUIDToString( item interface{}, ) string
func UUIDsToStrings ¶
func UUIDsToStrings( item interface{}, ) []string
Types ¶
type Batch ¶
type Batch interface { Query(string, ...interface{}) WithContext(context.Context) Batch WithTimestamp(int64) Batch }
Batch is the interface for batch operation.
type Consistency ¶
type Consistency uint16
Consistency is the consistency level used by a Query
const ( Any Consistency = iota One Two Three Quorum All LocalQuorum EachQuorum LocalOne )
Definition of all Consistency levels
type Iter ¶
type Iter interface { Scan(...interface{}) bool MapScan(map[string]interface{}) bool PageState() []byte Close() error }
Iter is the interface for executing and iterating over all resulting rows.
type MockBatch ¶
type MockBatch struct {
// contains filtered or unexported fields
}
MockBatch is a mock of Batch interface.
func NewMockBatch ¶
func NewMockBatch(ctrl *gomock.Controller) *MockBatch
NewMockBatch creates a new mock instance.
func (*MockBatch) EXPECT ¶
func (m *MockBatch) EXPECT() *MockBatchMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBatch) WithContext ¶
WithContext mocks base method.
func (*MockBatch) WithTimestamp ¶
WithTimestamp mocks base method.
type MockBatchMockRecorder ¶
type MockBatchMockRecorder struct {
// contains filtered or unexported fields
}
MockBatchMockRecorder is the mock recorder for MockBatch.
func (*MockBatchMockRecorder) Query ¶
func (mr *MockBatchMockRecorder) Query(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Query indicates an expected call of Query.
func (*MockBatchMockRecorder) WithContext ¶
func (mr *MockBatchMockRecorder) WithContext(arg0 interface{}) *gomock.Call
WithContext indicates an expected call of WithContext.
func (*MockBatchMockRecorder) WithTimestamp ¶
func (mr *MockBatchMockRecorder) WithTimestamp(arg0 interface{}) *gomock.Call
WithTimestamp indicates an expected call of WithTimestamp.
type MockIter ¶
type MockIter struct {
// contains filtered or unexported fields
}
MockIter is a mock of Iter interface.
func NewMockIter ¶
func NewMockIter(ctrl *gomock.Controller) *MockIter
NewMockIter creates a new mock instance.
func (*MockIter) EXPECT ¶
func (m *MockIter) EXPECT() *MockIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIterMockRecorder ¶
type MockIterMockRecorder struct {
// contains filtered or unexported fields
}
MockIterMockRecorder is the mock recorder for MockIter.
func (*MockIterMockRecorder) Close ¶
func (mr *MockIterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockIterMockRecorder) MapScan ¶
func (mr *MockIterMockRecorder) MapScan(arg0 interface{}) *gomock.Call
MapScan indicates an expected call of MapScan.
func (*MockIterMockRecorder) PageState ¶
func (mr *MockIterMockRecorder) PageState() *gomock.Call
PageState indicates an expected call of PageState.
func (*MockIterMockRecorder) Scan ¶
func (mr *MockIterMockRecorder) Scan(arg0 ...interface{}) *gomock.Call
Scan indicates an expected call of Scan.
type MockQuery ¶
type MockQuery struct {
// contains filtered or unexported fields
}
MockQuery is a mock of Query interface.
func NewMockQuery ¶
func NewMockQuery(ctrl *gomock.Controller) *MockQuery
NewMockQuery creates a new mock instance.
func (*MockQuery) Consistency ¶
func (m *MockQuery) Consistency(arg0 Consistency) Query
Consistency mocks base method.
func (*MockQuery) EXPECT ¶
func (m *MockQuery) EXPECT() *MockQueryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockQuery) MapScanCAS ¶
MapScanCAS mocks base method.
func (*MockQuery) WithContext ¶
WithContext mocks base method.
func (*MockQuery) WithTimestamp ¶
WithTimestamp mocks base method.
type MockQueryMockRecorder ¶
type MockQueryMockRecorder struct {
// contains filtered or unexported fields
}
MockQueryMockRecorder is the mock recorder for MockQuery.
func (*MockQueryMockRecorder) Bind ¶
func (mr *MockQueryMockRecorder) Bind(arg0 ...interface{}) *gomock.Call
Bind indicates an expected call of Bind.
func (*MockQueryMockRecorder) Consistency ¶
func (mr *MockQueryMockRecorder) Consistency(arg0 interface{}) *gomock.Call
Consistency indicates an expected call of Consistency.
func (*MockQueryMockRecorder) Exec ¶
func (mr *MockQueryMockRecorder) Exec() *gomock.Call
Exec indicates an expected call of Exec.
func (*MockQueryMockRecorder) Iter ¶
func (mr *MockQueryMockRecorder) Iter() *gomock.Call
Iter indicates an expected call of Iter.
func (*MockQueryMockRecorder) MapScan ¶
func (mr *MockQueryMockRecorder) MapScan(arg0 interface{}) *gomock.Call
MapScan indicates an expected call of MapScan.
func (*MockQueryMockRecorder) MapScanCAS ¶
func (mr *MockQueryMockRecorder) MapScanCAS(arg0 interface{}) *gomock.Call
MapScanCAS indicates an expected call of MapScanCAS.
func (*MockQueryMockRecorder) PageSize ¶
func (mr *MockQueryMockRecorder) PageSize(arg0 interface{}) *gomock.Call
PageSize indicates an expected call of PageSize.
func (*MockQueryMockRecorder) PageState ¶
func (mr *MockQueryMockRecorder) PageState(arg0 interface{}) *gomock.Call
PageState indicates an expected call of PageState.
func (*MockQueryMockRecorder) Scan ¶
func (mr *MockQueryMockRecorder) Scan(arg0 ...interface{}) *gomock.Call
Scan indicates an expected call of Scan.
func (*MockQueryMockRecorder) ScanCAS ¶
func (mr *MockQueryMockRecorder) ScanCAS(arg0 ...interface{}) *gomock.Call
ScanCAS indicates an expected call of ScanCAS.
func (*MockQueryMockRecorder) WithContext ¶
func (mr *MockQueryMockRecorder) WithContext(arg0 interface{}) *gomock.Call
WithContext indicates an expected call of WithContext.
func (*MockQueryMockRecorder) WithTimestamp ¶
func (mr *MockQueryMockRecorder) WithTimestamp(arg0 interface{}) *gomock.Call
WithTimestamp indicates an expected call of WithTimestamp.
type MockSession ¶
type MockSession struct {
// contains filtered or unexported fields
}
MockSession is a mock of Session interface.
func NewMockSession ¶
func NewMockSession(ctrl *gomock.Controller) *MockSession
NewMockSession creates a new mock instance.
func (*MockSession) AwaitSchemaAgreement ¶
func (m *MockSession) AwaitSchemaAgreement(ctx context.Context) error
AwaitSchemaAgreement mocks base method.
func (*MockSession) EXPECT ¶
func (m *MockSession) EXPECT() *MockSessionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSession) ExecuteBatch ¶
func (m *MockSession) ExecuteBatch(arg0 Batch) error
ExecuteBatch mocks base method.
func (*MockSession) MapExecuteBatchCAS ¶
func (m *MockSession) MapExecuteBatchCAS(arg0 Batch, arg1 map[string]interface{}) (bool, Iter, error)
MapExecuteBatchCAS mocks base method.
func (*MockSession) NewBatch ¶
func (m *MockSession) NewBatch(arg0 BatchType) Batch
NewBatch mocks base method.
func (*MockSession) Query ¶
func (m *MockSession) Query(arg0 string, arg1 ...interface{}) Query
Query mocks base method.
type MockSessionMockRecorder ¶
type MockSessionMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionMockRecorder is the mock recorder for MockSession.
func (*MockSessionMockRecorder) AwaitSchemaAgreement ¶
func (mr *MockSessionMockRecorder) AwaitSchemaAgreement(ctx interface{}) *gomock.Call
AwaitSchemaAgreement indicates an expected call of AwaitSchemaAgreement.
func (*MockSessionMockRecorder) Close ¶
func (mr *MockSessionMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockSessionMockRecorder) ExecuteBatch ¶
func (mr *MockSessionMockRecorder) ExecuteBatch(arg0 interface{}) *gomock.Call
ExecuteBatch indicates an expected call of ExecuteBatch.
func (*MockSessionMockRecorder) MapExecuteBatchCAS ¶
func (mr *MockSessionMockRecorder) MapExecuteBatchCAS(arg0, arg1 interface{}) *gomock.Call
MapExecuteBatchCAS indicates an expected call of MapExecuteBatchCAS.
func (*MockSessionMockRecorder) NewBatch ¶
func (mr *MockSessionMockRecorder) NewBatch(arg0 interface{}) *gomock.Call
NewBatch indicates an expected call of NewBatch.
func (*MockSessionMockRecorder) Query ¶
func (mr *MockSessionMockRecorder) Query(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Query indicates an expected call of Query.
type Query ¶
type Query interface { Exec() error Scan(...interface{}) error ScanCAS(...interface{}) (bool, error) MapScan(map[string]interface{}) error MapScanCAS(map[string]interface{}) (bool, error) Iter() Iter PageSize(int) Query PageState([]byte) Query WithContext(context.Context) Query WithTimestamp(int64) Query Consistency(Consistency) Query Bind(...interface{}) Query }
Query is the interface for query object.
type SerialConsistency ¶
type SerialConsistency uint16
SerialConsistency is the serial consistency level used by a Query
const ( Serial SerialConsistency = iota LocalSerial )
Definition of all SerialConsistency levels
type Session ¶
type Session interface { Query(string, ...interface{}) Query NewBatch(BatchType) Batch ExecuteBatch(Batch) error MapExecuteBatchCAS(Batch, map[string]interface{}) (bool, Iter, error) AwaitSchemaAgreement(ctx context.Context) error Close() }
Session is the interface for interacting with the database.