messagixplus

package module
v0.0.0-...-45f30f0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 40 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Messagix

Messagix is a easy-to-use Go library for interacting with facebooks/metas lightspeed API.

  • Login
    • Email
    • TOTP
    • Captcha
    • Phone
  • Fetch contact information
  • Typing Notifications
  • Fetch Messages (with message history support!)
  • Send Messages
    • Videos
    • External Media
    • Images
    • Replies
    • Forwarding
    • Stickers/Decals
  • Send Reactions
    • Remove
    • Update
    • New
  • Appstate
    • Online
    • Offline

Installation

Use the package manager to install messagix.

go get github.com/MickielAraya/messagix-plus

Documentation

Index

Constants

View Source
const (
	BaseURL       = "https://api.capsolver.com"
	CreateTaskURL = BaseURL + "/createTask"
	GetResultURL  = BaseURL + "/getTaskResult"
	GetBalanceURL = BaseURL + "/getBalance"
	FeedbackURL   = BaseURL + "/feedbackTask"

	MaxRetries   = 120
	PollInterval = 3 * time.Second
	TaskTimeout  = 5 * time.Minute
)

Variables

View Source
var (
	ErrSocketClosed      = errors.New("messagix-socket: socket is closed")
	ErrSocketAlreadyOpen = errors.New("messagix-socket: socket is already open")
	ErrNotAuthenticated  = errors.New("messagix-socket: client has not been authenticated successfully yet")
)
View Source
var ErrRedirectAttempted = errors.New("redirect attempted")
View Source
var GraphQLData = &graphql.GraphQLTable{}
View Source
var USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
View Source
var VersionId int64

Functions

func WithInvisible

func WithInvisible(invisible bool) func(*ReCaptchaV2Task)

func WithPageAction

func WithPageAction(action string) func(*ReCaptchaV2Task)

func WithProxy

func WithProxy(proxy string) func(*ReCaptchaV2Task)

func WithUserAgent

func WithUserAgent(userAgent string) func(*ReCaptchaV2Task)

Types

type Account

type Account struct {
	Username   string
	Password   string
	TotpSecret string

	CapSolverKey string
	// contains filtered or unexported fields
}

func (*Account) GetContacts

func (a *Account) GetContacts(limit int64) ([]table.LSVerifyContactRowExists, error)

func (*Account) GetContactsFull

func (a *Account) GetContactsFull(contactIds []int64) ([]table.LSDeleteThenInsertContact, error)

func (*Account) ReportAppState

func (a *Account) ReportAppState(state table.AppState) error

type AckEvent

type AckEvent interface {
	GetPacketId() uint16
}

type AppSettingsPublish

type AppSettingsPublish struct {
	LsFdid        string `json:"ls_fdid"`
	SchemaVersion string `json:"ls_sv"`
}

type AttributeMap

type AttributeMap map[string]string

type BalanceRequest

type BalanceRequest struct {
	ClientKey string `json:"clientKey"`
}

type BalanceResponse

type BalanceResponse struct {
	ErrorID          int           `json:"errorId"`
	ErrorCode        string        `json:"errorCode"`
	ErrorDescription string        `json:"errorDescription"`
	Balance          float64       `json:"balance"`
	Packages         []interface{} `json:"packages"`
}

type BigPipe

type BigPipe struct {
	JSMods *ModuleData `json:"jsmods,omitempty"`
}

type CapSolver

type CapSolver struct {
	ClientKey  string
	AppID      string
	HTTPClient *http.Client
}

func NewCapSolver

func NewCapSolver(clientKey string) *CapSolver

func (*CapSolver) GetBalance

func (c *CapSolver) GetBalance() (*BalanceResponse, error)

func (*CapSolver) SolveReCaptchaV2

func (c *CapSolver) SolveReCaptchaV2(websiteURL, websiteKey string, options ...func(*ReCaptchaV2Task)) (*ReCaptchaV2Solution, error)

type ChannelType

type ChannelType int
const (
	RequestChannel ChannelType = iota
	PacketChannel
)

type Client

type Client struct {
	Account   *Account
	Threads   *Threads
	Messages  *Messages
	Instagram *InstagramMethods
	Facebook  *FacebookMethods
	Logger    zerolog.Logger

	SyncManager *SyncManager

	UserAgent string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(platform types.Platform, cookies cookies.Cookies, proxy string, logger zerolog.Logger) (*Client, error)

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) CurrentPlatform

