cassandra

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlankSession = errors.New("err_blanksession")
)

Functions

func NewRepository

func NewRepository(session Session) *repository

func Setup

func Setup(cfg *Configuration) error

Types

type Configuration

type Configuration struct {
	URL       string        `json:"url" mapstructure:"url"`
	Keyspace  string        `json:"keyspace" mapstructure:"keyspace"`
	Username  string        `json:"username" mapstructure:"username"`
	Password  string        `json:"password" mapstructure:"password"`
	NumConns  int           `json:"numConns" mapstructure:"numConns"`
	KeepAlive time.Duration `json:"keepAliveDuration" mapstructure:"keepAliveDuration"`
}
var (
	Config *Configuration
)

func (Configuration) String

func (c Configuration) String() string

type Iter

type Iter interface {
	Close() error
	NumRows() int
	Scanner() gocql.Scanner
}

type Query

type Query interface {
	Scan(...interface{}) error
	Exec() error
	Iter() Iter
	Consistency(gocql.Consistency) Query
	PageSize(int) Query
	Release()
	String() string
	// contains filtered or unexported methods
}

type Session

type Session interface {
	Close()
	Query(string, ...interface{}) Query
	Closed() bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL