s3-orchestrator

internalkey

import "github.com/afreidah/s3-orchestrator/internal/internalkey"

Package internalkey centralizes the “bucket/userkey” namespacing convention used between the S3 transport layer and the storage / metadata layer.

Index

Constants

Separator is the delimiter between the bucket name and the user-facing object key inside an internal storage key.

const Separator = "/"

func Make

func Make(bucket, userKey string) string

Make returns the internal storage key for a (bucket, userKey) pair.

func Prefix

func Prefix(bucket string) string

Prefix returns the bucket-scoped prefix used for listing and reconcile scans (i.e. “bucket/”).

func Split

func Split(internalKey string) (bucket, userKey string)

Split parses an internal key into its bucket and user-facing key. When the key has no separator, bucket holds the entire input and userKey is empty.

Generated by gomarkdoc