func (c *Client) CurrentPlatform() string

func (*Client) Disconnect

func (c *Client) Disconnect()

func (*Client) GetCurrentAccount

func (c *Client) GetCurrentAccount() (types.AccountInfo, error)

func (*Client) GetTaskId

func (c *Client) GetTaskId() int

func (*Client) IsAuthenticated

func (c *Client) IsAuthenticated() bool

func (*Client) IsConnected

func (c *Client) IsConnected() bool

func (*Client) MakeRequest

func (c *Client) MakeRequest(url string, method string, headers http.Header, payload []byte, contentType types.ContentType) (*http.Response, []byte, error)

func (*Client) NewConnectRequest

func (c *Client) NewConnectRequest(jsonData string, connectFlags uint8) ([]byte, error)

func (*Client) NewHttpQuery

func (c *Client) NewHttpQuery() *HttpQuery

func (*Client) NewMercuryMediaPayload

func (c *Client) NewMercuryMediaPayload(media *MercuryUploadMedia) ([]byte, string, error)

returns payloadBytes, multipart content-type header

func (*Client) NewPublishRequest

func (c *Client) NewPublishRequest(topic Topic, jsonData string, packetByte byte, packetId uint16) ([]byte, uint16, error)

func (*Client) NewSocketClient

func (c *Client) NewSocketClient() *Socket

func (*Client) NewSubscribeRequest

func (c *Client) NewSubscribeRequest(topic Topic, qos packets.QoS) ([]byte, uint16, error)

func (*Client) NewSyncManager

func (c *Client) NewSyncManager() *SyncManager

func (*Client) NewTaskManager

func (c *Client) NewTaskManager() *TaskManager

func (*Client) SaveSession

func (c *Client) SaveSession(path string) error

func (*Client) SendMercuryUploadRequest

func (c *Client) SendMercuryUploadRequest(medias []*MercuryUploadMedia) ([]*types.MercuryUploadResponse, error)

func (*Client) SetEventHandler

func (c *Client) SetEventHandler(handler EventHandler)

func (*Client) SetProxy

func (c *Client) SetProxy(proxy string) error

type Configs

type Configs struct {
	LsdToken     string
	CometReq     string
	VersionId    int64
	Jazoest      string
	WebSessionId string
	Bitmap       *crypto.Bitmap
	CsrBitmap    *crypto.Bitmap
	// contains filtered or unexported fields
}

func (*Configs) LoadBitmaps

func (c *Configs) LoadBitmaps() (*crypto.Bitmap, *crypto.Bitmap)

(bitmap, csrBitmap)

func (*Configs) ParseFormInputs

func (c *Configs) ParseFormInputs(inputs []InputTag, reflectedMs reflect.Value)

func (*Configs) SetupConfigs

func (c *Configs) SetupConfigs() error

type Connect

type Connect struct {
	AccountId          string `json:"u"`            // account id
	SessionId          int64  `json:"s"`            // randomly generated sessionid
	ClientCapabilities int    `json:"cp"`           // mqttconfig clientCapabilities (3)
	Capabilities       int    `json:"ecp"`          // mqttconfig capabilities (10)
	ChatOn             bool   `json:"chat_on"`      // mqttconfig chatVisibility (true) - not 100% sure
	Fg                 bool   `json:"fg"`           // idk what this is
	Cid                string `json:"d"`            // cid from html content
	ConnectionType     string `json:"ct"`           // connection type? facebook=websocket , insta=cookie_auth
	MqttSid            string `json:"mqtt_sid"`     // ""
	AppId              int64  `json:"aid"`          // mqttconfig appID (219994525426954)
	SubscribedTopics   []any  `json:"st"`           // mqttconfig subscribedTopics ([])
	Pm                 []any  `json:"pm"`           // only seen empty array
	Dc                 string `json:"dc"`           // only seem empty string
	NoAutoFg           bool   `json:"no_auto_fg"`   // only seen true
	Gas                any    `json:"gas"`          // only seen null
	Pack               []any  `json:"pack"`         // only seen empty arr
	HostNameOverride   string `json:"php_override"` // mqttconfig hostNameOverride
	P                  any    `json:"p"`            // only seen null
	UserAgent          string `json:"a"`            // user agent
	Aids               any    `json:"aids"`         // only seen null
}

type ConnectPayload

