arrclient

package
v0.0.0-...-087bd63 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRequest

func DoRequest[V any](req *http.Request) (*V, error)

Types

type ApiVersionResponse

type ApiVersionResponse struct {
	Current string `json:"current"`
}

type Client

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

func NewClient

func NewClient(Address, ApiKey string) *Client

func (*Client) AddDownloader

func (c *Client) AddDownloader(downloader *DownloadClient) (*DownloadClient, error)

func (*Client) ApiRequest

func (c *Client) ApiRequest(method, endpoint string, body io.Reader) (*http.Request, error)

func (*Client) DeleteDownloader

func (c *Client) DeleteDownloader(id int) error

func (*Client) GetDownloaders

func (c *Client) GetDownloaders() (*[]DownloadClient, error)

func (*Client) UpdateDownloader

func (c *Client) UpdateDownloader(downloader *DownloadClient) (*DownloadClient, error)

type DownloadClient

type DownloadClient struct {
	Id             int                   `json:"id,omitempty"`
	Name           string                `json:"name"`
	Implementation string                `json:"implementation"`
	ConfigContract string                `json:"configContract"`
	Protocol       string                `json:"protocol"`
	Fields         []DownloadClientField `json:"fields"`
	Enable         bool                  `json:"enable"`
}

func (*DownloadClient) Equals

func (a *DownloadClient) Equals(b *DownloadClient) bool

type DownloadClientField

type DownloadClientField struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value,omitempty"`
}

func NewDownloadClientField

func NewDownloadClientField(name string, value interface{}) DownloadClientField

Jump to

Keyboard shortcuts

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