links

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDocumentRedirectDetails

func DeleteDocumentRedirectDetails(
	algo *algolia.Client, id string, docType string, docNumString string) error

DeleteDocumentRedirectDetails deletes document redirect details from Algolia.

func RedirectHandler

func RedirectHandler(algo *algolia.Client, algoCfg *algolia.Config, log hclog.Logger) http.Handler

RedirectHandler handles redirects from Hashilinks

func SaveDocumentRedirectDetails

func SaveDocumentRedirectDetails(
	algo *algolia.Client, id string, docType string, docNumString string) error

SaveDocumentRedirectDetails saves the short path of the document as the key and the document ID as the value in Algolia.

Types

type LinkData

type LinkData struct {
	// ObjectID is the short link path
	ObjectID string `json:"objectID,omitempty"`
	// DocumentID is the ID to the document
	DocumentID string `json:"documentID,omitempty"`
}

Jump to

Keyboard shortcuts

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