Versions in this module Expand all Collapse all v0 v0.1.0 Jul 8, 2026 Changes in this version + const Version + func Ptr[T any](v T) *T + type APIError struct + Body []byte + Method string + StatusCode int + URL string + func (e *APIError) Error() string + func (e *APIError) IsNotFound() bool + type Asset struct + AssetID string + Duration int + EndDate time.Time + IsActive bool + IsEnabled bool + IsProcessing bool + Mimetype string + Name string + NoCache bool + PlayOrder int + SkipAssetCheck bool + StartDate time.Time + URI string + type AssetContent struct + Content string + Filename string + Mimetype string + Type string + URL string + type Client struct + func New(baseURL string, opts ...Option) (*Client, error) + func (c *Client) Backup(ctx context.Context) (string, error) + func (c *Client) ControlPlayback(ctx context.Context, command PlaybackCommand) error + func (c *Client) CreateAsset(ctx context.Context, req CreateAssetRequest) (*Asset, error) + func (c *Client) DeleteAsset(ctx context.Context, assetID string) error + func (c *Client) GetAsset(ctx context.Context, assetID string) (*Asset, error) + func (c *Client) GetAssetContent(ctx context.Context, assetID string) (*AssetContent, error) + func (c *Client) GetDeviceSettings(ctx context.Context) (*DeviceSettings, error) + func (c *Client) GetInfo(ctx context.Context) (*Info, error) + func (c *Client) GetIntegrations(ctx context.Context) (*Integrations, error) + func (c *Client) ListAssets(ctx context.Context) ([]Asset, error) + func (c *Client) Reboot(ctx context.Context) error + func (c *Client) Recover(ctx context.Context, r io.Reader, filename string, size int64) error + func (c *Client) ReplaceAsset(ctx context.Context, assetID string, req CreateAssetRequest) (*Asset, error) + func (c *Client) SetPlaylistOrder(ctx context.Context, assetIDs []string) error + func (c *Client) Shutdown(ctx context.Context) error + func (c *Client) UpdateAsset(ctx context.Context, assetID string, req UpdateAssetRequest) (*Asset, error) + func (c *Client) UpdateDeviceSettings(ctx context.Context, req UpdateDeviceSettingsRequest) error + func (c *Client) UploadFile(ctx context.Context, path string, opts ...UploadOption) (*FileUpload, error) + func (c *Client) UploadFileReader(ctx context.Context, r io.Reader, filename string, size int64, ...) (*FileUpload, error) + type CreateAssetRequest struct + Duration int + EndDate time.Time + Ext string + IsEnabled bool + IsProcessing *bool + Mimetype string + Name string + NoCache *bool + PlayOrder *int + SkipAssetCheck *bool + StartDate time.Time + URI string + type DeviceSettings struct + AudioOutput string + AuthBackend string + DateFormat string + DebugLogging bool + DefaultAssets bool + DefaultDuration int + DefaultStreamingDuration int + PlayerName string + ShowSplash bool + ShufflePlaylist bool + Use24HourClock bool + Username string + type FileUpload struct + Ext string + URI string + type Info struct + AnthiasVersion string + DeviceModel string + DisplayPower *string + FreeSpace string + HostUser string + IPAddresses []string + Loadavg float64 + MACAddress string + Memory Memory + UpToDate bool + Uptime Uptime + Viewlog string + type Integrations struct + BalenaAppID *string + BalenaAppName *string + BalenaDeviceID *string + BalenaDeviceNameAtInit *string + BalenaHostOSVersion *string + BalenaSupervisorVersion *string + IsBalena bool + type Memory struct + Available int + Buff int + Free int + Shared int + Total int + Used int + type Option func(*Client) + func WithBasicAuth(username, password string) Option + func WithHTTPClient(hc *http.Client) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(ua string) Option + type PlaybackCommand string + const PlaybackNext + const PlaybackPrevious + func PlaybackAsset(assetID string) PlaybackCommand + type UpdateAssetRequest struct + Duration *int + EndDate *time.Time + IsEnabled *bool + IsProcessing *bool + Mimetype *string + Name *string + NoCache *bool + SkipAssetCheck *bool + StartDate *time.Time + URI *string + type UpdateDeviceSettingsRequest struct + AudioOutput *string + AuthBackend *string + CurrentPassword *string + DateFormat *string + DebugLogging *bool + DefaultAssets *bool + DefaultDuration *int + DefaultStreamingDuration *int + Password *string + Password2 *string + PlayerName *string + ShowSplash *bool + ShufflePlaylist *bool + Use24HourClock *bool + Username *string + type UploadOption func(*uploadOptions) + func WithProgress(fn UploadProgress) UploadOption + type UploadProgress func(sent, total int64) + type Uptime struct + Days int + Hours float64