fallback

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fallback

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

Fallback is filter Fallback.

func New

func New(spec *Spec) *Fallback

New creates a Fallback.

func (*Fallback) Fallback

func (f *Fallback) Fallback(ctx context.HTTPContext)

Fallback fallbacks HTTPContext.

type Spec

type Spec struct {
	MockCode    int               `yaml:"mockCode" jsonschema:"required,format=httpcode"`
	MockHeaders map[string]string `yaml:"mockHeaders" jsonschema:"omitempty"`
	MockBody    string            `yaml:"mockBody" jsonschema:"omitempty"`
}

Spec describes the Fallback.

Jump to

Keyboard shortcuts

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