package general import ( "fmt" "strings" ) func ParseURI(uri string) (repo, collection, rkey string, err error) { // URI format: 'at://DID/collection/recordkey' parts := strings.Split(strings.TrimPrefix(uri, "at://"), "/") if len(parts) != 3 { return "", "", "", fmt.Errorf("invalid URI format: %s", uri) } return parts[0], parts[1], parts[2], nil }