upload

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBasicValue

func ExtractBasicValue(c *gin.Context, r *torrentValidator.TorrentRequest) error

ExtractBasicValue : takes an http request and computes all basic fields for this form

func ExtractEditInfo

func ExtractEditInfo(c *gin.Context, r *torrentValidator.TorrentRequest) error

ExtractEditInfo : takes an http request and computes all fields for this form

func ExtractInfo

func ExtractInfo(c *gin.Context, r *torrentValidator.TorrentRequest) error

ExtractInfo : takes an http request and computes all fields for this form

func NewTorrentRequest

func NewTorrentRequest(params ...string) *torrentValidator.TorrentRequest

NewTorrentRequest : creates a new torrent request struc with some default value

func UpdateTorrent

func UpdateTorrent(r *torrentValidator.UpdateRequest, t *models.Torrent, currentUser *models.User) *models.Torrent

UpdateTorrent : Update torrent model rewrite with reflect ?

func UpdateUnscopeTorrent

func UpdateUnscopeTorrent(r *torrentValidator.UpdateRequest, t *models.Torrent, currentUser *models.User) *models.Torrent

UpdateUnscopeTorrent : Update a torrent model without scoping

Types

type APIResultJSON

type APIResultJSON struct {
	Torrents         []models.TorrentJSON `json:"torrents"`
	QueryRecordCount int                  `json:"queryRecordCount"`
	TotalRecordCount int                  `json:"totalRecordCount"`
}

APIResultJSON for torrents in json for api

type TorrentsRequest

type TorrentsRequest struct {
	Query      torrentsQuery `json:"search"`
	Page       int           `json:"page"`
	MaxPerPage int           `json:"limit"`
}

TorrentsRequest struct

func (*TorrentsRequest) ToParams

func (r *TorrentsRequest) ToParams() structs.WhereParams

ToParams : Convert a torrentsrequest to searchparams

Jump to

Keyboard shortcuts

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