storer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDENTITY_UPDATE_ORIGINATOR_ID = 1
)

Variables

This section is empty.

Functions

func BuildInboxTopic

func BuildInboxTopic(inboxId [32]byte) string

func NewLogStorageError

func NewLogStorageError(err error, shouldRetry bool) logStorageError

Types

type GroupMessageStorer

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

func NewGroupMessageStorer

func NewGroupMessageStorer(
	queries *queries.Queries,
	logger *zap.Logger,
	contract *abis.GroupMessages,
) *GroupMessageStorer

func (*GroupMessageStorer) StoreLog

func (s *GroupMessageStorer) StoreLog(ctx context.Context, event types.Log) LogStorageError

Validate and store a group message log event

type IdentityUpdateStorer

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

func NewIdentityUpdateStorer

func NewIdentityUpdateStorer(
	db *sql.DB,
	logger *zap.Logger,
	contract *abis.IdentityUpdates,
	validationService mlsvalidate.MLSValidationService,
) *IdentityUpdateStorer

func (*IdentityUpdateStorer) StoreLog

func (s *IdentityUpdateStorer) StoreLog(ctx context.Context, event types.Log) LogStorageError

Validate and store an identity update log event

type LogStorageError

type LogStorageError interface {
	error
	ShouldRetry() bool
}

type LogStorer

type LogStorer interface {
	StoreLog(ctx context.Context, event types.Log) LogStorageError
}

Takes a log event and stores it, returning either an error that may be retriable, non-retriable, or nil

Jump to

Keyboard shortcuts

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