cassandra

package
v0.0.0-...-40cae88 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 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 CassandraRepository

type CassandraRepository interface {
	Close()
	Truncate(TBL_NAME) error
	InsertPromotions([]Promotion) error
	GetPromotionByID(id string) (*Promotion, error)
}

func NewCassandraRepository

func NewCassandraRepository(userName, password string, cassandraMaxRetryConnect int, hosts ...string) (CassandraRepository, error)

type Promotion

type Promotion struct {
	ID             string
	Price          float64
	ExpirationDate time.Time
}

type TBL_NAME

type TBL_NAME string
const (
	TBL_PROMOTIONS TBL_NAME = "promotions"
)

Jump to

Keyboard shortcuts

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