uratrie

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 7 Imported by: 0

README

user-routing-authority-trie

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// segment => *regexp.Regexp
	Regexps map[string]*regexp.Regexp
	// segment => *Node
	Childrens map[string]*Node
	// userIDs
	Container *roaring.Bitmap
	// because it is a different branch, it can only be all single or all multiple.
	// segment index => wildcard key => path key
	Wildcards map[int]map[string]string
	// whether leaf node
	Leaf bool
}

func (*Node) Dump

func (n *Node) Dump(text *string, part ...string)

func (*Node) Insert

func (n *Node) Insert(key string, path []byte, userIDs []uint32) (err error)

func (*Node) Match

func (n *Node) Match(path []byte, userID uint32) (has, ok bool, params map[string]string)

Jump to

Keyboard shortcuts

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