datastores

package
v0.0.0-...-828e842 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthDatastore

type AuthDatastore struct {
	sql.DB
}

AuthDatastore represents a wrapper around sql.DB

func NewAuthInstance

func NewAuthInstance(db *sql.DB) *AuthDatastore

NewAuthInstance returns a wrapped db connection

func (*AuthDatastore) IsTokenAuthorized

func (d *AuthDatastore) IsTokenAuthorized(token string) (bool, error)

IsTokenAuthorized checks wheter a token is valid or not

type StorageDatastore

type StorageDatastore struct {
	*gocql.Session
}

StorageDatastore wraps a gocql.Session

func NewStorageInstance

func NewStorageInstance(cluster *gocql.ClusterConfig) (*StorageDatastore, error)

NewStorageInstance returns a new StorageDatastore containing a connection to the specified cluster

func (*StorageDatastore) Close

func (d *StorageDatastore) Close()

Close closes the internal gocql.Session instance

func (*StorageDatastore) StoreBatchEvents

func (d *StorageDatastore) StoreBatchEvents(p *models.EventTrackingPayload) error

StoreBatchEvents stores multiple events from models.EventTrackingPayload within a batch

Jump to

Keyboard shortcuts

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