consumer

package
v0.0.0-...-3d48b77 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(l *log.Entry)

func NewRepo

func NewRepo(a *config.AppConfig, cfg *aws.Config)

Types

type Event

type Event struct {
	// The data blob. The data in the blob is both opaque and immutable to Kinesis
	// Data Streams, which does not inspect, interpret, or change the data in the
	// blob in any way. When the data blob (the payload before base64-encoding)
	// is added to the partition key size, the total size must not exceed the maximum
	// record size (1 MiB).
	// Data is automatically base64 encoded/decoded by the SDK.
	//
	// Data is a required field
	Data string `json:"data"`
}

type Repository

type Repository struct {
	App *config.AppConfig
	Svc *sqs.Client
}
var Repo *Repository

func (Repository) DeleteSqsMsg

func (r Repository) DeleteSqsMsg(
	ctx context.Context,
	receipt string,
) error

func (Repository) ReceiveSqsMsg

func (r Repository) ReceiveSqsMsg(
	ctx context.Context,
	timeout int32,
) (*types.Message, error)

type Revision

type Revision struct {
	BlockAddress     RevisionBlockAddress `ion:"blockAddress"`
	Hash             []byte               `ion:"hash"`
	Data             interface{}          `ion:"data"`
	RevisionMetadata RevisionMetadata     `ion:"metadata"`
}

type RevisionBlockAddress

type RevisionBlockAddress struct {
	StrandId   string `ion:"strandId"`
	SequenceNo uint64 `ion:"sequenceNo"`
}

type RevisionMetadata

type RevisionMetadata struct {
	Id      string        `ion:"id"`
	Version uint64        `ion:"version"`
	TxnTime ion.Timestamp `ion:"txnTime"`
	TxnId   string        `ion:"txId"`
}

type RevisionRecordPayload

type RevisionRecordPayload struct {
	TableInfo TableInfo `ion:"tableInfo"`
	Revision  Revision  `ion:"revision"`
}

type StreamRecord

type StreamRecord struct {
	QldbStreamArn string                 `ion:"qldbStreamArn"`
	RecordType    string                 `ion:"recordType"`
	Payload       map[string]interface{} `ion:"payload"`
}

type TableInfo

type TableInfo struct {
	TableName string `ion:"tableName"`
	TableId   string `ion:"tableId"`
}

Jump to

Keyboard shortcuts

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