models

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 0 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// LogRedirectIDKey represents the key used for
	// logging the redirect ID.
	LogRedirectIDKey = "redirect_id"
	// LogRedirectFromKey represents the key used for
	// logging the redirect source.
	LogRedirectFromKey = "redirect_from"
	// LogRedirectToKey represents the key used for
	// logging the redirect destination.
	LogRedirectToKey = "redirect_to"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Redirect

type Redirect struct {
	From  string        `json:"from,omitempty"`
	To    string        `json:"to,omitempty"`
	ID    string        `json:"id"`
	Links RedirectLinks `json:"links"`
}

Redirect represents response body when retrieving a redirect

type RedirectLinks struct {
	Self RedirectSelf `json:"self"`
}

RedirectLinks is a type that contains links relating to the individual redirect. Currently, it only contains one link, which is a link to itself.

type RedirectSelf added in v0.3.5

type RedirectSelf struct {
	Href string `json:"href"`
	ID   string `json:"id"`
}

RedirectSelf represents a link to the individual redirect itself.

type Redirects added in v0.3.5

type Redirects struct {
	Count        int        `json:"count"`
	RedirectList []Redirect `json:"items"`
	Cursor       string     `json:"cursor"`
	NextCursor   string     `json:"next_cursor"`
	TotalCount   int        `json:"total_count"`
}

Redirects represents response body when retrieving a list of redirects

Jump to

Keyboard shortcuts

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