Documentation
¶
Index ¶
- func GetById[T protoreflect.ProtoMessage](ctx context.Context, client kvv1Connect.KeyValueServiceClient, id string, ...) (T, error)
- func List[T protoreflect.ProtoMessage](ctx context.Context, client kvv1Connect.KeyValueServiceClient, ...) ([]T, error)
- func ListAndFilter[T protoreflect.ProtoMessage](ctx context.Context, client kvv1Connect.KeyValueServiceClient, ...) ([]T, error)
- func Save[T protoreflect.ProtoMessage](ctx context.Context, client kvv1Connect.KeyValueServiceClient, key string, ...) (T, error)
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.
Click to show internal directories.
Click to hide internal directories.