service

package
v0.0.0-...-5b3ac6b Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RedisClient *redis.Client
)

Functions

func AddDocument

func AddDocument(index string, data interface{}) error

func GetAll

func GetAll() (meilisearch.DocumentsResult, error)

func InitAmqp

func InitAmqp()

func InitMelliClient

func InitMelliClient()

func InitRedisClient

func InitRedisClient()

func MultiSearch

example

[]meilisearch.SearchRequest{
	{
		IndexUID: "movies",
		Query:    "pooh",
		Limit:    5,
	},
	{
		IndexUID: "movies",
		Query:    "nemo",
		Limit:    5,
	},
	{
		IndexUID: "movie_ratings",
		Query:    "us",
	},
},

func ProduceMessage

func ProduceMessage(exchange, key, mime string, body interface{})

func PublishMessage

func PublishMessage(ch *amqp.Channel, message QueueMessage) error

func PublishTopic

func PublishTopic(topic string, payload interface{}) error
func Search(index string, query string, SearchRequest meilisearch.SearchRequest) (*meilisearch.SearchResponse, error)

Types

type QueueMessage

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

Jump to

Keyboard shortcuts

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