elasticsearch

package
v0.0.0-...-694896c Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: GPL-2.0, GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(instance *gorm.DB, client *elastic.Client)

Migrate gets all animes from mysql database and add them to elasticsearch.

func NewClient

func NewClient(url, username, password string) (client *elastic.Client, err error)

NewClient creates a new client to the variable Client.

Types

type ElasticAnime

type ElasticAnime struct {
	Title    string `json:"title"`
	AltTitle string `json:"alt_title"`
	Season   int    `json:"season"`
	Ongoing  int    `json:"ongoing"`
	Slug     string `json:"slug"`
	SlugID   uint   `json:"slug_id"`
	HbID     int    `json:"hb_id"`
	MalID    int    `json:"mal_id"`
}

type Transport

type Transport struct {
	Username string
	Password string
}

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implementation used to login.

Jump to

Keyboard shortcuts

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