Documentation
¶
Index ¶
- func PairConsole(ctx context.Context, sessionPath, qrPNG string, logger zerolog.Logger) error
- func ProductionLogger(logger zerolog.Logger) zerolog.Logger
- type IngestFunc
- type Manager
- func (m *Manager) BeginGooglePair(cookieInput string) (string, string, error)
- func (m *Manager) BeginPair() (string, error)
- func (m *Manager) ReauthenticateGoogle(cookieInput string) error
- func (m *Manager) Reconnect() error
- func (m *Manager) RefreshPair() (string, error)
- func (m *Manager) Start(parent context.Context)
- func (m *Manager) Status() Status
- func (m *Manager) Stop()
- func (m *Manager) Unpair() error
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PairConsole ¶
PairConsole performs the explicit operator QR flow. QR tokens are refreshed every 25 seconds because the Messages Web pairing token is short-lived.
func ProductionLogger ¶
ProductionLogger suppresses Trace/Debug output before a logger is handed to libgm. Upstream uses those levels for encoded HTTP/protobuf response bodies, which can contain private Google Messages data and must not be retained in production logs. Info and above keep lifecycle and actionable failures visible.
Types ¶
type IngestFunc ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) BeginGooglePair ¶
func (*Manager) BeginPair ¶
BeginPair starts the legacy QR flow. Google-account/emoji pairing is preferred.
func (*Manager) ReauthenticateGoogle ¶
ReauthenticateGoogle replaces only the Google browser authentication on an existing Gaia pairing. The phone pairing, crypto keys and relay identity are preserved. Fresh cookies are committed only after Google confirms that they belong to the same account that originally paired the phone.
func (*Manager) RefreshPair ¶
type Status ¶
type Status struct {
Enabled bool `json:"enabled"`
State string `json:"state"`
Paired bool `json:"paired"`
Connected bool `json:"connected"`
PhoneResponsive bool `json:"phoneResponsive"`
PairingMethod string `json:"pairingMethod,omitempty"`
PairingEmoji string `json:"pairingEmoji,omitempty"`
AccountEmail string `json:"accountEmail,omitempty"`
LastConnectedAt *time.Time `json:"lastConnectedAt,omitempty"`
LastMessageAt *time.Time `json:"lastMessageAt,omitempty"`
LastError string `json:"lastError,omitempty"`
}