Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCQLCluster ¶
func NewCQLCluster(hosts []string, reconnectInterval time.Duration) *gocql.ClusterConfig
NewCQLCluster generates a new GoSQL config for Cassandra 3, which uses Proto 3
Types ¶
type CQLSession ¶
func NewCQLSession ¶
func NewCQLSession(cluster *gocql.ClusterConfig) *CQLSession
func (*CQLSession) Finalize ¶
func (s *CQLSession) Finalize()
func (*CQLSession) Initialize ¶
func (s *CQLSession) Initialize()
type CQLTweetRepo ¶
type CQLTweetRepo struct {
// contains filtered or unexported fields
}
func NewCQLTweetRepo ¶
func NewCQLTweetRepo(session *CQLSession, replicationFactor int) *CQLTweetRepo
func (*CQLTweetRepo) All ¶
func (r *CQLTweetRepo) All() ([]model.Tweet, error)
Returns all tweets, from newest to oldest
func (*CQLTweetRepo) CheckReady ¶
func (r *CQLTweetRepo) CheckReady() error
func (*CQLTweetRepo) Finalize ¶
func (r *CQLTweetRepo) Finalize()
func (*CQLTweetRepo) Initialize ¶
func (r *CQLTweetRepo) Initialize()
type MockTweetRepo ¶
type MockTweetRepo struct {
// contains filtered or unexported fields
}
MockTweetRepo is an in-memory TweetRepo
func NewMockTweetRepo ¶
func NewMockTweetRepo() *MockTweetRepo
func (*MockTweetRepo) All ¶
func (r *MockTweetRepo) All() ([]model.Tweet, error)
Returns all tweets, from newest to oldest
func (*MockTweetRepo) CheckReady ¶
func (r *MockTweetRepo) CheckReady() error
Click to show internal directories.
Click to hide internal directories.