sqlstore

package
v0.0.0-...-de07bbb Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMySQL

func CreateMySQL(ctx context.Context, db *sql.DB, tableName string) error

Types

type OpenFunc

type OpenFunc func() (*sql.DB, error)

type Option

type Option func(s *Store)

func WithDebug

func WithDebug(w io.Writer) Option

type Store

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

func New

func New(tableName string, openFunc OpenFunc, opts ...Option) *Store

func (*Store) Fetch

func (s *Store) Fetch(ctx context.Context, aggregateID string, version int) (eventsource.History, error)

func (*Store) Save

func (s *Store) Save(ctx context.Context, aggregateID string, records ...eventsource.Record) error

Jump to

Keyboard shortcuts

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