storeutil

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Overview

storeutil contains utility functions for implementing storage backends. The store package only has dependencies on the std library (intentionally) so that clients of the store are easy to reference.

Index

Constants

View Source
const (
	ScopePrefix    = "scope"
	ResourcePrefix = "resource"
)

Variables

This section is empty.

Functions

func ExtractStorageParts

func ExtractStorageParts(id resources.ID) (string, string, string, string)

ExtractStorageParts extracts the main components of the resource id in a way that easily supports our storage abstraction. Returns a tuple of the (prefix, rootScope, routingScope, resourceType)

func IDMatchesQuery

func IDMatchesQuery(id resources.ID, query store.Query) bool

IDMatchesQuery checks if the given ID matches the given query.

func NormalizePart

func NormalizePart(part string) string

NormalizePart takes in a string and returns a normalized version of it with a prefix and suffix segment separator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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