proxy

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoginResponse = &authentication.LoginRes{
		AccountAlias: "ALIAS",
		BearerToken:  "token",
	}
)

Functions

func CloseConfig

func CloseConfig()

CloseConfig removes the temporary directory created by Config.

func CloseServer

func CloseServer()

func Config

func Config()

Config replaces the configuration directory with a temporary one. It is a caller's responsibility to call CloseConfig to release resources. Useful for testing modules relied on the config file.

func Server

func Server(endpoints []Endpoint)

Server mocks HTTP requests for the registered endpoints. It is a caller's responsibility to clean up the resources by calling CloseServer.

Types

type Endpoint

type Endpoint struct {
	URL      string
	Response interface{}
}

Jump to

Keyboard shortcuts

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