fallback

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fallback implements the fallback filter.

Index

Constants

View Source
const (
	// Kind is the kind of Fallback.
	Kind = "Fallback"
)

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 (*Fallback) Close

func (f *Fallback) Close()

Close closes Fallback.

func (*Fallback) Handle

func (f *Fallback) Handle(ctx *context.Context) string

Handle fallbacks HTTPContext. It always returns fallback.

func (*Fallback) Inherit

func (f *Fallback) Inherit(previousGeneration filters.Filter)

Inherit inherits previous generation of Fallback.

func (*Fallback) Init

func (f *Fallback) Init()

Init initializes Fallback.

func (*Fallback) Kind

func (f *Fallback) Kind() *filters.Kind

Kind returns the kind of Fallback.

func (*Fallback) Name

func (f *Fallback) Name() string

Name returns the name of the Fallback filter instance.

func (*Fallback) Spec

func (f *Fallback) Spec() filters.Spec

Spec returns the spec used by the Fallback

func (*Fallback) Status

func (f *Fallback) Status() interface{}

Status returns Status.

type Spec

type Spec struct {
	filters.BaseSpec `json:",inline"`

	MockCode    int               `json:"mockCode" jsonschema:"required,format=httpcode"`
	MockHeaders map[string]string `json:"mockHeaders,omitempty"`
	MockBody    string            `json:"mockBody,omitempty"`
}

Spec describes the Fallback.

Jump to

Keyboard shortcuts

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