client

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// RemoteHost is the URL of the remote server that this Client should
	// access.
	RemoteHost string
	// Debug enables debug on Resty client
	Debug bool
	// Resty
	Resty *resty.Client

	// Services corresponding to the different endpoints (groups/routes)
	Metube       *MetubeService
	Nzbs         *NzbsService
	Qbittorrents *QbittorrentsService
}

Client is used to access Pace services.

func New

func New(remoteHost string) *Client

New makes a new Client.

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

Set the debug flag

type Combined

type Combined struct {
	Torrents  []*qbt.Torrent `bson:"torrents" json:"torrents"`
	Nzbs      []nzbget.Group `bson:"nzbs" json:"nzbs"`
	NzbStatus *nzbget.Status `bson:"nzb_status" json:"nzb_status"`
	Metrics   *Metrics       `bson:"metrics" json:"metrics"`
}

type Metrics

type Metrics struct {
	Diskspace string `bson:"diskspace" json:"diskspace"`
	Torrents  struct {
		DownloadRate string `json:"download_rate"`
		UploadRate   string `json:"upload_rate"`
	} `bson:"torrents" json:"torrents"`
	Nzbs struct {
		DownloadRate string `json:"download_rate"`
	} `bson:"nzbs" json:"nzbs"`
}

type MetubeAddRequest

type MetubeAddRequest struct {
	URL       string `json:"url"`
	Name      string `json:"name"`
	AutoStart bool   `json:"auto_start"`
}

type MetubeIndexResponse

type MetubeIndexResponse struct {
	*Response
	Result *metube.HistoryResponse `json:"result"`
	Total  int64                   `json:"total"`
}

type MetubeRemoveRequest

type MetubeRemoveRequest struct {
	Name  string `json:"name"`
	Where string `json:"where"`
}

type MetubeService

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

func NewMetubeService

func NewMetubeService(client *Client) *MetubeService

NewMetube makes a new client for accessing Metube services.

func (*MetubeService) Add

func (*MetubeService) Index

func (*MetubeService) Remove

type NzbsAddRequest

type NzbsAddRequest struct {
	URL      string `json:"url"`
	Category string `json:"category"`
	Name     string `json:"name"`
}

type NzbsAddResponse added in v0.10.2

type NzbsAddResponse struct {
	*Response
	Result int64 `json:"result"`
}

type NzbsDestroyRequest

type NzbsDestroyRequest struct {
	ID int `json:"id"`
}

type NzbsHistoryRequest

type NzbsHistoryRequest struct {
	Hidden bool `json:"hidden"`
}

type NzbsIndexResponse added in v0.10.2

type NzbsIndexResponse struct {
	*Response
	Result *nzbget.GroupResponse `json:"result"`
	Total  int64                 `json:"total"`
}

type NzbsPauseRequest

type NzbsPauseRequest struct {
	ID int `json:"id"`
}

type NzbsRemoveRequest

type NzbsRemoveRequest struct {
	ID int `json:"id"`
}

type NzbsResumeRequest

type NzbsResumeRequest struct {
	ID int `json:"id"`
}

type NzbsService

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

func NewNzbsService

func NewNzbsService(client *Client) *NzbsService

NewNzbs makes a new client for accessing Nzbs services.

func (*NzbsService) Add

func (*NzbsService) Destroy

func (s *NzbsService) Destroy(ctx context.Context, req *NzbsDestroyRequest) (*Response, error)

func (*NzbsService) History

func (s *NzbsService) History(ctx context.Context, req *NzbsHistoryRequest) (*Response, error)

func (*NzbsService) Index

func (*NzbsService) Pause

func (s *NzbsService) Pause(ctx context.Context, req *NzbsPauseRequest) (*Response, error)

func (*NzbsService) Remove

func (s *NzbsService) Remove(ctx context.Context, req *NzbsRemoveRequest) (*Response, error)

func (*NzbsService) Resume

func (s *NzbsService) Resume(ctx context.Context, req *NzbsResumeRequest) (*Response, error)

type QbittorrentsAddRequest

type QbittorrentsAddRequest struct {
	URL string `json:"url"`
}

type QbittorrentsAddResponse added in v0.10.2

type QbittorrentsAddResponse struct {
	*Response
	Result string `json:"result"`
}

type QbittorrentsIndexResponse added in v0.10.2

type QbittorrentsIndexResponse struct {
	*Response
	Result *qbt.Response `json:"result"`
	Total  int64         `json:"total"`
}

type QbittorrentsLabelRequest

type QbittorrentsLabelRequest struct {
	Infohash string `json:"infohash"`
	Label    string `json:"label"`
}

type QbittorrentsPauseRequest

type QbittorrentsPauseRequest struct {
	Infohash string `json:"infohash"`
}

type QbittorrentsRemoveRequest

type QbittorrentsRemoveRequest struct {
	Infohash string `json:"infohash"`
	Del      bool   `json:"del"`
}

type QbittorrentsResumeRequest

type QbittorrentsResumeRequest struct {
	Infohash string `json:"infohash"`
}

type QbittorrentsService

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

func NewQbittorrentsService

func NewQbittorrentsService(client *Client) *QbittorrentsService

NewQbittorrents makes a new client for accessing Qbittorrents services.

func (*QbittorrentsService) Add

func (*QbittorrentsService) Index

func (*QbittorrentsService) Label

func (*QbittorrentsService) Pause

func (*QbittorrentsService) Remove

func (*QbittorrentsService) Resume

func (*QbittorrentsService) Want

func (*QbittorrentsService) Wanted

type QbittorrentsWantRequest

type QbittorrentsWantRequest struct {
	Infohash string `json:"infohash"`
	Files    string `json:"files"`
}

type QbittorrentsWantedRequest

type QbittorrentsWantedRequest struct {
	Infohash string `json:"infohash"`
}

type Response

type Response struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
}

type Setting

type Setting struct {
	Name  string `json:"name"`
	Value bool   `json:"value"`
}

type SettingsBatch

type SettingsBatch struct {
	IDs   []string `json:"ids"`
	Name  string   `json:"name"`
	Value bool     `json:"value"`
}

Jump to

Keyboard shortcuts

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