Documentation ¶
Index ¶
- type Client
- func (c *Client) ConsumeMessage(ctx context.Context, m gregor.Message) error
- func (c *Client) InBandMessagesFromState(s gregor.State) ([]gregor.InBandMessage, error)
- func (c *Client) Restore(ctx context.Context) error
- func (c *Client) Save(ctx context.Context) error
- func (c *Client) State(ctx context.Context, cli gregor1.IncomingInterface) (res gregor.State, err error)
- func (c *Client) StateMachineConsumeLocalDismissal(ctx context.Context, id gregor.MsgID) error
- func (c *Client) StateMachineConsumeMessage(ctx context.Context, m gregor1.Message) error
- func (c *Client) StateMachineInBandMessagesSince(ctx context.Context, t time.Time, filterLocalDismissals bool) ([]gregor.InBandMessage, error)
- func (c *Client) StateMachineLatestCTime(ctx context.Context) *time.Time
- func (c *Client) StateMachineState(ctx context.Context, t gregor.TimeOrOffset, applyLocalState bool) (gregor.State, error)
- func (c *Client) Stop() chan struct{}
- func (c *Client) Sync(ctx context.Context, cli gregor1.IncomingInterface, ...) (res []gregor.InBandMessage, err error)
- func (c *Client) SyncFromTime(ctx context.Context, cli gregor1.IncomingInterface, t *time.Time, ...) (msgs []gregor.InBandMessage, err error)
- type ErrHashMismatch
- type LocalStorageEngine
- type TestingEvents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { User gregor.UID Device gregor.DeviceID Sm gregor.StateMachine Storage LocalStorageEngine Log logger.Logger // testing events TestingEvents *TestingEvents // contains filtered or unexported fields }
func NewClient ¶
func NewClient(user gregor.UID, device gregor.DeviceID, createSm func() gregor.StateMachine, storage LocalStorageEngine, incomingClient func() gregor1.IncomingInterface, log logger.Logger, clock clockwork.Clock) *Client
func (*Client) ConsumeMessage ¶
func (*Client) InBandMessagesFromState ¶
func (*Client) StateMachineConsumeLocalDismissal ¶
func (*Client) StateMachineConsumeMessage ¶
func (*Client) StateMachineInBandMessagesSince ¶
func (*Client) StateMachineLatestCTime ¶
func (*Client) StateMachineState ¶
func (*Client) Sync ¶
func (c *Client) Sync(ctx context.Context, cli gregor1.IncomingInterface, syncRes *chat1.SyncAllNotificationRes) (res []gregor.InBandMessage, err error)
func (*Client) SyncFromTime ¶
func (c *Client) SyncFromTime(ctx context.Context, cli gregor1.IncomingInterface, t *time.Time, syncResult *gregor1.SyncResult) (msgs []gregor.InBandMessage, err error)
type ErrHashMismatch ¶
type ErrHashMismatch struct{}
func (ErrHashMismatch) Error ¶
func (e ErrHashMismatch) Error() string
type LocalStorageEngine ¶
type TestingEvents ¶
func NewTestingEvents ¶
func NewTestingEvents() *TestingEvents
Click to show internal directories.
Click to hide internal directories.