MCPcopy
hub / github.com/minio/minio-go / validateAnnotationName

Function validateAnnotationName

api-object-annotation.go:48–56  ·  view source on GitHub ↗

validateAnnotationName performs a minimal client-side check on the annotation name (non-empty, within the length limit). The server enforces the full naming rules (allowed characters, reserved prefixes).

(name string)

Source from the content-addressed store, hash-verified

46// name (non-empty, within the length limit). The server enforces the full
47// naming rules (allowed characters, reserved prefixes).
48func validateAnnotationName(name string) error {
49 if name == "" {
50 return errInvalidArgument("annotation name must not be empty")
51 }
52 if len(name) > maxAnnotationNameBytes {
53 return errInvalidArgument("annotation name exceeds 512 bytes")
54 }
55 return nil
56}
57
58// PutObjectAnnotationOptions configures a PutObjectAnnotation request.
59type PutObjectAnnotationOptions struct {

Callers 3

PutObjectAnnotationMethod · 0.85
GetObjectAnnotationMethod · 0.85

Calls 1

errInvalidArgumentFunction · 0.85

Tested by

no test coverage detected