rotesting

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool contains dockertest and redis connection pool

func MustCreate

func MustCreate() *Pool

MustCreate creates new pool object

func (*Pool) Cleanup

func (p *Pool) Cleanup() error

Cleanup remove all data in redis

func (*Pool) Get

func (p *Pool) Get() redis.Conn

Get gets a connection with redis

func (*Pool) GetContext

func (p *Pool) GetContext(ctx context.Context) (redis.Conn, error)

GetContext gets a connection with redis

func (*Pool) MustClose

func (p *Pool) MustClose()

MustClose closes redis connection pool and dockertest pool

type Post

type Post struct {
	ID        uint64 `redis:"id"`
	Title     string `redis:"title"`
	Body      string `redis:"body"`
	UpdatedAt int64  `redis:"updated_at"`
}

Post is a test object

func (*Post) GetKeySuffix

func (p *Post) GetKeySuffix() string

GetKeySuffix implements the types.Model interface

func (*Post) GetScoreMap

func (p *Post) GetScoreMap() map[string]interface{}

GetScoreMap implements the types.Model interface

Jump to

Keyboard shortcuts

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