compose

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package compose builds and splits composite keys from object types and attributes. It also constructs range bounds for partial composite keys and transaction topic keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAttributes

func AppendAttributes(sb *strings.Builder, attributes ...string) (string, error)

AppendAttributes appends the attributes to the end of the given string builder.

func AppendAttributesOrPanic

func AppendAttributesOrPanic(sb *strings.Builder, attributes ...string) string

AppendAttributesOrPanic appends the attributes to the end of the given string builder. It panics if the attributes are invalid.

func CreateCompositeKey

func CreateCompositeKey(sb *strings.Builder, objectType string, attributes ...string) (string, error)

CreateCompositeKey creates a composite key in the given string builder.

func CreateCompositeKeyOrPanic

func CreateCompositeKeyOrPanic(sb *strings.Builder, objectType string, attributes ...string) string

CreateCompositeKeyOrPanic creates a composite key in the given string builder. It panics if the attributes are invalid.

func CreateRangeKeysForPartialCompositeKey added in v0.24.0

func CreateRangeKeysForPartialCompositeKey(objectType string, attributes ...string) (startKey, endKey string, err error)

CreateRangeKeysForPartialCompositeKey returns the start and end keys of a range scan that covers every composite key beginning with the given objectType and attributes.

func CreateTxTopic

func CreateTxTopic(networkName, channelName, txID string) (*strings.Builder, string)

func IsCompositeKey added in v0.24.0

func IsCompositeKey(key string) bool

IsCompositeKey reports whether key starts with the composite key namespace prefix.

func SplitCompositeKey added in v0.24.0

func SplitCompositeKey(compositeKey string) (string, []string, error)

SplitCompositeKey splits a composite key built by CreateCompositeKey into its objectType and attributes. It returns an error if compositeKey is not such a key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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