redirectdefinitionutils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoCreateRedirectDefinitions

func AutoCreateRedirectDefinitions(l *zap.Logger, old, new *content.RepoNode) (redirectstore.RedirectDefinitions, error)

func ConsolidateRedirectDefinitions

func ConsolidateRedirectDefinitions(
	l *zap.Logger,
	old, new redirectstore.RedirectDefinitions,
) (updatedDefs redirectstore.RedirectDefinitions, deletedSources []redirectstore.RedirectSource)

Consolidate redirect definitions by: * Making list for update with new and updated definitions * Making list for deleting for definitions with empty target id * If target of one is source to another one, consolidate those into one definition to prevent multiple redirections

func FindNodeById

func FindNodeById(root *content.RepoNode, id string) *content.RepoNode

func GetAllNodes

func GetAllNodes(node *content.RepoNode, nodesList []*content.RepoNode) []*content.RepoNode

GetAllNodes recursively retrieves all nodes from the tree.

Types

This section is empty.

Jump to

Keyboard shortcuts

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