Documentation
¶
Overview ¶
Package createprecheck contains helpers for create operations that must avoid hidden duplicate disclosure.
Index ¶
- func EnsureVisibleCreate(ctx context.Context, exists ExistsFunc, read ReadFunc, conflictMessage string, ...) error
- func EnsureVisibleDuplicate(ctx context.Context, resourceExists bool, read ReadFunc, ...) error
- func ResponseStatus(err error) (int, string)
- func ReturnError(err error) error
- type ExistsFunc
- type ReadFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureVisibleCreate ¶
func EnsureVisibleCreate( ctx context.Context, exists ExistsFunc, read ReadFunc, conflictMessage string, deniedMessage string, ) error
EnsureVisibleCreate verifies that a create request does not disclose hidden duplicates.
func EnsureVisibleDuplicate ¶
func EnsureVisibleDuplicate( ctx context.Context, resourceExists bool, read ReadFunc, conflictMessage string, deniedMessage string, ) error
EnsureVisibleDuplicate maps an existing resource to conflict or denied without disclosing duplicates hidden by the active create formula.
func ResponseStatus ¶
ResponseStatus maps create precheck errors to an HTTP status and response step.
func ReturnError ¶
ReturnError keeps internal precheck failures visible to generated service callers.
Types ¶
type ExistsFunc ¶
ExistsFunc checks raw resource existence without visibility filtering.
Click to show internal directories.
Click to hide internal directories.