mgo

package module
v0.0.0-...-6deb74b Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

type KV[T any] struct {
	// contains filtered or unexported fields
}

func NewKV

func NewKV[T any](c *mongo.Collection) *KV[T]

func (*KV[T]) Delete

func (kv *KV[T]) Delete(ctx context.Context, keys ...string) error

func (*KV[T]) Get

func (kv *KV[T]) Get(ctx context.Context, key string) (T, error)

func (*KV[T]) Iter

func (kv *KV[T]) Iter(ctx context.Context, after string) rx.Iter[rx.Pair[string, T]]

func (*KV[T]) Put

func (kv *KV[T]) Put(ctx context.Context, key string, value T) error

Jump to

Keyboard shortcuts

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