sdkcheck

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sdkcheck provides helpers for verifying that gopherstack service handlers cover all operations exposed by the corresponding AWS SDK v2 client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCompleteness

func CheckCompleteness(tb testing.TB, sdkClientPtr any, supportedOps []string, notImplemented []string)

CheckCompleteness verifies that every exported method on sdkClientPtr is either listed in supportedOps (the handler's GetSupportedOperations slice) or explicitly listed in notImplemented. It also performs quality checks on the two lists themselves, in both directions: every SDK method must be accounted for, and every entry in notImplemented must correspond to a real SDK method. A third, currently non-fatal check reports supportedOps entries that don't correspond to a real SDK method ("phantom" operations) via tb.Logf — see the rollout note beside that check in the implementation for why it isn't a hard failure yet.

sdkClientPtr must be a non-nil pointer to an AWS SDK v2 Client struct, e.g. &s3.Client{}.

The test fails if:

  • sdkClientPtr is nil or not a pointer type.
  • An SDK method is not accounted for in either list (new upstream operation).
  • notImplemented contains entries that are not real SDK methods (typos / SDK renames).
  • notImplemented contains duplicate entries.
  • supportedOps contains duplicate entries.
  • supportedOps and notImplemented contain overlapping entries.

The test logs (but does not fail) when:

  • supportedOps contains entries that are not real SDK methods (a "phantom" operation — the handler claims to support something AWS doesn't have, or the check is being run against the wrong sibling SDK client).

The "Options" method, which exists on every AWS SDK v2 Client but is not an API operation, is always excluded from the check.

Types

This section is empty.

Jump to

Keyboard shortcuts

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