Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrApiKey = errors.New("incorrect api key")
View Source
var ErrCategory = errors.New("this category doesn't exist")
View Source
var ErrHash = errors.New("incorrect hash")
View Source
var ErrMagnet = errors.New("incorrect magnet")
View Source
var ErrRights = errors.New("not enough rights for this request")
View Source
var ErrShortName = errors.New("file name should be at least 100 characters long")
View Source
var ErrSubCategory = errors.New("this sub category doesn't exist")
View Source
var ErrTorrentId = errors.New("torrent with requested id doesn't exist")
Functions ¶
This section is empty.
Types ¶
type TorrentRequest ¶
type TorrentRequest struct { Name string `json:"name"` Category int `json:"category"` SubCategory int `json:"sub_category"` Magnet string `json:"magnet"` Hash string `json:"hash"` Description string `json:"description"` }
accept torrent files?
func (*TorrentRequest) ValidateMultipartUpload ¶
func (*TorrentRequest) ValidateUpdate ¶
func (r *TorrentRequest) ValidateUpdate() (err error, code int)
func (*TorrentRequest) ValidateUpload ¶
func (r *TorrentRequest) ValidateUpload() (err error, code int)
type TorrentsRequest ¶
type TorrentsRequest struct { Query torrentsQuery `json:"search"` Page int `json:"page"` MaxPerPage int `json:"limit"` }
func (*TorrentsRequest) ToParams ¶
func (r *TorrentsRequest) ToParams() serviceBase.WhereParams
type UpdateRequest ¶
type UpdateRequest struct { ID int `json:"id"` Update TorrentRequest `json:"update"` }
func (*UpdateRequest) UpdateTorrent ¶
func (r *UpdateRequest) UpdateTorrent(t *model.Torrent)
rewrite with reflect ?
Click to show internal directories.
Click to hide internal directories.