Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error" example:"Houston, we have a problem!"`
}
func NewErrorResponse ¶
func NewErrorResponse(err interface{}) *ErrorResponse
type FileInfoResponse ¶
type FileInfoResponse struct { *bittorrent.FileInfo Status *bittorrent.FileStatus `json:"status,omitempty"` }
type MessageResponse ¶
type MessageResponse struct {
Message string `json:"message" example:"done"`
}
func NewMessageResponse ¶
func NewMessageResponse(format string, a ...interface{}) *MessageResponse
type NewTorrentResponse ¶
type NewTorrentResponse struct {
InfoHash string `json:"info_hash" example:"000102030405060708090a0b0c0d0e0f10111213"`
}
type TorrentInfoResponse ¶
type TorrentInfoResponse struct { *bittorrent.TorrentInfo Status *bittorrent.TorrentStatus `json:"status,omitempty"` }
Click to show internal directories.
Click to hide internal directories.