repo

package
v2.6.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandStringWord

func RandStringWord() string

func Start

func Start(enableSeed bool, enabledRepos string, items int)

Types

type ArangoDBRepo

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

func (*ArangoDBRepo) Init

func (repo *ArangoDBRepo) Init() bool

func (*ArangoDBRepo) Query1Cond

func (repo *ArangoDBRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ArangoDBRepo) Query2Cond

func (repo *ArangoDBRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ArangoDBRepo) QueryByID

func (repo *ArangoDBRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*ArangoDBRepo) QueryFullText

func (repo *ArangoDBRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*ArangoDBRepo) Seed

func (repo *ArangoDBRepo) Seed(itemsInDataSet int) bool

func (*ArangoDBRepo) Update

func (repo *ArangoDBRepo) Update(N int)

type ClickHouseRepo

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

func (*ClickHouseRepo) Init

func (repo *ClickHouseRepo) Init() bool

func (*ClickHouseRepo) Query1Cond

func (repo *ClickHouseRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ClickHouseRepo) Query2Cond

func (repo *ClickHouseRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ClickHouseRepo) QueryByID

func (repo *ClickHouseRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*ClickHouseRepo) QueryFullText

func (repo *ClickHouseRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*ClickHouseRepo) Seed

func (repo *ClickHouseRepo) Seed(itemsInDataSet int) bool

func (*ClickHouseRepo) Update

func (repo *ClickHouseRepo) Update(N int)

type DummyRepo

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

func (*DummyRepo) Init

func (repo *DummyRepo) Init() bool

func (*DummyRepo) Query1Cond

func (repo *DummyRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*DummyRepo) Query2Cond

func (repo *DummyRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*DummyRepo) QueryByID

func (repo *DummyRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*DummyRepo) QueryFullText

func (repo *DummyRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*DummyRepo) Seed

func (repo *DummyRepo) Seed(itemsInDataSet int) bool

func (*DummyRepo) Update

func (repo *DummyRepo) Update(N int)

type ElasticRepo

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

func (*ElasticRepo) Init

func (repo *ElasticRepo) Init() bool

func (*ElasticRepo) Query1Cond

func (repo *ElasticRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ElasticRepo) Query2Cond

func (repo *ElasticRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ElasticRepo) QueryByID

func (repo *ElasticRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*ElasticRepo) QueryFullText

func (repo *ElasticRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*ElasticRepo) Seed

func (repo *ElasticRepo) Seed(itemsInDataSet int) bool

func (*ElasticRepo) Update

func (repo *ElasticRepo) Update(N int)

type Item

type Item struct {
	ID          int64  `reindex:"id,,pk" json:"id" db:"id"`
	Name        string `reindex:"name" json:"name"  db:"name"`
	Description string `reindex:"description,text" json:"description"  db:"description"`
	Year        int    `reindex:"year,tree" json:"year" db:"year"`
}

type MongoDBRepo

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

func (*MongoDBRepo) Init

func (repo *MongoDBRepo) Init() bool

func (*MongoDBRepo) Query1Cond

func (repo *MongoDBRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*MongoDBRepo) Query2Cond

func (repo *MongoDBRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*MongoDBRepo) QueryByID

func (repo *MongoDBRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*MongoDBRepo) QueryFullText

func (repo *MongoDBRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*MongoDBRepo) Seed

func (repo *MongoDBRepo) Seed(itemsInDataSet int) bool

func (*MongoDBRepo) Update

func (repo *MongoDBRepo) Update(N int)

type MySQLRepo

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

func (*MySQLRepo) Init

func (repo *MySQLRepo) Init() bool

func (*MySQLRepo) Query1Cond

func (repo *MySQLRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*MySQLRepo) Query2Cond

func (repo *MySQLRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*MySQLRepo) QueryByID

func (repo *MySQLRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*MySQLRepo) QueryFullText

func (repo *MySQLRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*MySQLRepo) Seed

func (repo *MySQLRepo) Seed(itemsInDataSet int) bool

func (*MySQLRepo) Update

func (repo *MySQLRepo) Update(N int)

type RedisRepo

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

func (*RedisRepo) Init

func (repo *RedisRepo) Init() bool

func (*RedisRepo) Query1Cond

func (repo *RedisRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*RedisRepo) Query2Cond

func (repo *RedisRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*RedisRepo) QueryByID

func (repo *RedisRepo) QueryByID(N int, onlyQuery bool) (item *Item)

func (*RedisRepo) QueryFullText

func (repo *RedisRepo) QueryFullText(textQuery func() string, N int, limit int) []*Item