type ConnectPayload struct {
	ProtocolName  string `lengthType:"uint16"`
	ProtocolLevel uint8
	ConnectFlags  uint8
	KeepAliveTime uint16
	ClientId      string `lengthType:"uint16"`
	JSONData      string `lengthType:"uint16"`
}

func (*ConnectPayload) Write

func (cp *ConnectPayload) Write() ([]byte, error)

type ConnectionCode

type ConnectionCode uint8
const (
	CONNECTION_ACCEPTED ConnectionCode = iota
	CONNECTION_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION
	CONNECTION_REFUSED_IDENTIFIER_REJECTED
	CONNECTION_REFUSED_SERVER_UNAVAILABLE
	CONNECTION_REFUSED_BAD_USERNAME_OR_PASSWORD
	CONNECTION_REFUSED_UNAUTHORIZED
)

func (ConnectionCode) IsEnum

func (c ConnectionCode) IsEnum()

func (ConnectionCode) ToString

func (c ConnectionCode) ToString() string

type CreateTaskRequest

type CreateTaskRequest struct {
	ClientKey   string      `json:"clientKey"`
	AppID       string      `json:"appId,omitempty"`
	Task        interface{} `json:"task"`
	CallbackURL string      `json:"callbackUrl,omitempty"`
}

type CreateTaskResponse

type CreateTaskResponse struct {
	ErrorID          int    `json:"errorId"`
	ErrorCode        string `json:"errorCode"`
	ErrorDescription string `json:"errorDescription"`
	Status           string `json:"status"`
	Solution         string `json:"solution"`
	TaskID           string `json:"taskId"`
}

type EventHandler

type EventHandler func(evt interface{})

type Event_Error

type Event_Error struct {
	Err error
}

Event_Error is emitted whenever the library encounters/receives an error.

These errors can be for example: failed to send data, failed to read response data and so on.

func (*Event_Error) Finish

func (e *Event_Error) Finish() ResponseData

func (*Event_Error) SetIdentifier

func (pb *Event_Error) SetIdentifier(identifier int16)

type Event_PingResp

type Event_PingResp struct{}

func (*Event_PingResp) Finish

func (e *Event_PingResp) Finish() ResponseData

func (*Event_PingResp) SetIdentifier

func (pr *Event_PingResp) SetIdentifier(identifier int16)

type Event_PublishACK

type Event_PublishACK struct {
	PacketId uint16
}

Event_PublishACK is never emitted, it only handles the acknowledgement after a PUBLISH packet has been sent.

func (*Event_PublishACK) Finish

func (pb *Event_PublishACK) Finish() ResponseData

func (*Event_PublishACK) GetPacketId

func (pb *Event_PublishACK) GetPacketId() uint16

func (*Event_PublishACK) SetIdentifier

func (pb *Event_PublishACK) SetIdentifier(identifier int16)

type Event_PublishResponse

type Event_PublishResponse struct {
	Topic             string              `lengthType:"uint16" endian:"big"`
	Data              PublishResponseData `jsonString:"1"`
	Table             table.LSTable
	MessageIdentifier int16
}

Event_PublishResponse is emitted if the packetId/requestId from the websocket is 0 or nil

It will also be used for handling the responses after calling a function like GetContacts through the requestId

func (*Event_PublishResponse) Finish

func (pb *Event_PublishResponse) Finish() ResponseData

func (*Event_PublishResponse) SetIdentifier

func (pb *Event_PublishResponse) SetIdentifier(identifier int16)

type Event_Ready

type Event_Ready struct {
	IsNewSession   bool
	ConnectionCode ConnectionCode
	CurrentUser    types.AccountInfo `skip:"1"`
	Table          *table.LSTable
	// contains filtered or unexported fields
}

Event_Ready represents the CONNACK packet's response.

The library provides the raw parsed data, so handle connection codes as needed for your application.

func (*Event_Ready) Finish

func (e *Event_Ready) Finish() ResponseData

func (*Event_Ready) SetIdentifier

func (pb *Event_Ready) SetIdentifier(identifier int16)

type Event_SocketClosed

type Event_SocketClosed struct {
	Code int
	Text string
}

Event_SocketClosed is emitted whenever the websockets CloseHandler() is called.

This provides great flexability because the user can then decide whether the client should reconnect or not.

func (*Event_SocketClosed) Finish

func (e *Event_SocketClosed) Finish() ResponseData

func (*Event_SocketClosed) SetIdentifier

