transmission

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ContentType = "text/json; encoding=UTF-8"

ContentType is the content type for responses

View Source
const RPCPath = "/transmission/rpc"

RPCPath is the url path for rpc

View Source
const Success = "success"

Success indicates result of success

View Source
const XSRFToken = "X-Transmission-Session-Id"

XSRFToken is the header name for the XSRF token

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(sw *swarm.Swarm) http.Handler

Types

type Args

type Args map[string]interface{}

type Handler

type Handler func(*swarm.Swarm, Args) Response

type Request

type Request struct {
	Method string `json:"method"`
	Args   Args   `json:"arguments"`
	Tag    Tag    `json:"tag"`
}

type Response

type Response struct {
	Result string `json:"result"`
	Args   Args   `json:"arguments"`
	Tag    Tag    `json:"tag"`
}

func NotImplemented

func NotImplemented(sw *swarm.Swarm, args Args) (resp Response)

func TorrentGet

func TorrentGet(sw *swarm.Swarm, args Args) (resp Response)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Error

func (s *Server) Error(w http.ResponseWriter, err error, tag Tag)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Tag

type Tag int64

type TorrentFields

type TorrentFields []string

type TorrentID

type TorrentID int64

type TorrentIDArray

type TorrentIDArray []TorrentID

Jump to

Keyboard shortcuts

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