srcdir

package
v1.147.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package srcdir is where a stored file's versions live and whether a table's location lies among them (#2131, #2136).

A managed resource and a portal asset both keep every version of their file beneath a directory named by the source's id -- resources/{scope}/{owner}/{id}/... and {prefix}/{owner}/{id}/... -- so a table over any version of the file reads somewhere under that directory and a table over anything else does not. That is the one fact a table carries about where it came from, and what lets the platform recognize a table it made and has no record of.

Index

Constants

View Source
const Sep = "/"

Sep separates the segments of an object key.

Variables

This section is empty.

Functions

func CandidateIDs

func CandidateIDs(key string) []string

CandidateIDs are the path segments of a key that could name a stored file, deepest first: a file's directory is named by its id with at most a version directory beneath.

func Describe

func Describe(location string) string

Describe names where a table reads, for a refusal.

func Owns

func Owns(bucket, id, headKey, location string) bool

Owns reports whether location lies inside the directory the source with id, whose current file is headKey in bucket, keeps every version under.

func Root

func Root(id, headKey string) string

Root is the directory, with its trailing slash, named by id in the key of a source's current file, or "" when no directory is.

func Same

func Same(a, b string) bool

Same compares two locations as directories.

func Split

func Split(location string) (bucket, key string, ok bool)

Split reads an s3:// location into its bucket and key.

func Under

func Under(location string, dirs []string) bool

Under reports whether a location lies inside any of dirs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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