func (*RedisRepo) Seed

func (repo *RedisRepo) Seed(itemsInDataSet int) bool

func (*RedisRepo) Update

func (repo *RedisRepo) Update(N int)

type ReindexRepo

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

func (*ReindexRepo) ForceObjCache

func (repo *ReindexRepo) ForceObjCache()

func (*ReindexRepo) Init

func (repo *ReindexRepo) Init() bool

func (*ReindexRepo) Query1Cond

func (repo *ReindexRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ReindexRepo) Query2Cond

func (repo *ReindexRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*ReindexRepo) QueryByID

func (repo *ReindexRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*ReindexRepo) QueryFullText

func (repo *ReindexRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*ReindexRepo) Seed

func (repo *ReindexRepo) Seed(itemsInDataSet int) bool

func (*ReindexRepo) Update

func (repo *ReindexRepo) Update(N int)

type Repo

type Repo interface {
	Init() bool
	Seed(itemInDataSet int) bool
	QueryFullText(textQuery func() string, N int, limit int) []*Item
	QueryByID(N int, onlyQuery bool) *Item
	Query2Cond(N int, onlyQuery bool, limit int) []*Item
	Query1Cond(N int, onlyQuery bool, limit int) []*Item
	Update(N int)
}

func Get

func Get(name string) Repo

type RethinkDBRepo

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

func (*RethinkDBRepo) Init

func (repo *RethinkDBRepo) Init() bool

func (*RethinkDBRepo) Query1Cond

func (repo *RethinkDBRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*RethinkDBRepo) Query2Cond

func (repo *RethinkDBRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*RethinkDBRepo) QueryByID

func (repo *RethinkDBRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*RethinkDBRepo) QueryFullText

func (repo *RethinkDBRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*RethinkDBRepo) Seed

func (repo *RethinkDBRepo) Seed(itemsInDataSet int) bool

func (*RethinkDBRepo) Update

func (repo *RethinkDBRepo) Update(N int)

type SphinxRepo

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

func (*SphinxRepo) Init

func (repo *SphinxRepo) Init() bool

func (*SphinxRepo) Query1Cond

func (repo *SphinxRepo) Query1Cond(N int, onlyQuery bool, limit int) []*Item

func (*SphinxRepo) Query2Cond

func (repo *SphinxRepo) Query2Cond(N int, onlyQuery bool, limit int) []*Item

func (*SphinxRepo) QueryByID

func (repo *SphinxRepo) QueryByID(N int, onlyQuery bool) *Item

func (*SphinxRepo) QueryFullText

func (repo *SphinxRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*SphinxRepo) Seed

func (repo *SphinxRepo) Seed(itemsInDataSet int) bool

func (*SphinxRepo) Update

func (repo *SphinxRepo) Update(N int)

type SqliteRepo

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

func (*SqliteRepo) Init

func (repo *SqliteRepo) Init() bool

func (*SqliteRepo) Query1Cond

func (repo *SqliteRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*SqliteRepo) Query2Cond

func (repo *SqliteRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*SqliteRepo) QueryByID

func (repo *SqliteRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*SqliteRepo) QueryFullText

func (repo *SqliteRepo) QueryFullText(textQuery func() string, N int, limit int) (ret []*Item)

func (*SqliteRepo) Seed

func (repo *SqliteRepo) Seed(itemsInDataSet int) bool

func (*SqliteRepo) Update

func (repo *SqliteRepo) Update(N int)

type TarantoolRepo

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

func (*TarantoolRepo) Init

func (repo *TarantoolRepo) Init() bool

func (*TarantoolRepo) Query1Cond

func (repo *TarantoolRepo) Query1Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*TarantoolRepo) Query2Cond

func (repo *TarantoolRepo) Query2Cond(N int, onlyQuery bool, limit int) (ret []*Item)

func (*TarantoolRepo) QueryByID

func (repo *TarantoolRepo) QueryByID(N int, onlyQuery bool) (it *Item)

func (*TarantoolRepo) QueryFullText

func (repo *TarantoolRepo) QueryFullText(textQuery func() string, N int, limit int) []*Item

func (*TarantoolRepo) Seed

func (repo *TarantoolRepo) Seed(itemsInDataSet int) bool

func (*TarantoolRepo) Update

func (repo *TarantoolRepo) Update(N int)

type TestLogger

type TestLogger struct {
}

func (TestLogger) Printf

func (TestLogger) Printf(level int, format string, msg ...interface{})

Jump to

Keyboard shortcuts

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