Documentation
¶
Index ¶
- Variables
- func BodyUnmarshal(r io.ReadSeeker, store any) error
- func Camel(s string) string
- func Cased(s string, fn ...CasedFn) string
- func Djb33(seed uint32, k string) uint32
- func Kebab(s string) string
- func Lower(s string) string
- func Pascal(s string) string
- func ReaderFromRequest(r *http.Request) (io.ReadSeeker, error)
- func ScreamingSnake(s string) string
- func SlogInit()
- func Snake(s string) string
- func UUID() string
- func Upper(s string) string
- type CasedFn
- type CasedString
- type LinkedList
- type Node
Constants ¶
This section is empty.
Variables ¶
View Source
var CallNTimesWithDelay = toolbelt.CallNTimesWithDelay
View Source
var Debounce = toolbelt.Debounce
View Source
var FreePort = toolbelt.FreePort
View Source
var Throttle = toolbelt.Throttle
Functions ¶
func BodyUnmarshal ¶
func BodyUnmarshal(r io.ReadSeeker, store any) error
func ReaderFromRequest ¶ added in v0.0.2
func ReaderFromRequest(r *http.Request) (io.ReadSeeker, error)
func ScreamingSnake ¶ added in v0.0.4
Types ¶
type CasedString ¶ added in v0.0.4
type CasedString struct {
Original string
Pascal string
Camel string
Snake string
ScreamingSnake string
Kebab string
Upper string
Lower string
}
func ToCasedString ¶ added in v0.0.4
func ToCasedString(s string) CasedString
type LinkedList ¶
type LinkedList[T any] struct { Head *Node[T] `json:"next"` Last *Node[T] `json:"-"` // Pointer to the last node }
LinkedList is a generic linked list
func (*LinkedList[T]) Add ¶
func (ll *LinkedList[T]) Add(value T)
Add adds a new node to the linked list
func (*LinkedList[T]) AsSlice ¶
func (ll *LinkedList[T]) AsSlice() []T
func (*LinkedList[T]) RemoveById ¶
func (ll *LinkedList[T]) RemoveById(matchFunc func(T) bool)
RemoveById removes a node from the list based on a function to match the ID
func (*LinkedList[T]) Reset ¶
func (ll *LinkedList[T]) Reset()
func (*LinkedList[T]) Traverse ¶
func (ll *LinkedList[T]) Traverse(callback func(T))
Traverse is a utility function to apply a callback function to each node
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package natsrouter provides a simple routing layer for NATS with unified request handling.
|
Package natsrouter provides a simple routing layer for NATS with unified request handling. |
Click to show internal directories.
Click to hide internal directories.