search

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2017 License: MIT Imports: 12 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizedQuery

func AuthorizedQuery(c *gin.Context, pagenum int, authorized bool) (structs.TorrentParam, []models.Torrent, int, error)

AuthorizedQuery return a seach byquery according to the bool. If false, it doesn't look for hidden torrents, else it looks for every torrents

func ByQuery

func ByQuery(c *gin.Context, pagenum int, countAll bool, withUser bool, deleted bool, hidden bool) (structs.TorrentParam, []models.Torrent, int, error)

TODO Clean this up Some fields are postgres specific (countAll, withUser) elasticsearch always provide a count to how many hits ES doesn't store users deleted is unused because es doesn't index deleted torrents

func ByQueryDeleted

func ByQueryDeleted(c *gin.Context, pagenum int) (search structs.TorrentParam, tor []models.Torrent, count int, err error)

ByQueryDeleted : search deleted torrents according to request with user and count

func ByQueryNoCount

func ByQueryNoCount(c *gin.Context, pagenum int) (search structs.TorrentParam, tor []models.Torrent, err error)

ByQueryNoCount : search torrents according to request without user and count

func ByQueryNoHidden

func ByQueryNoHidden(c *gin.Context, pagenum int) (search structs.TorrentParam, tor []models.Torrent, count int, err error)

ByQueryNoHidden : search torrents and filter those hidden

func ByQueryNoUser

func ByQueryNoUser(c *gin.Context, pagenum int) (search structs.TorrentParam, tor []models.Torrent, count int, err error)

ByQueryNoUser : search torrents according to request without user

func ByQueryWithUser

func ByQueryWithUser(c *gin.Context, pagenum int) (search structs.TorrentParam, tor []models.Torrent, count int, err error)

ByQueryWithUser : search torrents according to request with user

func Configure

func Configure(conf *config.SearchConfig) (err error)

Configure : initialize search

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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