Help us shape the future of Go! Take the 2026 Go Developer Survey

storage

package
v0.2.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryIface

type FactoryIface interface {
	CreateStorage(opts *gap.Options) (Storage, error)
}

type Storage

type Storage interface {
	Bind(txer txer.Txer) (Storage, error)

	CreatePublished(ctx context.Context, envelope *entity.Envelope) error

	UpdateStatusPublished(ctx context.Context, id uint, src enum.Status, status enum.Status) error

	ClaimPublishedBatch(ctx context.Context, batchSize int) ([]*entity.Envelope, error)

	CreateReceived(ctx context.Context, envelope *entity.Envelope) error

	ClaimReceivedBatch(ctx context.Context, batchSize int) ([]*entity.Envelope, error)

	UpdateStatusReceived(ctx context.Context, id uint, src enum.Status, status enum.Status) error

	StorageX
}

type StorageX

type StorageX interface {
	GetPublishedByID(ctx context.Context, id uint) (*entity.Envelope, error)

	QueryPublished(ctx context.Context, status enum.Status, topic string, page *entity.Pagination) ([]*entity.Envelope, *entity.Pagination, error)

	QueryReceived(ctx context.Context, status enum.Status, topic string, group string, page *entity.Pagination) ([]*entity.Envelope, *entity.Pagination, error)
}

type TxerBase

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

func (*TxerBase) Append

func (s *TxerBase) Append(envelope *entity.Envelope)

func (*TxerBase) Flush

func (tx *TxerBase) Flush()

func (*TxerBase) SetFlushHandler

func (tx *TxerBase) SetFlushHandler(handler func(*entity.Envelope))

Directories

Path Synopsis
xgorm module
xmysql module

Jump to

Keyboard shortcuts

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