fallback

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 12 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 {
	FileProviders    support.FileProviders
	RedirectTemplate *template.Template
	StatusTemplate   *template.Template
	Bundle           *i18n.Bundle

	ReloadTimeoutOnTemporaryIssues time.Duration
}

func New

func New(fps support.FileProviders) (*Fallback, error)

func (*Fallback) Redirect

func (instance *Fallback) Redirect(ctx *context.Context, statusCode int, target string)

func (*Fallback) RedirectHtml

func (instance *Fallback) RedirectHtml(ctx *context.Context, statusCode int, target string, lc *support.LocalizationContext)

func (*Fallback) RedirectJson

func (instance *Fallback) RedirectJson(ctx *context.Context, statusCode int, target string, lc *support.LocalizationContext)

func (*Fallback) RedirectText

func (instance *Fallback) RedirectText(ctx *context.Context, statusCode int, _ string, lc *support.LocalizationContext)

func (*Fallback) RedirectXml

func (instance *Fallback) RedirectXml(ctx *context.Context, statusCode int, target string, lc *support.LocalizationContext)

func (*Fallback) RedirectYaml

func (instance *Fallback) RedirectYaml(ctx *context.Context, statusCode int, target string, lc *support.LocalizationContext)

func (*Fallback) RegisterFlag

func (instance *Fallback) RegisterFlag(fe support.FlagEnabled, appPrefix string) error

func (*Fallback) Status

func (instance *Fallback) Status(ctx *context.Context, statusCode int, path string, canHandleTemporary bool)

func (*Fallback) StatusAsHtml

func (instance *Fallback) StatusAsHtml(ctx *context.Context, statusCode int, path string, canHandleTemporary bool, lc *support.LocalizationContext)

func (*Fallback) StatusAsJson

func (instance *Fallback) StatusAsJson(ctx *context.Context, statusCode int, path string, _ bool, lc *support.LocalizationContext)

func (*Fallback) StatusAsText

func (instance *Fallback) StatusAsText(ctx *context.Context, statusCode int, _ string, _ bool, lc *support.LocalizationContext)

func (*Fallback) StatusAsXml

func (instance *Fallback) StatusAsXml(ctx *context.Context, statusCode int, path string, _ bool, lc *support.LocalizationContext)

func (*Fallback) StatusAsYaml

func (instance *Fallback) StatusAsYaml(ctx *context.Context, statusCode int, path string, _ bool, lc *support.LocalizationContext)

func (*Fallback) Unknown

func (instance *Fallback) Unknown(ctx *context.Context)

Jump to

Keyboard shortcuts

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