Help us shape the future of Go! Take the 2026 Go Developer Survey

cloudfrontkeyvaluestore

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 13 Imported by: 0

README

Cloudfrontkeyvaluestore

Parity grade: A · SDK aws-sdk-go-v2/service/cloudfrontkeyvaluestore@v1.15.4 · last audited 2026-10-10 (de1f49c7c)

Coverage

Metric Value
PARITY entries audited 6 (6 ok)
Known gaps none
Structural gaps (can't be emulated) 2
Deferred items 0
Resource leaks clean
Structural gaps

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • TotalSizeInBytes is len(key)+len(value) summed per item. AWS's real byte accounting includes undocumented per-item storage overhead (confirmed absent from validators.go/deserializers.go -- no length constraint is modeled in the SDK at all, so the exact formula isn't derivable from any source this emulator can read); the number is real and deterministic (derived from actual stored data, not fabricated) but will not byte-for-byte match a real account. (bd: gopherstack-4ara)
  • Per-account key-value-store count quota (200, AWS Developer Guide's 'Quotas on key value stores' table) is enforced, if at all, by services/cloudfront's CreateKeyValueStore -- a different package's op, out of this manifest's scope.

More

Documentation

Overview

Package cloudfrontkeyvaluestore implements the AWS CloudFront KeyValueStore data-plane API (GetKey/PutKey/DeleteKey/ListKeys/UpdateKeys/ DescribeKeyValueStore). AWS models this as a separate SDK client and protocol from the main cloudfront.Client -- see Handler's doc comment for why this package exists instead of living inside services/cloudfront.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Backend *cloudfrontbackend.InMemoryBackend
}

Handler handles HTTP requests for CloudFront KeyValueStore data-plane operations.

Handler intentionally owns no independent state and therefore does not implement the Snapshot/Restore persistable shape that cli.go's setupPersistence auto-registers. It is wired (in cli.go's wireCloudFrontKeyValueStore) directly to the CloudFront service's *InMemoryBackend, which already owns and persists every KVS store's metadata (keyValueStores) and key/value data (keyValueStoreData/keyValueDataETags, see services/cloudfront/persistence.go) -- the same real state services/cloudfront's own KVS *control-plane* ops (CreateKeyValueStore etc.) act on. Implementing Snapshot/Restore here would register a second entry that duplicates and re-restores that same shared backend object. Mirrors services/dynamodbstreams's relationship to services/dynamodb (see that package's handler.go doc comment and persistence_test.go for the guard test on this invariant).

func NewHandler

func NewHandler(backend *cloudfrontbackend.InMemoryBackend) *Handler

NewHandler creates a new CloudFront KeyValueStore handler with the given backend.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this handler handles. KVS data is not region-partitioned in this emulator (mirrors the real service's per-store, not per-region, scoping), so this always returns empty.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS-style service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation returns the operation name for the request's method+path.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the target Key Value Store's ARN.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the operations this handler supports.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for CloudFront KeyValueStore requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service identifier, matching the real SDK's ServiceID ("CloudFront KeyValueStore", cloudfrontkeyvaluestore@v1.15.4 api_client.go).

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher matches the real client's unversioned "/key-value-stores/..." path family -- distinct from services/cloudfront's "/2020-05-31/..." prefix, which is exactly why these ops need their own service (see services/cloudfront/PARITY.md).

type Provider

type Provider struct{}

Provider implements service.Provider for CloudFront KeyValueStore.

func (*Provider) Init

Init initializes the CloudFront KeyValueStore handler with a nil backend. The backend is wired later in cli.go via wireCloudFrontKeyValueStore(), which points it at the CloudFront service's *InMemoryBackend -- see handler.go's Handler doc comment for why this service owns no state of its own.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

Jump to

Keyboard shortcuts

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