func (pb *Event_SocketClosed) SetIdentifier(identifier int16)

type Event_SubscribeACK

type Event_SubscribeACK struct {
	PacketId uint16
	QoSLevel uint8 // 0, 1, 2, 128
}

Event_SubscribeACK is never emitted, it only handles the acknowledgement after a SUBSCRIBE packet has been sent.

func (*Event_SubscribeACK) Finish

func (pb *Event_SubscribeACK) Finish() ResponseData

func (*Event_SubscribeACK) GetPacketId

func (pb *Event_SubscribeACK) GetPacketId() uint16

func (*Event_SubscribeACK) SetIdentifier

func (pb *Event_SubscribeACK) SetIdentifier(identifier int16)

type FacebookMethods

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

func (*FacebookMethods) Login

func (fb *FacebookMethods) Login(identifier, password string) (cookies.Cookies, error)

type FormTag

type FormTag struct {
	Attributes AttributeMap
	Inputs     []InputTag
}

type GetTaskResultRequest

type GetTaskResultRequest struct {
	ClientKey string `json:"clientKey"`
	TaskID    string `json:"taskId"`
}

type GetTaskResultResponse

type GetTaskResultResponse struct {
	ErrorID          int         `json:"errorId"`
	ErrorCode        string      `json:"errorCode"`
	ErrorDescription string      `json:"errorDescription"`
	Status           string      `json:"status"`
	Solution         interface{} `json:"solution"`
}

type HttpQuery

type HttpQuery struct {
	AcceptOnlyEssential  string `url:"accept_only_essential,omitempty"`
	Av                   string `url:"av,omitempty"`          // not required
	User                 string `url:"__user,omitempty"`      // not required
	A                    string `url:"__a,omitempty"`         // 1 or 0 wether to include "suggestion_keys" or not in the response - no idea what this is
	Req                  string `url:"__req,omitempty"`       // not required
	Hs                   string `url:"__hs,omitempty"`        // not required
	Dpr                  string `url:"dpr,omitempty"`         // not required
	Ccg                  string `url:"__ccg,omitempty"`       // not required
	Rev                  string `url:"__rev,omitempty"`       // not required
	S                    string `url:"__s,omitempty"`         // not required
	Hsi                  string `url:"__hsi,omitempty"`       // not required
	Dyn                  string `url:"__dyn,omitempty"`       // not required
	Csr                  string `url:"__csr"`                 // not required
	CometReq             string `url:"__comet_req,omitempty"` // not required but idk what this is
	FbDtsg               string `url:"fb_dtsg,omitempty"`
	Jazoest              string `url:"jazoest,omitempty"`                  // not required
	Lsd                  string `url:"lsd,omitempty"`                      // required
	SpinR                string `url:"__spin_r,omitempty"`                 // not required
	SpinB                string `url:"__spin_b,omitempty"`                 // not required
	SpinT                string `url:"__spin_t,omitempty"`                 // not required
	FbAPICallerClass     string `url:"fb_api_caller_class,omitempty"`      // not required
	FbAPIReqFriendlyName string `url:"fb_api_req_friendly_name,omitempty"` // not required
	Variables            string `url:"variables,omitempty"`
	ServerTimestamps     string `url:"server_timestamps,omitempty"` // "true" or "false"
	DocID                string `url:"doc_id,omitempty"`
	D                    string `url:"__d,omitempty"` // for insta
}

type InputTag

type InputTag struct {
	Attributes AttributeMap
}

type InstagramMethods

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

specific methods for insta api, not socket related

func (*InstagramMethods) CaptchaLogin

func (ig *InstagramMethods) CaptchaLogin(checkpointUrl string) error

func (*InstagramMethods) FetchHighlights

func (ig *InstagramMethods) FetchHighlights(highlightIds []string) (*responses.ReelInfoResponse, error)

Hightlight IDs are different, they come in the format: "highlight:17913397615055292"

func (*InstagramMethods) FetchMedia

func (ig *InstagramMethods) FetchMedia(mediaId string) (*responses.FetchMediaResponse, error)

func (*InstagramMethods) FetchProfile

func (ig *InstagramMethods) FetchProfile(username string) (*responses.ProfileInfoResponse, error)

func (*InstagramMethods) FetchReel

func (ig *InstagramMethods) FetchReel(reelIds []string) (*responses.ReelInfoResponse, error)

func (*InstagramMethods) Login

