Documentation ¶
Index ¶
- func AbsolutePath(dir string, path string) string
- func AddContentDisposition(w http.ResponseWriter, filename string)
- func AddContentDispositionSong(w http.ResponseWriter, metadata, filename string)
- func IsHTMX(r *http.Request) bool
- func OneOff[T any](ctx context.Context, fn StreamFn[T]) (T, error)
- func RedirectBack(r *http.Request) *http.Request
- type Map
- func (m *Map[K, V]) CompareAndDelete(key K, old V) (deleted bool)
- func (m *Map[K, V]) CompareAndSwap(key K, old V, new V) bool
- func (m *Map[K, V]) Delete(key K)
- func (m *Map[K, V]) Load(key K) (value V, ok bool)
- func (m *Map[K, V]) LoadAndDelete(key K) (value V, loaded bool)
- func (m *Map[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)
- func (m *Map[K, V]) Range(fn func(key K, value V) bool)
- func (m *Map[K, V]) Store(key K, value V)
- func (m *Map[K, V]) Swap(key K, value V) (previous V, loaded bool)
- type StreamCallbackFn
- type StreamFn
- type TypedValue
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsolutePath ¶
func AddContentDisposition ¶
func AddContentDisposition(w http.ResponseWriter, filename string)
func AddContentDispositionSong ¶
func AddContentDispositionSong(w http.ResponseWriter, metadata, filename string)
Types ¶
type Map ¶
type Map[K, V any] struct { // contains filtered or unexported fields }
func (*Map[K, V]) CompareAndDelete ¶
func (*Map[K, V]) CompareAndSwap ¶
func (*Map[K, V]) LoadAndDelete ¶
func (*Map[K, V]) LoadOrStore ¶
type StreamCallbackFn ¶
type TypedValue ¶
type TypedValue[T any] struct { // contains filtered or unexported fields }
func NewTypedValue ¶
func NewTypedValue[T any](initial T) *TypedValue[T]
func (*TypedValue[T]) Load ¶
func (tv *TypedValue[T]) Load() T
func (*TypedValue[T]) Store ¶
func (tv *TypedValue[T]) Store(new T)
func (*TypedValue[T]) Swap ¶
func (tv *TypedValue[T]) Swap(newv T) (old T)
type Value ¶
type Value[T any] struct { // contains filtered or unexported fields }
func StreamValue ¶
func StreamValue[T any](ctx context.Context, fn StreamFn[T], callbackFn ...StreamCallbackFn[T]) *Value[T]
StreamValue opens the stream created by StreamFn and calls any callbackFn given everytime a new value is returned by the stream. StreamValue also stores the last received value, accessable by calling .Latest
Directories ¶
Path | Synopsis |
---|---|
Package usock implements a wrapper around the unix(7) SCM_RIGHTS API, which allows processes to exchange file handles over a unix(7) control socket.
|
Package usock implements a wrapper around the unix(7) SCM_RIGHTS API, which allows processes to exchange file handles over a unix(7) control socket. |
Click to show internal directories.
Click to hide internal directories.