Documentation ¶
Index ¶
- type BloomFilter
- type Cache
- type ElasticSearch
- func (es *ElasticSearch) BoolQuery() *elastic.BoolQuery
- func (es *ElasticSearch) CreateIndex(ctx context.Context, name string, mapping string) error
- func (es *ElasticSearch) DeleteIndex(ctx context.Context, name string) error
- func (es *ElasticSearch) DoMultiSearch(ctx context.Context, s *elastic.MultiSearchService) (*elastic.MultiSearchResult, error)
- func (es *ElasticSearch) DoSearch(ctx context.Context, s *elastic.SearchService) (*elastic.SearchResult, error)
- func (es *ElasticSearch) InsertDocument(ctx context.Context, index string, id string, object interface{}) error
- func (es *ElasticSearch) MultiSearch() *elastic.MultiSearchService
- func (es *ElasticSearch) Query(key string, val interface{}) *elastic.MatchQuery
- func (es *ElasticSearch) Search(index string) *elastic.SearchService
- func (es *ElasticSearch) Suggest(key string) *elastic.CompletionSuggester
- func (es *ElasticSearch) TermSuggest(key string) *elastic.TermSuggester
- func (es *ElasticSearch) TermsQuery(key string, val []string) *elastic.TermsQuery
- type MongoDatabase
- type NearDB
- type RabbitMQ
- func (mq *RabbitMQ) Ack(tag uint64) error
- func (mq *RabbitMQ) Close()
- func (mq *RabbitMQ) Consume(name string) (<-chan models.MQMessage, error)
- func (mq *RabbitMQ) ExchangeDeclare(name string, kind string) error
- func (mq *RabbitMQ) Publish(name string, message models.MQMessage) error
- func (mq *RabbitMQ) PublishToExchange(name string, message models.MQMessage) error
- func (mq *RabbitMQ) QueueBindExchange(name, key, exchange string)
- func (mq *RabbitMQ) QueueDeclare(name string) (amqp.Queue, error)
- func (mq *RabbitMQ) Reject(tag uint64) error
- func (mq *RabbitMQ) SetQos(prefetchCount int, prefetchSize int, global bool) error
- type RedisClient
- func (red *RedisClient) ClearDB() error
- func (red *RedisClient) Close()
- func (red *RedisClient) Decrease(key string) (int, error)
- func (red *RedisClient) DecreaseBy(key string, num uint) (int, error)
- func (red *RedisClient) DeleteValue(key string) error
- func (red *RedisClient) GetExpire(key string) (string, error)
- func (red *RedisClient) GetValue(key string) (string, error)
- func (red *RedisClient) GetValueBytes(key string) ([]byte, error)
- func (red *RedisClient) Increase(key string) (int, error)
- func (red *RedisClient) IncreaseBy(key string, num uint) (int, error)
- func (red *RedisClient) IsError(err error) bool
- func (red *RedisClient) IsExist(err error) bool
- func (red *RedisClient) KeyExist(key string) (bool, error)
- func (red *RedisClient) Publish(key string, message string) error
- func (red *RedisClient) SetExpire(key string, exp string) error
- func (red *RedisClient) SetValue(key string, value string) error
- func (red *RedisClient) SetValueBytes(key string, value []byte) error
- func (red *RedisClient) SetValueBytesExpire(key string, value []byte, exp int) error
- func (red *RedisClient) SetValueExpire(key string, value string, exp int) error
- func (red *RedisClient) Subscribe(ctx context.Context, key string) (chan string, error)
- type RedisPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BloomFilter ¶ added in v1.0.4
type BloomFilter struct {
// contains filtered or unexported fields
}
func NewBloomFilter ¶ added in v1.0.4
func NewBloomFilter(pool *RedisPool, name string) *BloomFilter
type ElasticSearch ¶
type ElasticSearch struct {
// contains filtered or unexported fields
}
func NewElasticSearchClient ¶
func (*ElasticSearch) BoolQuery ¶
func (es *ElasticSearch) BoolQuery() *elastic.BoolQuery
func (*ElasticSearch) CreateIndex ¶
func (*ElasticSearch) DeleteIndex ¶
func (es *ElasticSearch) DeleteIndex(ctx context.Context, name string) error
func (*ElasticSearch) DoMultiSearch ¶
func (es *ElasticSearch) DoMultiSearch(ctx context.Context, s *elastic.MultiSearchService) (*elastic.MultiSearchResult, error)
func (*ElasticSearch) DoSearch ¶
func (es *ElasticSearch) DoSearch(ctx context.Context, s *elastic.SearchService) (*elastic.SearchResult, error)
func (*ElasticSearch) InsertDocument ¶
func (*ElasticSearch) MultiSearch ¶
func (es *ElasticSearch) MultiSearch() *elastic.MultiSearchService
func (*ElasticSearch) Query ¶
func (es *ElasticSearch) Query(key string, val interface{}) *elastic.MatchQuery
func (*ElasticSearch) Search ¶
func (es *ElasticSearch) Search(index string) *elastic.SearchService
func (*ElasticSearch) Suggest ¶
func (es *ElasticSearch) Suggest(key string) *elastic.CompletionSuggester
func (*ElasticSearch) TermSuggest ¶
func (es *ElasticSearch) TermSuggest(key string) *elastic.TermSuggester
func (*ElasticSearch) TermsQuery ¶
func (es *ElasticSearch) TermsQuery(key string, val []string) *elastic.TermsQuery
type MongoDatabase ¶
func NewMongoDatabase ¶
func (*MongoDatabase) Close ¶
func (db *MongoDatabase) Close() error
func (*MongoDatabase) Collection ¶
func (db *MongoDatabase) Collection(colname string) *mongo.Collection
type NearDB ¶
type NearDB struct { Conn *grpc.ClientConn Client pb.NearDBServiceClient }
type RabbitMQ ¶
type RabbitMQ struct {
// contains filtered or unexported fields
}
func NewRabbitMQ ¶
func (*RabbitMQ) ExchangeDeclare ¶
func (*RabbitMQ) PublishToExchange ¶
func (*RabbitMQ) QueueBindExchange ¶
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func NewRedisClient(redisURL string) (*RedisClient, error)
func (*RedisClient) ClearDB ¶
func (red *RedisClient) ClearDB() error
func (*RedisClient) Close ¶
func (red *RedisClient) Close()
func (*RedisClient) DecreaseBy ¶
func (red *RedisClient) DecreaseBy(key string, num uint) (int, error)
func (*RedisClient) DeleteValue ¶
func (red *RedisClient) DeleteValue(key string) error
func (*RedisClient) GetValueBytes ¶
func (red *RedisClient) GetValueBytes(key string) ([]byte, error)
func (*RedisClient) IncreaseBy ¶
func (red *RedisClient) IncreaseBy(key string, num uint) (int, error)
func (*RedisClient) IsError ¶
func (red *RedisClient) IsError(err error) bool
func (*RedisClient) IsExist ¶
func (red *RedisClient) IsExist(err error) bool
func (*RedisClient) SetValueBytes ¶
func (red *RedisClient) SetValueBytes(key string, value []byte) error
func (*RedisClient) SetValueBytesExpire ¶
func (red *RedisClient) SetValueBytesExpire(key string, value []byte, exp int) error
func (*RedisClient) SetValueExpire ¶
func (red *RedisClient) SetValueExpire(key string, value string, exp int) error
type RedisPool ¶
func NewRedisPool ¶
func (*RedisPool) NewBloomFilter ¶ added in v1.0.4
func (red *RedisPool) NewBloomFilter(name string) *BloomFilter
func (*RedisPool) NewRedisClient ¶
func (red *RedisPool) NewRedisClient() *RedisClient
Source Files ¶
Click to show internal directories.
Click to hide internal directories.