Documentation ¶
Index ¶
- func AutoCreateRedirectDefinitions(l *zap.Logger, oldMap, newMap map[string]*content.RepoNode, ...) ([]*redirectstore.RedirectDefinition, error)
- func ConsolidateRedirectDefinitions(l *zap.Logger, new []*redirectstore.RedirectDefinition, ...) ([]*redirectstore.RedirectDefinition, []redirectstore.EntityID)
- func CreateFlatRepoNodeMap(node *content.RepoNode, nodeMap map[string]*content.RepoNode) map[string]*content.RepoNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoCreateRedirectDefinitions ¶
func AutoCreateRedirectDefinitions( l *zap.Logger, oldMap, newMap map[string]*content.RepoNode, dimension redirectstore.Dimension, ) ([]*redirectstore.RedirectDefinition, error)
AutoCreateRedirectDefinitions generates automatic redirects based on the difference between the old and new content tree. find new.ID to old.ID and check if the URI is different, if it is different, create a redirect
func ConsolidateRedirectDefinitions ¶
func ConsolidateRedirectDefinitions( l *zap.Logger, new []*redirectstore.RedirectDefinition, current redirectstore.RedirectDefinitions, newNodeMap map[string]*content.RepoNode, ) ([]*redirectstore.RedirectDefinition, []redirectstore.EntityID)
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.