key

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

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

Variables

View Source
var ErrInvalidBSONKey = errors.New("invalid bson key")

ErrInvalidBSONKey is returned when the given bsonKey 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 FromBSONKey

func FromBSONKey(bsonKey string) (*Key, error)

FromBSONKey creates an instance of Key from the received bsonKey.

func (*Key) BSONKey

func (k *Key) BSONKey() string

BSONKey returns the string of this key.

Jump to

Keyboard shortcuts

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