event

package
v0.0.0-...-1649e63 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Deleted = Type("subscriber-deleted")
	Added   = Type("subscriber-added")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

type DataSource interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}

type Event

type Event struct {
	ID        int       `db:"id"`
	Type      Type      `db:"type"`
	CreatedAt time.Time `db:"created_at"`
	Payload   []byte    `db:"payload"`
}

type Repo

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

func NewRepo

func NewRepo(db DataSource) *Repo

func (*Repo) Save

func (s *Repo) Save(ctx context.Context, event Event) error

type Type

type Type string

Jump to

Keyboard shortcuts

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