Versions in this module Expand all Collapse all v1 v1.0.0 Jun 6, 2025 v0 v0.0.7 Jun 6, 2025 v0.0.6 Sep 2, 2024 v0.0.5 Sep 2, 2024 v0.0.4 Jun 4, 2023 v0.0.3 Jun 2, 2023 v0.0.2 Jun 2, 2023 v0.0.1 Jun 2, 2023 Changes in this version + var AuthPayloadKey = struct{} + var ErrAuthenticationNeeded = errors.New("authentication needed") + func AsErr(parent error, withErrorReason interface{}) (err error) + func Ensure(parent error, prepend string, response statusCoder, code int) error + func NewAuthenticateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) + func NewAuthenticateRequestWithFormdataBody(server string, body AuthenticateFormdataRequestBody) (*http.Request, error) + func NewGetDevicesRequest(server string, monitorId int, params *GetDevicesParams) (*http.Request, error) + func NewGetEnvironmentsRequest(server string) (*http.Request, error) + func NewRenewAuthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) + func NewRenewAuthTokenRequestWithFormdataBody(server string, body RenewAuthTokenFormdataRequestBody) (*http.Request, error) + type AuthenticateFormdataBody struct + Email *string + MfaToken *string + Password *string + Totp *string + type AuthenticateFormdataRequestBody AuthenticateFormdataBody + type AuthenticateResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 *Hello + JSON401 ... + JSONDefault *Error + func ParseAuthenticateResponse(rsp *http.Response) (*AuthenticateResponse, error) + func (r AuthenticateResponse) Status() string + func (r AuthenticateResponse) StatusCode() int + type Client struct + Client HttpRequestDoer + RequestEditors []RequestEditorFn + Server string + func NewClient(server string, opts ...ClientOption) (*Client, error) + func (c *Client) AuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error) + func (c *Client) AuthenticateWithFormdataBody(ctx context.Context, body AuthenticateFormdataRequestBody, ...) (*http.Response, error) + func (c *Client) GetDevices(ctx context.Context, monitorId int, params *GetDevicesParams, ...) (*http.Response, error) + func (c *Client) GetEnvironments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + func (c *Client) RenewAuthTokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error) + func (c *Client) RenewAuthTokenWithFormdataBody(ctx context.Context, body RenewAuthTokenFormdataRequestBody, ...) (*http.Response, error) + type ClientInterface interface + AuthenticateWithBody func(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error) + AuthenticateWithFormdataBody func(ctx context.Context, body AuthenticateFormdataRequestBody, ...) (*http.Response, error) + GetDevices func(ctx context.Context, monitorId int, params *GetDevicesParams, ...) (*http.Response, error) + GetEnvironments func(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + RenewAuthTokenWithBody func(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error) + RenewAuthTokenWithFormdataBody func(ctx context.Context, body RenewAuthTokenFormdataRequestBody, ...) (*http.Response, error) + type ClientOption func(*Client) error + func WithBaseURL(baseURL string) ClientOption + func WithHTTPClient(doer HttpRequestDoer) ClientOption + func WithRequestEditorFn(fn RequestEditorFn) ClientOption + type ClientWithResponses struct + func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) + func (c *ClientWithResponses) AuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AuthenticateResponse, error) + func (c *ClientWithResponses) AuthenticateWithFormdataBodyWithResponse(ctx context.Context, body AuthenticateFormdataRequestBody, ...) (*AuthenticateResponse, error) + func (c *ClientWithResponses) GetDevicesWithResponse(ctx context.Context, monitorId int, params *GetDevicesParams, ...) (*GetDevicesResponse, error) + func (c *ClientWithResponses) GetEnvironmentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvironmentsResponse, error) + func (c *ClientWithResponses) RenewAuthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RenewAuthTokenResponse, error) + func (c *ClientWithResponses) RenewAuthTokenWithFormdataBodyWithResponse(ctx context.Context, body RenewAuthTokenFormdataRequestBody, ...) (*RenewAuthTokenResponse, error) + type ClientWithResponsesInterface interface + AuthenticateWithBodyWithResponse func(ctx context.Context, contentType string, body io.Reader, ...) (*AuthenticateResponse, error) + AuthenticateWithFormdataBodyWithResponse func(ctx context.Context, body AuthenticateFormdataRequestBody, ...) (*AuthenticateResponse, error) + GetDevicesWithResponse func(ctx context.Context, monitorId int, params *GetDevicesParams, ...) (*GetDevicesResponse, error) + GetEnvironmentsWithResponse func(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvironmentsResponse, error) + RenewAuthTokenWithBodyWithResponse func(ctx context.Context, contentType string, body io.Reader, ...) (*RenewAuthTokenResponse, error) + RenewAuthTokenWithFormdataBodyWithResponse func(ctx context.Context, body RenewAuthTokenFormdataRequestBody, ...) (*RenewAuthTokenResponse, error) + type Device struct + Icon *string + Id *string + Location *string + Make *string + Model *string + Name *string + Tags *DeviceTags + type DeviceTags map[string]interface + type Error struct + ErrorReason *string + Status *string + type GetDevicesParams struct + IncludeMerged *bool + type GetDevicesResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 ... + func ParseGetDevicesResponse(rsp *http.Response) (*GetDevicesResponse, error) + func (r GetDevicesResponse) Status() string + func (r GetDevicesResponse) StatusCode() int + type GetEnvironmentsResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 ... + JSONDefault *Error + func ParseGetEnvironmentsResponse(rsp *http.Response) (*GetEnvironmentsResponse, error) + func (r GetEnvironmentsResponse) Status() string + func (r GetEnvironmentsResponse) StatusCode() int + type Hello struct + AbCohort *string + AccessToken *string + AccountId *int + Authorized *bool + BridgeServer *string + DateCreated *time.Time + Monitors *[]Monitor + RefreshToken *string + Settings *UserSettings + TotpEnabled *bool + UserId *int + type HttpRequestDoer interface + Do func(req *http.Request) (*http.Response, error) + type Monitor struct + Attributes *MonitorAttributes + AuxIgnore *bool + AuxPort *string + DataSharing *[]interface{} + EthernetSupported *bool + HardwareType *string + Id *int + Online *bool + SerialNumber *string + SignalCheckCompletedTime *time.Time + SolarConfigured *bool + SolarConnected *bool + TimeZone *string + ZigbeeSupported *bool + type MonitorAttributes struct + BasementType *string + BasementTypeKey *interface{} + Cost *float32 + CycleStart *interface{} + ElectricityCost *interface{} + HomeSizeType *string + HomeSizeTypeKey *interface{} + HomeType *string + HomeTypeKey *interface{} + Id *int + Name *interface{} + NumberOfOccupants *string + OccupancyType *string + OccupancyTypeKey *interface{} + Panel *interface{} + PostalCode *string + PowerRegion *string + SellBackRate *float32 + ShowCost *bool + SolarTouEnabled *bool + State *interface{} + ToGridThreshold *interface{} + TouEnabled *bool + UserSetCost *bool + UserSetSellBackRate *bool + YearBuiltType *string + YearBuiltTypeKey *interface{} + type NotificationSettings struct + AlwaysOnChangePush *bool + ComparisonChangePush *bool + DailyChangePush *bool + GeneratorOffPush *bool + GeneratorOnPush *bool + GridOutagePush *bool + GridRestoredPush *bool + MonitorMonthlyEmail *bool + MonitorOfflineEmail *bool + MonitorOfflinePush *bool + MonthlyChangePush *bool + NewNamedDeviceEmail *bool + NewNamedDevicePush *bool + NewPeakEmail *bool + NewPeakPush *bool + RelayUpdateAvailablePush *bool + RelayUpdateInstalledPush *bool + TimeOfUse *bool + WeeklyChangePush *bool + type RenewAuthTokenFormdataBody struct + IsAccessToken *bool + RefreshToken *string + UserId *int + type RenewAuthTokenFormdataRequestBody RenewAuthTokenFormdataBody + type RenewAuthTokenResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 ... + JSONDefault *Error + func ParseRenewAuthTokenResponse(rsp *http.Response) (*RenewAuthTokenResponse, error) + func (r RenewAuthTokenResponse) Status() string + func (r RenewAuthTokenResponse) StatusCode() int + type RequestEditorFn func(ctx context.Context, req *http.Request) error + type UserSettings struct + Settings ... + UserId *int + Version *int