store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable

func Disable(ctx context.Context) context.Context

Disable disables the insertion of letters for ctx.

func Disabled

func Disabled(ctx context.Context) bool

Disabled determines if the insertion of letters is disabled for ctx.

func Enable

func Enable(ctx context.Context) context.Context

Enable (re)enables the insertion of letters for ctx.

func Enabled

func Enabled(ctx context.Context) bool

Enabled determines if the insertion of letters is enabled for ctx.

func Plugin

func Plugin(store Store) postdog.PluginFunc

Plugin is the install function for the store plugin. It hooks into the postdog.AfterSend hook and inserts all sent letters into the store implementation.

Types

type Letter

type Letter struct {
	letter.Letter
	SentAt    time.Time
	SendError string
}

Letter adds additional info to a letter.Letter.

func (Letter) String added in v0.2.0

func (let Letter) String() string

type Store

type Store interface {
	Insert(context.Context, Letter) error
}

Store inserts letters into a repository.

Directories

Path Synopsis
Package mock_store is a generated GoMock package.
Package mock_store is a generated GoMock package.
Package mongostore provides the mongodb store implementation.
Package mongostore provides the mongodb store implementation.
Package query provides functions to query letters from a store.
Package query provides functions to query letters from a store.
mock_query
Package mock_query is a generated GoMock package.
Package mock_query is a generated GoMock package.
Package storetest provides testing utilities that can be used to test store implementations.
Package storetest provides testing utilities that can be used to test store implementations.

Jump to

Keyboard shortcuts

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