package mech

import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/mesos/mesos-go/auth/sasl/mech"

Index

Variables

var (
	IllegalStateErr = errors.New("illegal mechanism state")
)

Functions

func ListSupported

func ListSupported() (list []string)

func Register

func Register(name string, f Factory) error

Types

type Factory

type Factory func(h callback.Handler) (Interface, StepFunc, error)

return a mechanism and it's initialization step (may be a noop that returns a nil data blob and handle to the first "real" challenge step).

func SelectSupported

func SelectSupported(mechanisms []string) (selectedMech string, factory Factory)

type Interface

type Interface interface {
	Handler() callback.Handler
	Discard() // clean up resources or sensitive information; idempotent
}

type StepFunc

type StepFunc func(m Interface, data []byte) (StepFunc, []byte, error)

StepFunc implementations should never return a nil StepFunc result. This helps keep the logic in the SASL authticatee simpler: step functions are never nil. Mechanisms that end up an error state (for example, some decoding logic fails...) should return a StepFunc that represents an error state. Some mechanisms may be able to recover from such.

func IllegalState

func IllegalState(m Interface, data []byte) (StepFunc, []byte, error)

reflects an unrecoverable, illegal mechanism state; always returns IllegalState as the next step along with an IllegalStateErr

Source Files

interface.go plugins.go

Directories

PathSynopsis
Godeps/_workspace/src/github.com/mesos/mesos-go/auth/sasl/mech/crammd5
Version
v1.1.0-beta
Published
Sep 25, 2015
Platform
linux/amd64
Imports
5 packages
Last checked
14 minutes ago

Tools for package owners.