rotesting

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 8 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) Deserialized added in v0.7.0

func (p *Post) Deserialized(b []byte)

Deserialized implements the types.Model interface

func (*Post) GetDatabaseNo added in v0.7.11

func (p *Post) GetDatabaseNo() string

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

func (*Post) Serialized added in v0.6.0

func (p *Post) Serialized() []byte

Serialized implements the types.Model interface

type Post_Serialized added in v0.7.0

type Post_Serialized struct {
	ro.Model
	ID        uint64 `redis:"id"`
	UserID    uint64 `redis:"user_id"`
	Title     string `redis:"title"`
	Body      string `redis:"body"`
	CreatedAt int64  `redis:"created_at"`
}

func (*Post_Serialized) Deserialized added in v0.7.0

func (p *Post_Serialized) Deserialized(b []byte)

func (*Post_Serialized) GetDatabaseNo added in v0.7.11

func (p *Post_Serialized) GetDatabaseNo() string

func (*Post_Serialized) GetKeySuffix added in v0.7.0

func (p *Post_Serialized) GetKeySuffix() string

func (*Post_Serialized) GetScoreMap added in v0.7.0

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

func (*Post_Serialized) Serialized added in v0.7.0

func (p *Post_Serialized) Serialized() []byte

Jump to

Keyboard shortcuts

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