checkers

package
v0.0.0-...-e872c33 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2014 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

The checkers package provides some standard caveat checkers and checker-combining functions.

Index

Constants

This section is empty.

Variables

View Source
var Std = Map{
	"time-before": bakery.FirstPartyCheckerFunc(timeBefore),
}

Functions

func FirstParty

func FirstParty(condition string) bakery.Caveat

func ParseCaveat

func ParseCaveat(cav string) (string, string, error)

ParseCaveat parses a caveat into an identifier, identifying the checker that should be used, and the argument to the checker (the rest of the string).

The identifier is taken from all the characters before the first space character.

func PushFirstPartyChecker

func PushFirstPartyChecker(c0, c1 bakery.FirstPartyChecker) bakery.FirstPartyChecker

PushFirstPartyChecker returns a checker that first uses c0 to check caveats, and falls back to using c1 if c0 returns bakery.ErrCaveatNotRecognized.

func ThirdParty

func ThirdParty(location, condition string) bakery.Caveat

func TimeBefore

func TimeBefore(t time.Time) bakery.Caveat

Types

type Map

func (Map) CheckFirstPartyCaveat

func (m Map) CheckFirstPartyCaveat(cav string) error

Jump to

Keyboard shortcuts

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