storagekey

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package storagekey holds the object key rules of package storage, for the packages that must apply them without depending on storage itself (config, which validates a key prefix before any driver exists). storage.ValidateKey and storage.ValidatePrefix are the public forms.

Index

Constants

View Source
const MaxKeyBytes = 1024

MaxKeyBytes is the longest key, in bytes (S3's limit).

View Source
const MaxSegmentBytes = 255

MaxSegmentBytes is the longest segment of a key (the part between '/'s), in bytes.

Variables

This section is empty.

Functions

func PrefixProblem

func PrefixProblem(prefix string) string

PrefixProblem says why prefix cannot start every key of a store, or "" when it can. A prefix is empty, or a valid key followed by '/', short enough to leave room for a key after it: prefix + key is itself a key, held to MaxKeyBytes.

func Problem

func Problem(key string) string

Problem says why key breaks the key rules, or "" when it does not. The rules are documented on storage.ValidateKey.

func UnsafeRune

func UnsafeRune(r rune) bool

UnsafeRune reports control characters (C0, DEL, C1), Unicode line and paragraph separators, and bidirectional controls.

Types

This section is empty.

Jump to

Keyboard shortcuts

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