model

package
v0.0.0-...-cd6e81f Latest Latest
Warning

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

Go to latest
Published: May 6, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redirect

type Redirect struct {
	ID          string `yaml:"id" json:"id" toml:"id"`
	Source      string `yaml:"source" json:"source" toml:"source"`
	Destination string `yaml:"destination" json:"destination" toml:"destination"`
	Priority    int    `yaml:"priority" json:"priority" toml:"priority"`
}

Redirect represents a redirect model definition.

func (*Redirect) Contains

func (r *Redirect) Contains(needle string) bool

Contains checks if a needle is part of the redirect.

type RedirectsByPriority

type RedirectsByPriority []*Redirect

RedirectsByPriority represents a collection of redirects for sorting.

func (RedirectsByPriority) Len

func (s RedirectsByPriority) Len() int

Len just implements the default sorting interface.

func (RedirectsByPriority) Less

func (s RedirectsByPriority) Less(i, j int) bool

Less just implements the default sorting interface.

func (RedirectsByPriority) Swap

func (s RedirectsByPriority) Swap(i, j int)

Swap just implements the default sorting interface.

Jump to

Keyboard shortcuts

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