Documentation
¶
Overview ¶
Package racerobject defines the Racer object identity: the canonical JSON and SHA-256 Racer key for an object in an S3 or Azure Blob bucket. The Rust racer-object sidecar (cmd/racer-object) computes the same identity byte for byte. The package also validates bucket names and Azure Blob container URLs.
Index ¶
- func NewRequest(bucket, key, versionID string) (racersdk.Request, error)
- func ParseAzureContainerURL(value, credential string) (accountURL, container string, err error)
- func ValidAzureContainerName(name string) bool
- func ValidateAzureAccountURL(value, credential string) error
- func ValidateBucket(bucket string) error
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
NewRequest hashes canonical schema-1 JSON and carries it as origin metadata. Keys and version IDs are never cleaned, decoded, or normalized.
func ParseAzureContainerURL ¶ added in v0.17.0
ParseAzureContainerURL splits an Azure Blob container URL into the account URL and the container name. The last path segment is the container; what precedes it must be a valid account URL (see ValidateAzureAccountURL), so Azurite-style URLs such as http://127.0.0.1:10000/account/container work. credential is "default" or "anonymous"; the default credential requires HTTPS.
func ValidAzureContainerName ¶ added in v0.17.0
ValidAzureContainerName reports whether name follows the Azure Blob container naming rules: 3 to 63 lowercase letters, digits, and single hyphens, starting and ending with a letter or digit.
func ValidateAzureAccountURL ¶ added in v0.17.0
ValidateAzureAccountURL checks an Azure Blob account URL for the origin. credential is "default" or "anonymous"; the default credential requires HTTPS. Azurite-style URLs may carry one simple account path segment.
func ValidateBucket ¶ added in v0.17.0
ValidateBucket reports whether an origin accepts bucket, so callers that render origin flags can reject it before the origin starts.