task

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package task defines commonly used tasks across plugins. Plugins can share these common tasks and use them in their state machines.

Index

Constants

View Source
const (
	// MethodZip requires the zip code associated with a credit card on
	// file. The user will be asked for a credit card if not on file.
	MethodZip = iota + 1

	// MethodWebCache allows a user to authenticate by clicking a link. If
	// their browser cookies have them already logged into Ava, they will be
	// authenticated. If they are not currently logged into Ava, they will
	// be asked to login. Once logged in, they will be authenticated.
	MethodWebCache

	// MethodWebLogin requires the user login to Ava on the web interface
	// using their username and password. This is the most secure option,
	// as it ensures no one has stolen the device or session token of a
	// user.
	MethodWebLogin
)

Variables

This section is empty.

Functions

func New

func New(sm *dt.StateMachine, t Type, label string) []dt.State

New returns a slice of States for inclusion into a StateMachine.SetStates() call.

Types

type Type

type Type int

Type references the type of task to perform. Valid options are constant.

const (
	// RequestAddress for a given user.
	RequestAddress Type = iota + 1

	// RequestCalendar access for a given user.
	RequestCalendar

	// RequestPurchaseAuthZip requests a user's billing zip code to confirm
	// that they're authorized to make a purchase. The request is skipped if
	// the user has authorized by the same or more secure method recently.
	RequestPurchaseAuthZip
)

Jump to

Keyboard shortcuts

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