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

validators

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageValidationTimeout     = 10 * time.Second
	StorageCredentialSyncTimeout = 10 * time.Second
)

Variables

View Source
var (
	// ErrBucketNotFound is returned when a provider does not contain the expected bucket
	ErrBucketNotFound = errors.New("bucket not found")
	// ErrUnableToCreateBucket is returned when the local bucket could not be created and the directory does not exist
	ErrUnableToCreateBucket = errors.New("unable to create bucket directory")
	// ErrProviderTypeMismatch is returned when provider's reported type doesn't match expected type
	ErrProviderTypeMismatch = errors.New("provider type mismatch")
)
View Source
var MimeTypeValidator storage.ValidationFunc = mimeTypeValidator

Functions

func StorageAvailabilityCheck

func StorageAvailabilityCheck(cfgProvider func() storage.ProviderConfig) handlers.CheckFunc

StorageAvailabilityCheck returns a handlers.CheckFunc that validates storage provider availability

func ValidateAvailabilityByProvider

func ValidateAvailabilityByProvider(ctx context.Context, cfg storage.ProviderConfig) []error

ValidateAvailabilityByProvider validates only providers that have EnsureAvailable enabled. This allows per-provider strict availability enforcement instead of a global setting.

Types

This section is empty.

Jump to

Keyboard shortcuts

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