Documentation ¶
Index ¶
- Variables
- func ConvertToURL(input string) string
- func FirstRuneIsUp(input string) bool
- func ParseUrl(ctx *fasthttp.RequestCtx) (queryStringMap maps.IMap[string, string])
- func Register(rcvrs ...interface{})
- func RegisterByInject()
- func ServeHTTP(ctx *fasthttp.RequestCtx)
- type IJetRouter
- type ITrie
- type JetRouter
- type SplitMethodFunc
- type SplitPathFunc
- type Trie
- func (t *Trie[V]) Add(path string, v V) (overwrittenValue V)
- func (t *Trie[V]) Clear()
- func (t *Trie[V]) Contains(path string) bool
- func (t *Trie[V]) Get(path string) (v V)
- func (t *Trie[V]) GetAndArgs(path string) (v V, args []string)
- func (t *Trie[V]) IsEmpty() bool
- func (t *Trie[V]) Remove(path string) (oldValue V)
- func (t *Trie[V]) Size() int
- func (t *Trie[V]) StartWith(prefix string) bool
- type TrieNode
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultJetRouter = NewJetRouter("0")
Functions ¶
func ConvertToURL ¶
ConvertToURL Convert uppercase-separated string to URL format like GetV1UsageWeek => get/v1/usage/week
func FirstRuneIsUp ¶
func RegisterByInject ¶
func RegisterByInject()
func ServeHTTP ¶
func ServeHTTP(ctx *fasthttp.RequestCtx)
Types ¶
type IJetRouter ¶
type IJetRouter interface { ServeHTTP(ctx *fasthttp.RequestCtx) RegisterRouter(path string, handler handler.IHandler) }
func NewJetRouter ¶
func NewJetRouter(separator string, f ...SplitPathFunc) IJetRouter
type ITrie ¶
type ITrie[V any] interface { Size() int IsEmpty() bool Clear() Contains(path string) bool Get(path string) V GetAndArgs(path string) (value V, args []string) Add(path string, v V) (overwrittenValue V) Remove(path string) (oldValue V) StartWith(prefix string) bool }
func NewRouterTrie ¶
func NewRouterTrie[V any](separator string, splitPathFuncs ...SplitPathFunc) ITrie[V]
func NewRouterTrieWith ¶
func NewRouterTrieWith[V any](separator string, splitPathFunc SplitPathFunc, splitMethodFunc SplitMethodFunc) ITrie[V]
type JetRouter ¶
type JetRouter struct {
// contains filtered or unexported fields
}
func (*JetRouter) RegisterRouter ¶
func (*JetRouter) ServeHTTP ¶
func (r *JetRouter) ServeHTTP(ctx *fasthttp.RequestCtx)
type SplitMethodFunc ¶
type SplitPathFunc ¶
type Trie ¶
type Trie[V any] struct { // contains filtered or unexported fields }
func (*Trie[V]) GetAndArgs ¶
Click to show internal directories.
Click to hide internal directories.