boltdb

package
v0.0.0-...-32ef685 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericRepository

type GenericRepository[T data.Entity] struct {
	// contains filtered or unexported fields
}

GenericRepository represents a generic repository that can store any entity of type [T].

func CreateRepository

func CreateRepository[T data.Entity](db *bbolt.DB) (*GenericRepository[T], error)

CreateRepository creates a new GenericRepository with provided database.

func (*GenericRepository[T]) PutBatch

func (repo *GenericRepository[T]) PutBatch(_ context.Context, values ...T) error

PutBatch stores multiple values into repository's bucket in batch mode.

Jump to

Keyboard shortcuts

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