fallback

package
v0.7.12 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 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    providers.FileProviders
	RedirectTemplate *template.Template
	StatusTemplate   *template.Template
	Bundle           *i18n.Bundle
	Logger           log.Logger
	// contains filtered or unexported fields
}

func New

func (*Fallback) Redirect

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

func (*Fallback) RedirectHtml

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

func (*Fallback) RedirectJson

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

func (*Fallback) RedirectText

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

func (*Fallback) RedirectXml

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

func (*Fallback) RedirectYaml

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

func (*Fallback) Status

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

func (*Fallback) StatusAsHtml

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

func (*Fallback) StatusAsJson

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

func (*Fallback) StatusAsText

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

func (*Fallback) StatusAsXml

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

func (*Fallback) StatusAsYaml

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

func (*Fallback) Unknown

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

Jump to

Keyboard shortcuts

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