hub

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupFile

type BackupFile struct {
	Name string
	Size int
}

type Client

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

func NewClient

func NewClient(log logr.Logger, httpClient *http.Client, baseURL *url.URL) *Client

func (*Client) BaseURL

func (c *Client) BaseURL() *url.URL

func (*Client) CloudCheckForUpdate added in v0.2.0

func (c *Client) CloudCheckForUpdate(ctx context.Context) (CloudUpdate, error)

func (*Client) CloudCheckUpdateStatus added in v0.2.0

func (c *Client) CloudCheckUpdateStatus(ctx context.Context) (CloudUpdateStatus, error)

func (*Client) CloudUpdatePlatform added in v0.2.0

func (c *Client) CloudUpdatePlatform(ctx context.Context) error

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) DownloadBackupFile

func (c *Client) DownloadBackupFile(ctx context.Context, name string) (BackupFile, io.ReadCloser, error)

func (*Client) HubID added in v0.2.0

func (c *Client) HubID(ctx context.Context) (string, error)

func (*Client) HubStatus added in v0.2.0

func (c *Client) HubStatus(ctx context.Context) (HubStatus, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context, username, password string) error

func (*Client) Reboot

func (c *Client) Reboot(ctx context.Context) error

func (*Client) UpdateAdvancedCertificates

func (c *Client) UpdateAdvancedCertificates(ctx context.Context, certificate, privateKey []byte) error

type CloudUpdate added in v0.2.0

type CloudUpdate struct {
	ReleaseNotesContent string

	// UPDATE_AVAILABLE
	Status  string
	Upgrade bool
	Version string
}

type CloudUpdateStatus added in v0.2.0

type CloudUpdateStatus struct {
	// IDLE, DOWNLOAD_IN_PROGRESS, DOWNLOAD_VERIFY, EXTRACT_IN_PROGRESS
	Status  string `json:"status"`
	Percent int    `json:"percent"`
}

type HubStatus added in v0.2.0

type HubStatus struct {
	Status               string `json:"status"`
	ServerInitPercentage string `json:"serverInitPercentage"`
	ServerInitDetails    string `json:"serverInitDetails"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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