postgresql

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

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New(
	pool *pgxpool.Pool,
	codec es.EventCoder,
) (*Store, error)

func (*Store) Append

func (c *Store) Append(ctx context.Context, streamID uuid.UUID, streamType string,
	events []es.Event, expectedVersion int,
) (err error)

func (*Store) Iter

func (c *Store) Iter(ctx context.Context, streamType string, fn func(streamID uuid.UUID, version int, events []es.Event) error) error

func (*Store) Load

func (c *Store) Load(ctx context.Context, streamID uuid.UUID, streamType string, fromVersion int) ([]es.Event, error)

Jump to

Keyboard shortcuts

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