tests

package
v0.0.0-...-f1ebe90 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MockAPIKey = "11112222-3333-4444-aaaa-bbbbccccdddd"

MockAPIKey is used for tests.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Conf *config.Config
	// contains filtered or unexported fields
}

Env is a mock api server.

func NewEnv

func NewEnv() (*Env, error)

NewEnv creates env for tests.

func (*Env) Close

func (env *Env) Close()

Close stops server and clean up files.

type Req

type Req struct {
	// contains filtered or unexported fields
}

Req contains options to initial a HTTP request to mock server.

type Res

type Res struct {
	Status     int
	RawContent string
	IsJSON     bool
	Value      interface{}
}

Res represents server HTTP response.

Jump to

Keyboard shortcuts

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