appengine

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailTransport

type MailTransport struct {
	// MessageFunc should return a `mail.Message` for the given recipient and
	// token.
	MessageFunc func(ctx context.Context, token, user, recipient string) (*mail.Message, error)
}

MailTransport sends token messages via the mail service.

func (MailTransport) Send

func (t MailTransport) Send(ctx context.Context, token, user, recipient string) error

Send sends an XMPP message to the specified recipient.

type MemcacheStore

type MemcacheStore struct {
	KeyPrefix string
}

func (MemcacheStore) Delete

func (s MemcacheStore) Delete(ctx context.Context, uid string) error

func (MemcacheStore) Exists

func (s MemcacheStore) Exists(ctx context.Context, uid string) (bool, time.Time, error)

Exists returns true if a token for the specified user exists.

func (MemcacheStore) Store

func (s MemcacheStore) Store(ctx context.Context, token, uid string, ttl time.Duration) error

func (MemcacheStore) Verify

func (s MemcacheStore) Verify(ctx context.Context, token, uid string) (bool, error)

type XMPPTransport

type XMPPTransport struct {
	MessageFunc func(ctx context.Context, token, user, recipient string) (*xmpp.Message, error)
}

XMPPTransport sends tokens via the XMPP service.

func (XMPPTransport) Send

func (t XMPPTransport) Send(ctx context.Context, token, user, recipient string) error

Send sends an XMPP message to the specified recipient.

Jump to

Keyboard shortcuts

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