func (ig *InstagramMethods) Login(identifier string, password string, userAgent *string, totpSecret string, attemptCount int, capSolverKey string) (cookies.Cookies, error)

func (*InstagramMethods) TwoFactorLogin

func (ig *InstagramMethods) TwoFactorLogin(username, identifier, totpSecret string, queryParams string) error

type LinkTag

type LinkTag struct {
	Attributes AttributeMap
}

type MediaType

type MediaType string
const (
	IMAGE_JPEG MediaType = "image/jpeg"
	VIDEO_MP4  MediaType = "video/mp4"
)

type MercuryUploadMedia

type MercuryUploadMedia struct {
	Filename  string
	MediaType MediaType
	MediaData []byte
}

type MessageBuilder

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

func (*MessageBuilder) Execute

func (m *MessageBuilder) Execute() (*table.LSTable, error)

func (*MessageBuilder) SetInitiatingSource

func (m *MessageBuilder) SetInitiatingSource(initatingSource table.InitiatingSource) *MessageBuilder

func (*MessageBuilder) SetLastReadWatermarkTs

func (m *MessageBuilder) SetLastReadWatermarkTs(ts int64) *MessageBuilder

func (*MessageBuilder) SetMedias

func (m *MessageBuilder) SetMedias(medias []*types.MercuryUploadResponse)

func (*MessageBuilder) SetReplyMetadata

func (m *MessageBuilder) SetReplyMetadata(replyMetadata *socket.ReplyMetaData) *MessageBuilder

func (*MessageBuilder) SetSkipUrlPreviewGen

func (m *MessageBuilder) SetSkipUrlPreviewGen() *MessageBuilder

func (*MessageBuilder) SetSource

func (m *MessageBuilder) SetSource(source table.ThreadSourceType) *MessageBuilder

func (*MessageBuilder) SetSyncGroup

func (m *MessageBuilder) SetSyncGroup(syncGroup int64) *MessageBuilder

func (*MessageBuilder) SetText

func (m *MessageBuilder) SetText(text string) *MessageBuilder
func (m *MessageBuilder) SetTextHasLinks() *MessageBuilder

type Messages

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

func (*Messages) DeleteMessage

func (m *Messages) DeleteMessage(messageId string, deleteForMeOnly bool) (*table.LSTable, error)

func (*Messages) SendReaction

func (m *Messages) SendReaction(threadId int64, messageId string, reaction string) (*table.LSTable, error)

type ModuleData

type ModuleData struct {
	Define    [][]interface{} `json:"define,omitempty"`
	Instances [][]interface{} `json:"instances,omitempty"`
	Markup    [][]interface{} `json:"markup,omitempty"`
	Elements  [][]interface{} `json:"elements,omitempty"`
	Require   [][]interface{} `json:"require,omitempty"`
	Contexts  [][]interface{} `json:"contexts,omitempty"`
}

type ModuleParser

type ModuleParser struct {
	FormTags    []FormTag
	LoginInputs []InputTag
	JSDatr      string
	// contains filtered or unexported fields
}

func (*ModuleParser) Bootloader_HandlePayload

func (m *ModuleParser) Bootloader_HandlePayload(payload interface{}, bootloaderConfig *types.BootLoaderConfig) error

func (*ModuleParser) HandleRawJSON

func (m *ModuleParser) HandleRawJSON(data []byte, id string) error

func (*ModuleParser) Load

func (m *ModuleParser) Load(page string) error

func (*ModuleParser) SSJSHandle

func (m *ModuleParser) SSJSHandle(data interface{}) error

func (*ModuleParser) SetClientInstance

func (m *ModuleParser) SetClientInstance(cli *Client)

func (*ModuleParser) SetTestData

func (m *ModuleParser) SetTestData(data []byte)

type NodeProcessor

type NodeProcessor func(*html.Node) interface{}

type Payload

type Payload interface {
	Write() ([]byte, error)
}

type PublishPayload

type PublishPayload struct {
	Topic    Topic `lengthType:"uint16"`
	PacketId uint16
	JSONData string `lengthType:""`
}

func (*PublishPayload) Write

func (pb *PublishPayload) Write() ([]byte, error)

type PublishResponseData

type PublishResponseData struct {
	RequestID int64    `json:"request_id,omitempty"`
	Payload   string   `json:"payload,omitempty"`
	Sp        []string `json:"sp,omitempty"` // dependencies
	Target    int      `json:"target,omitempty"`
}

