mock

package
v2.0.0-alpha.5+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mock implements connectors which help test various server components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCallbackConnector

func NewCallbackConnector() connector.Connector

NewCallbackConnector returns a mock connector which requires no user interaction. It always returns the same (fake) identity.

Types

type CallbackConfig

type CallbackConfig struct{}

CallbackConfig holds the configuration parameters for a connector which requires no interaction.

func (*CallbackConfig) Open

func (c *CallbackConfig) Open() (connector.Connector, error)

Open returns an authentication strategy which requires no user interaction.

type PasswordConfig

type PasswordConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

PasswordConfig holds the configuration for a mock connector which prompts for the supplied username and password.

func (*PasswordConfig) Open

func (c *PasswordConfig) Open() (connector.Connector, error)

Open returns an authentication strategy which prompts for a predefined username and password.

Jump to

Keyboard shortcuts

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