Documentation ¶
Overview ¶
Package rc implements a remote control server and registry for rclone
To register your internal calls, call rc.Add(path, function). Your function should take ane return a Param. It can also return an error. Use rc.NewError to wrap an existing error along with an http response type if another response other than 500 internal error is required on error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOpt = Options{ HTTPOptions: httplib.DefaultOpt, Enabled: false, }
DefaultOpt is the default values used for Options
Functions ¶
Types ¶
type Call ¶
type Call struct { Path string // path to activate this RC Fn Func `json:"-"` // function to call Title string // help for the function Help string // multi-line markdown formatted help }
Call defines info about a remote control function and is used in the Add function to create new entry points.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the list of all the registered remote control functions
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry makes a new registry for remote control functions
Click to show internal directories.
Click to hide internal directories.