bpc

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetById

func GetById[T protoreflect.ProtoMessage](
	ctx context.Context,
	client kvv1Connect.KeyValueServiceClient,
	id string,
	factory func() T) (T, error)

func List

func List[T protoreflect.ProtoMessage](ctx context.Context, client kvv1Connect.KeyValueServiceClient, factory func() T) ([]T, error)

list retrieves all items of type T from the key-value store. It's understood that the response of this is not limited in size so use with caution in production environments. Blueprint needs some additional logic to handle pagination or limits. I don't think this can actually be improved without Blueprint having indexing and pagination capabilities.

func ListAndFilter

func ListAndFilter[T protoreflect.ProtoMessage](ctx context.Context, client kvv1Connect.KeyValueServiceClient, filter *kvv1.Statement, factory func() T) ([]T, error)

func Save

func Save[T protoreflect.ProtoMessage](
	ctx context.Context,
	client kvv1Connect.KeyValueServiceClient,
	key string,
	item T,
) (T, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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