Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedAuthentication = errors.New("failed to log in")
Functions ¶
func DefaultTransport ¶
func DefaultTransport() http.RoundTripper
DefaultTransport for HTTP requests to the LB112X API. Useful for wrapping the transport from outside the library.
Types ¶
type APIModel ¶
type APIModel struct { General GeneralInfo `json:"general"` Power PowerInfo `json:"power"` Session SessionInfo `json:"session"` WWAN WWANInfo `json:"wwan"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for communicating with the LB112X API.
func (*Client) Authenticate ¶
Authenticate with the API.
func (*Client) GetSession ¶
func (c *Client) GetSession(ctx context.Context) (*SessionInfo, error)
GetSession information from the LB112X API.
type GeneralInfo ¶
type GeneralInfo struct { Model string `json:"model"` VersionMajor int `json:"verMajor"` VersionMinor int `json:"verMinor"` HardwareVersion string `json:"HWversion"` FirmwareVersion string `json:"FWversion"` AppVersion string `json:"appVersion"` WebAppVersion string `json:"webAppVersion"` APIVersion string `json:"apiVersion"` BootloaderVersion string `json:"BLversion"` IMEI string `json:"IMEI"` Temperature int `json:"devTemperature"` }
type Option ¶
type Option func(*initOptions)
Option for the creation of the LB112X API Client.
func WithClientTimeout ¶
WithClientTimeout while connecting to the LB112X API.
func WithCookieJar ¶
WithCookieJar for use by the HTTP client communicating with the LB112X API.
func WithRoundTripper ¶
func WithRoundTripper(rt http.RoundTripper) Option
WithRoundTripper for HTTP requests to the LB112X API.
type SessionInfo ¶
type SignalStrenthInfo ¶
Click to show internal directories.
Click to hide internal directories.