type ReCaptchaV2Solution

type ReCaptchaV2Solution struct {
	GRecaptchaResponse string `json:"gRecaptchaResponse"`
	UserAgent          string `json:"userAgent,omitempty"`
}

type ReCaptchaV2Task

type ReCaptchaV2Task struct {
	Type        string `json:"type"`
	WebsiteURL  string `json:"websiteURL"`
	WebsiteKey  string `json:"websiteKey"`
	PageAction  string `json:"pageAction,omitempty"`
	IsInvisible bool   `json:"isInvisible,omitempty"`
	UserAgent   string `json:"userAgent,omitempty"`
	Proxy       string `json:"proxy,omitempty"`
}

type Request

type Request struct {
	PacketByte      uint8
	RemainingLength uint32 `vlq:"true"`
}

func (*Request) Write

func (r *Request) Write(payload Payload) ([]byte, error)

type Response

type Response struct {
	PacketByte      uint8
	RemainingLength uint32 `vlq:"true"`
	ResponseData    ResponseData
}

func (*Response) Read

func (r *Response) Read(data []byte) error

type ResponseData

type ResponseData interface {
	Finish() ResponseData
	SetIdentifier(identifier int16)
}

type ResponseHandler

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

func (*ResponseHandler) SetPacketTimeout

func (p *ResponseHandler) SetPacketTimeout(d time.Duration)

type ScriptTag

type ScriptTag struct {
	Attributes AttributeMap
	Content    string
}

type Socket

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

func (*Socket) BuildBrokerUrl

func (s *Socket) BuildBrokerUrl() (string, error)

func (*Socket) CloseHandler

func (s *Socket) CloseHandler(code int, text string) error

func (*Socket) Connect

func (s *Socket) Connect() error

func (*Socket) SafePacketId

func (s *Socket) SafePacketId() uint16

type SocketLSRequestPayload

type SocketLSRequestPayload struct {
	AppId     string `json:"app_id"`
	Payload   string `json:"payload"`
	RequestId int    `json:"request_id"`
	Type      int    `json:"type"`
}

type SubscribePayload

type SubscribePayload struct {
	PacketId uint16
	Topic    Topic `lengthType:"uint16"`
	QoSLevel packets.QoS
}

func (*SubscribePayload) Write

func (sb *SubscribePayload) Write() ([]byte, error)

type SyncManager

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

func (*SyncManager) EnsureSyncedSocket

func (sm *SyncManager) EnsureSyncedSocket(databases []int64) error

func (*SyncManager) GetCursor

func (sm *SyncManager) GetCursor(db int64) string

func (*SyncManager) SyncDataGraphQL

func (sm *SyncManager) SyncDataGraphQL(dbs []int64) (*table.LSTable, error)

func (*SyncManager) SyncSocketData

func (sm *SyncManager) SyncSocketData(databaseId int64, db *socket.QueryMetadata) (*table.LSTable, error)

func (*SyncManager) SyncTransactions

func (sm *SyncManager) SyncTransactions(transactions []table.LSExecuteFirstBlockForSyncTransaction) error

func (*SyncManager) UpdateDatabaseSyncParams

func (sm *SyncManager) UpdateDatabaseSyncParams(dbs []*socket.QueryMetadata) error

type TaskManager

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

func (*TaskManager) AddNewTask

func (tm *TaskManager) AddNewTask(task socket.Task)

func (*TaskManager) FinalizePayload

func (tm *TaskManager) FinalizePayload() ([]byte, error)

func (*TaskManager) GetTaskId

func (tm *TaskManager) GetTaskId() int64

type Threads

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

func (*Threads) FetchMessages

func (t *Threads) FetchMessages(ThreadId int64, ReferenceTimestampMs int64, ReferenceMessageId string, Cursor string) (*table.LSTable, error)

func (*Threads) NewMessageBuilder

func (t *Threads) NewMessageBuilder(threadId int64) *MessageBuilder

type Topic

type Topic string
const (
	UNKNOWN_TOPIC       Topic = "unknown"
	LS_APP_SETTINGS     Topic = "/ls_app_settings"
	LS_FOREGROUND_STATE Topic = "/ls_foreground_state"
	LS_REQ              Topic = "/ls_req"
	LS_RESP             Topic = "/ls_resp"
)

Directories

Path Synopsis
data

Jump to

Keyboard shortcuts

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