key

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// Splitter is used to separate collection and document in a string.
	Splitter = "$"
)

Variables

View Source
var ErrInvalidCombinedKey = errors.New("invalid combined key")

ErrInvalidCombinedKey is returned when the given combined key is invalid.

Functions

This section is empty.

Types

type Key

type Key struct {
	Collection string
	Document   string
}

Key represents the key of the Document.

func FromCombinedKey added in v0.2.3

func FromCombinedKey(k string) (Key, error)

FromCombinedKey creates an instance of Key from the given combined key.

func (Key) CombinedKey added in v0.2.3

func (k Key) CombinedKey() string

CombinedKey returns the string of this key.

Jump to

Keyboard shortcuts

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